-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start of sliver app bar for improved design
- Loading branch information
1 parent
726a12d
commit a30ee2a
Showing
6 changed files
with
128 additions
and
114 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,4 @@ app.*.map.json | |
/android/app/debug | ||
/android/app/profile | ||
/android/app/release | ||
local.properties |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
@immutable | ||
class GameScreenAppBar extends SliverPersistentHeaderDelegate { | ||
final double expandedHeight; | ||
|
||
GameScreenAppBar({required this.expandedHeight}); | ||
|
||
@override | ||
Widget build( | ||
BuildContext context, double shrinkOffset, bool overlapsContent) { | ||
final theme = Theme.of(context); | ||
return Stack( | ||
fit: StackFit.expand, | ||
children: [ | ||
Container( | ||
decoration: BoxDecoration(color: Colors.lightBlue), | ||
child: Align( | ||
alignment: Alignment.topCenter, | ||
child: Text("Lost Cities Scoring Helper", | ||
style: theme.textTheme.headline6!.copyWith( | ||
color: Colors.white, | ||
fontWeight: FontWeight.bold, | ||
)), | ||
), | ||
), | ||
Placeholder() | ||
], | ||
); | ||
} | ||
|
||
@override | ||
double get maxExtent => 200; | ||
|
||
@override | ||
double get minExtent => kToolbarHeight; | ||
|
||
@override | ||
bool shouldRebuild(covariant SliverPersistentHeaderDelegate oldDelegate) { | ||
return true; | ||
} | ||
} |
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
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
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
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