I have `ToggleButtons` as follows:

`Map<String, bool> listButton = {'low': true, 'medium': true, 'high': true};`

and I created `myColor` class like this:

`var myColor = {"low": Colors.green, "medium": Colors.amberAccent, "high": Colors.red};`

So how to show the color of `ToggleButtons` by property `fillColor` follows the color in `myColor` like this:

[![enter image description here](https://i.stack.imgur.com/Gafza.jpg)](https://i.stack.imgur.com/Gafza.jpg)

So pls help me, this is the main file:

```
import 'package:flutter/material.dart';

class ToggleButtonColor extends StatefulWidget {
  @override
  _ToggleButtonColorState createState() => _ToggleButtonColorState();
}

class _ToggleButtonColorState extends State<ToggleButtonColor> {
  Map<String, bool> listButton = {'low': true, 'medium': true, 'high': true};
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(title: Text('Toggle Button Color')),
        body: ToggleButtons(
            children: listButton.keys.map((e) => Text(e)).toList(),
            fillColor: myColor[listButton.keys], // I think this line needs to be corrected
            isSelected: listButton.values.toList(),
            onPressed: (int index) {
              String indexKey = listButton.keys.toList()[index];
              setState(() {
                listButton.update(indexKey, (value) => !value);
              });
            }));
  }
}

var myColor = {"low": Colors.green, "medium": Colors.amberAccent, "high": Colors.red};

```