Last active
December 10, 2018 14:05
-
-
Save hjJunior/ba7ab715036479f71269d3fad5b9d622 to your computer and use it in GitHub Desktop.
Flutter project structure - Beer List App
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'screens/home.dart'; | |
class BeerListApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) => MaterialApp( | |
title: 'Beer List App', | |
debugShowCheckedModeBanner: false, | |
theme: ThemeData( | |
primaryColor: Colors.black, | |
accentColor: Colors.black | |
), | |
home: Home(), | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class Home extends StatefulWidget { | |
@override | |
_HomeState createState() => _HomeState(); | |
} | |
class _HomeState extends State<Home> { | |
@override | |
Widget build(BuildContext context) => Scaffold( | |
appBar: AppBar( | |
centerTitle: true, | |
title: Text('Top Beers'), | |
), | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'app.dart'; | |
void main() => runApp(BeerListApp()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment