1// Flutter code sample for {{id}} 2 3{{description}} 4 5import 'package:flutter/material.dart'; 6 7{{code-imports}} 8 9void main() => runApp(new MyApp()); 10 11/// This Widget is the main application widget. 12class MyApp extends StatelessWidget { 13 static const String _title = 'Flutter Code Sample'; 14 15 @override 16 Widget build(BuildContext context) { 17 return MaterialApp( 18 title: _title, 19 home: Scaffold( 20 appBar: AppBar(title: const Text(_title)), 21 body: MyStatelessWidget(), 22 ), 23 ); 24 } 25} 26 27 28{{code-preamble}} 29 30/// This is the stateless widget that the main application instantiates. 31class MyStatelessWidget extends StatelessWidget { 32 MyStatelessWidget({Key key}) : super(key: key); 33 34 @override 35 {{code}} 36} 37