Skip to content

Instantly share code, notes, and snippets.

@peekpt
Created August 24, 2018 18:25
Show Gist options
  • Select an option

  • Save peekpt/e696bedf03bbb134297d4d87b10d64ab to your computer and use it in GitHub Desktop.

Select an option

Save peekpt/e696bedf03bbb134297d4d87b10d64ab to your computer and use it in GitHub Desktop.

Revisions

  1. peekpt created this gist Aug 24, 2018.
    36 changes: 36 additions & 0 deletions main.dart
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    import 'package:flutter/material.dart';

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

    class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
    return MaterialApp(
    debugShowCheckedModeBanner: false,
    title: 'App Name',
    theme: ThemeData(
    primarySwatch: Colors.purple,
    ),
    home: RootPage(title: 'Root Title'),
    );
    }
    }

    class RootPage extends StatefulWidget {
    RootPage({Key key, this.title}) : super(key: key);
    final String title;
    @override
    _RootPageState createState() => _RootPageState();
    }

    class _RootPageState extends State<RootPage> {
    @override
    Widget build(BuildContext context) {
    return Scaffold(
    appBar: AppBar(
    title: Text(widget.title),
    ),
    body: Container(),
    );
    }
    }