Skip to content

Instantly share code, notes, and snippets.

@devoncarew
Forked from RedBrogdon/hint.txt
Last active April 10, 2019 15:34
Show Gist options
  • Save devoncarew/cc13ef08a9625f35b2f382a8372f5032 to your computer and use it in GitHub Desktop.
Save devoncarew/cc13ef08a9625f35b2f382a8372f5032 to your computer and use it in GitHub Desktop.
First Flutter gist
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Title!'),
),
body: Text('Center me!'),
),
);
}
}
import 'package:flutter_web/material.dart';
import 'package:flutter_web_ui/ui.dart' as ui;
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Title!'),
),
body: Center(
child: Text('Center me!'),
),
),
);
}
}
import 'package:flutter_web/material.dart';
import 'package:flutter_web_ui/ui.dart' as ui;
void main() async {
await ui.webOnlyInitializePlatform();
runApp(MyApp());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment