getButtons static method

List<Widget> getButtons(
  1. BuildContext context,
  2. Map<String, dynamic> map
)

Implementation

static List<Widget> getButtons(BuildContext context, Map<String, dynamic> map) {
  return map.keys
      .map((e) => TextButton(
            onPressed: () => Navigator.of(context).pop(map[e]),
            child: Text(e),
          ))
      .toList();
}