@@ -404,8 +404,8 @@ class PageState extends State<Page>
404
404
curve: curve,
405
405
duration: duration,
406
406
backgroundWidget: backgroundWidget,
407
- expandedBarHeight: flexibleMaxHeight,
408
- collapsedBarHeight: flexibleMinHeight,
407
+ expandedBarHeight: flexibleMaxHeight?? titleBarHeight ,
408
+ collapsedBarHeight: flexibleMinHeight?? titleBarHeight ,
409
409
floating: scrollMode == ScrollMode .floating,
410
410
pinned: scrollMode == ScrollMode .pinned,
411
411
@@ -919,9 +919,10 @@ class _AnimatedAppBarState extends State<AnimatedAppBar> {
919
919
}
920
920
921
921
void _updateCollapseState () {
922
- bool newState = widget.scrollController.hasClients &&
923
- widget.scrollController.offset >
924
- (widget.expandedBarHeight - widget.collapsedBarHeight);
922
+ bool newState = widget.scrollController != null &&
923
+ widget.scrollController.hasClients &&
924
+ widget.scrollController.offset >
925
+ (widget.expandedBarHeight - widget.collapsedBarHeight);
925
926
926
927
if (newState != isCollapsed) {
927
928
setState (() {
@@ -980,8 +981,8 @@ class _AnimatedAppBarState extends State<AnimatedAppBar> {
980
981
}
981
982
982
983
enum ScrollMode {
983
- floating,
984
984
pinned,
985
+ floating,
985
986
}
986
987
class ActionResponse {
987
988
Map <String , dynamic >? _resultData;
0 commit comments