Skip to content

Instantly share code, notes, and snippets.

@RedBrogdon
Last active April 16, 2019 01:10
Show Gist options
  • Save RedBrogdon/9d3b49579aea1a7ee5bb546846fd0026 to your computer and use it in GitHub Desktop.
Save RedBrogdon/9d3b49579aea1a7ee5bb546846fd0026 to your computer and use it in GitHub Desktop.
First Flutter gist
This is a hint!
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: 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!'),
),
),
);
}
}
void main() async {
WidgetsApp.debugAllowBannerOverride = false;
await ui.webOnlyInitializePlatform();
runApp(MyApp());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment