Created
July 13, 2018 04:40
-
-
Save deven98/2fcee1bdc5c59337f7ecf45c07f2dbf6 to your computer and use it in GitHub Desktop.
Medium App Design with AppBar complete.
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'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'Home', | |
theme: new ThemeData( | |
primarySwatch: Colors.blue, | |
), | |
home: new MyHomePage(), | |
debugShowCheckedModeBanner: false, | |
); | |
} | |
} | |
class MyHomePage extends StatefulWidget { | |
@override | |
_MyHomePageState createState() => new _MyHomePageState(); | |
} | |
class _MyHomePageState extends State<MyHomePage> { | |
@override | |
Widget build(BuildContext context) { | |
return new Scaffold( | |
appBar: new AppBar( | |
title: new Text("Home", style: TextStyle(fontWeight: FontWeight.w400),), | |
backgroundColor: Colors.black, | |
actions: <Widget>[ | |
Padding( | |
padding: const EdgeInsets.only(right: 20.0), | |
child: Icon(Icons.notifications_none, color: Colors.grey,), | |
), | |
Padding( | |
padding: const EdgeInsets.only(right: 12.0), | |
child: Icon(Icons.search, color: Colors.grey), | |
), | |
], | |
), | |
body: new Center( | |
child: new Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
], | |
), | |
), | |
drawer: Drawer(), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment