Last active
September 6, 2022 20:35
-
-
Save hnoor/10c83b18a5997886fc1dcf015cfe6796 to your computer and use it in GitHub Desktop.
Revisions
-
hnoor revised this gist
Jun 20, 2020 . 1 changed file with 0 additions and 28 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,28 +0,0 @@ -
hnoor revised this gist
Jun 20, 2020 . 1 changed file with 28 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ import 'package:flutter/material.dart'; class CustomAppBar extends StatelessWidget { final String title; const CustomAppBar( this.title, { Key key, }) : super(key: key); @override Widget build(BuildContext context) { MediaQueryData mediaQuery = MediaQuery.of(context); double height = (mediaQuery.size.height - mediaQuery.padding.top) * HEADER_HEIGHT; return Container( height: height, child: Row( children: <Widget>[ IconButton( color: Colors.black, icon: Icon(Icons.chevron_left), onPressed: () => Navigator.pop(context), ), Text(title) ], ), ); } } -
hnoor created this gist
Jun 20, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ import 'package:flutter/material.dart'; class CustomAppBar extends StatelessWidget with PreferredSizeWidget { final String title; @override final Size preferredSize; CustomAppBar( this.title, { Key key, }) : preferredSize = Size.fromHeight(50.0), super(key: key); @override Widget build(BuildContext context) { return AppBar( title: Text( title, style: TextStyle(color: Colors.black), ), backgroundColor: Colors.white, leading: IconButton( icon: Icon(Icons.chevron_left), onPressed: () => Navigator.pop(context), color: Colors.black, ), ); } }