Created
March 5, 2020 09:29
-
-
Save xinthink/ea6cab070973d44c2c1bafebaf21b231 to your computer and use it in GitHub Desktop.
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 characters
@override | |
Widget build(BuildContext context) { | |
final uid = Provider.of<CurrentUser>(context).data.uid; | |
return ChangeNotifierProvider.value( | |
value: _note, | |
child: Consumer<Note>( | |
builder: (_, __, ___) => Theme( | |
data: Theme.of(context).copyWith( | |
primaryColor: _noteColor, | |
... | |
), | |
child: AnnotatedRegion<SystemUiOverlayStyle>( | |
// tint the Android system navigation bar | |
value: SystemUiOverlayStyle.dark.copyWith( | |
statusBarColor: _noteColor, | |
systemNavigationBarColor: _noteColor, | |
systemNavigationBarIconBrightness: Brightness.dark, | |
), | |
child: Scaffold( | |
key: _scaffoldKey, | |
appBar: AppBar( | |
actions: _buildTopActions(context, uid), | |
), | |
body: WillPopScope( | |
onWillPop: () => _onPop(uid), | |
child: _buildBody(context, uid), // textfields for title/content | |
), | |
bottomNavigationBar: _buildBottomAppBar(context), | |
), | |
), | |
), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment