Skip to content

Instantly share code, notes, and snippets.

@kasperpeulen
Created November 26, 2021 15:42
Show Gist options
  • Select an option

  • Save kasperpeulen/0dea3d6a6b4b091b895d51c3770bf79b to your computer and use it in GitHub Desktop.

Select an option

Save kasperpeulen/0dea3d6a6b4b091b895d51c3770bf79b to your computer and use it in GitHub Desktop.

Revisions

  1. kasperpeulen created this gist Nov 26, 2021.
    26 changes: 26 additions & 0 deletions flutter4.dart
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    void main() => runApp(MyApp());

    class MyApp extends StatelessWidget {
    const MyApp({Key? key}) : super(key: key);

    @override
    Widget build(BuildContext context) {
    return MaterialApp(home: MyScaffold());
    }
    }

    class MyScaffold extends StatelessWidget {
    const MyScaffold({Key? key}) : super(key: key);

    @override
    Widget build(BuildContext context) {
    return Scaffold(
    appBar: AppBar(title: Text('Title')),
    body: Center(child: Text('Hello World')),
    floatingActionButton: FloatingActionButton(
    onPressed: () => print('Button pressed'),
    child: Icon(Icons.add),
    ),
    );
    }
    }