"Fossies" - the Fresh Open Source Software Archive

Member "flutter-1.22.4/dev/snippets/config/templates/stateless_widget_material.tmpl" (13 Nov 2020, 650 Bytes) of package /linux/misc/flutter-1.22.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /// Flutter code sample for {{element}}
    2 
    3 {{description}}
    4 
    5 import 'package:flutter/material.dart';
    6 
    7 {{code-imports}}
    8 
    9 void main() => runApp(new MyApp());
   10 
   11 /// This is the main application widget.
   12 class 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: MyStatelessWidget(),
   20     );
   21   }
   22 }
   23 
   24 
   25 {{code-preamble}}
   26 
   27 /// This is the stateless widget that the main application instantiates.
   28 class MyStatelessWidget extends StatelessWidget {
   29   MyStatelessWidget({Key key}) : super(key: key);
   30 
   31   @override
   32   {{code}}
   33 }