stateless_widget_cupertino_page_scaffold.tmpl 788 Bytes
Newer Older
1
/// Flutter code sample for {{element}}
2
// @dart = 2.9
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

{{description}}

import 'package:flutter/cupertino.dart';

{{code-imports}}

void main() => runApp(new MyApp());

/// This is the main application widget.
class MyApp extends StatelessWidget {
  static const String _title = 'Flutter Code Sample';

  @override
  Widget build(BuildContext context) {
    return CupertinoApp(
      title: _title,
      home: CupertinoPageScaffold(
        navigationBar: CupertinoNavigationBar(middle: const Text(_title)),
        body: MyStatelessWidget(),
      ),
    );
  }
}


{{code-preamble}}

/// This is the stateless widget that the main application instantiates.
class MyStatelessWidget extends StatelessWidget {
  MyStatelessWidget({Key key}) : super(key: key);

  @override
  {{code}}
}