Skip to content

Instantly share code, notes, and snippets.

@esstein
Created July 22, 2020 23:55
Show Gist options
  • Save esstein/6a908fe99f604474fd052731d59d059c to your computer and use it in GitHub Desktop.
Save esstein/6a908fe99f604474fd052731d59d059c to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
List<Widget> arrayOfWidgets = [
Text('Text widget #1'),
Text('Text widget #2'),
Text('Text widget #3')
];
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text("Text Widget with a List of Widget's Example")),
body: Column(children: arrayOfWidgets)));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment