mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: persistent header
Closes #211 ref pilipala Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -19,8 +19,16 @@ class CustomSliverPersistentHeaderDelegate
|
|||||||
//创建child子组件
|
//创建child子组件
|
||||||
//shrinkOffset:child偏移值minExtent~maxExtent
|
//shrinkOffset:child偏移值minExtent~maxExtent
|
||||||
//overlapsContent:SliverPersistentHeader覆盖其他子组件返回true,否则返回false
|
//overlapsContent:SliverPersistentHeader覆盖其他子组件返回true,否则返回false
|
||||||
return ColoredBox(
|
return DecoratedBox(
|
||||||
|
decoration: BoxDecoration(
|
||||||
color: bgColor,
|
color: bgColor,
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: bgColor,
|
||||||
|
offset: const Offset(0, -2),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user