Creating a list of widgets from map with keys and values

Creating a list of widgets from map with keys and values

If I have say a&nbsp;<code>SimpleDialog()</code>&nbsp;and it accepts&nbsp;<code>children[]</code>&nbsp;and I want to populate it from a&nbsp;<code>Map&lt;int, String&gt;</code>, how would I do that? I need both the key and value to create the child widget.

If I have say a SimpleDialog() and it accepts children[] and I want to populate it from a Map<int, String>, how would I do that? I need both the key and value to create the child widget.

const optionsMap = {
    111:"First option",
    222:"Second option",
}
return SimpleDialog(
    title: Text('Choose one'),
    children: // I don't know what to put here
              // I want to have widgets based on optionsMap keys and values
)

I solved it by creating a List<Widget> beforehand above the return statement, but just for convenience (and becoming better in Dart) I'd like to know if there's a way to do it inline.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

How to Create Liquid Swipe Animation in Flutter | Liquid Swipe Flutter

Today tutorial, I am going to show you how to create Liquid Swipe Animation in Flutter. liquid Swipe animation is amazing and its Created for iOS Platform and f

11 Best Flutter Development Tools You Will Need As A Beginner | AllTechSavvy

In this tutorial, I am going to show you some of the Best Flutter development tools available in the market which will help you to make Development Produc

How to Create Splash Screen in a Flutter App | Splash Screen Tutorial

Splash Screen help Brand to get Noticed Or Brand Awareness so Today I am going to show how to create Splash screen in a flutter Splash Screen Animation can b...