Skip to content

Instantly share code, notes, and snippets.

@deven98
Created July 13, 2018 04:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deven98/2fcee1bdc5c59337f7ecf45c07f2dbf6 to your computer and use it in GitHub Desktop.
Save deven98/2fcee1bdc5c59337f7ecf45c07f2dbf6 to your computer and use it in GitHub Desktop.
Medium App Design with AppBar complete.
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