Skip to content

Instantly share code, notes, and snippets.

@houssenedao
Last active May 29, 2019 10:15
Show Gist options
  • Save houssenedao/fa898c4511bdea2f677199d3a3d60b1b to your computer and use it in GitHub Desktop.
Save houssenedao/fa898c4511bdea2f677199d3a3d60b1b to your computer and use it in GitHub Desktop.
Flutter default app
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Padding Widget'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Text('Widget Padding'),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment