Created
June 20, 2020 11:42
-
-
Save hnoor/db6ccd8c2779050d6363a3b4835543ab to your computer and use it in GitHub Desktop.
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 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) | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment