From c0fda3c1911588a45bcc8c360e3249fb4216dd1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9C981767326=40qq=2Ecom=E2=80=9D?= <981767326@qq.com> Date: Tue, 13 Aug 2024 14:30:26 +0800 Subject: [PATCH] Migrate to flutter 3.22.2+ --- lib/src/widget.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/src/widget.dart b/lib/src/widget.dart index a9bcd6e..8ce3f37 100644 --- a/lib/src/widget.dart +++ b/lib/src/widget.dart @@ -129,9 +129,7 @@ class _BottomExpandableAppBarState extends State { @override Widget build(BuildContext context) { - EdgeInsets viewPadding = widget.attachSide == Side.Bottom - ? EdgeInsets.only(bottom: MediaQuery.of(context).viewPadding.bottom) - : EdgeInsets.only(top: MediaQuery.of(context).viewPadding.top); + EdgeInsets viewPadding = widget.attachSide == Side.Bottom ? EdgeInsets.only(bottom: MediaQuery.of(context).viewPadding.bottom) : EdgeInsets.only(top: MediaQuery.of(context).viewPadding.top); return LayoutBuilder( builder: (context, layoutConstraints) { @@ -158,7 +156,7 @@ class _BottomExpandableAppBarState extends State { height: panelState * finalHeight + widget.appBarHeight + widget.bottomOffset + viewPadding.vertical, decoration: widget.expandedDecoration ?? BoxDecoration( - color: widget.expandedBackColor ?? Theme.of(context).backgroundColor, + color: widget.expandedBackColor ?? Theme.of(context).colorScheme.background, borderRadius: BorderRadius.circular(25), ), child: Opacity(opacity: panelState > 0.25 ? 1 : panelState * 4, child: widget.expandedBody), @@ -168,7 +166,7 @@ class _BottomExpandableAppBarState extends State { ), ClipPath( child: Container( - color: widget.bottomAppBarColor ?? Theme.of(context).bottomAppBarColor, + color: widget.bottomAppBarColor ?? Theme.of(context).bottomAppBarTheme.color, height: widget.appBarHeight + viewPadding.vertical, child: Padding( padding: viewPadding,