Question: I'm new to Flutter.
I'm trying to use this sentence

```
  Map<String, Function> map = Map();

  Function fun1 = (() => print("TAG : 1111"));
  map.putIfAbsent("test", fun1);
  map["test"]!.call();

```

But in runtime, I've got the error like this.

```
Dart Unhandled Exception: type '_TypeError'

```

I want to use the map including some function because of not supported reflection
Is there any solution in my case?

Answer: 
Update your `map.putIfAbsent()` to:

```dart
map.putIfAbsent("test", () => fun1);

```
```
Map<String, void Function()> mapName = {
    "some string": () {
        // function code
    },
}

```