结合CupertinoPageScaffold、CustomScrollView、CupertinoSliverNavigationBar
class MyPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return CupertinoPageScaffold(
child: CustomScrollView(
slivers: [
CupertinoSliverNavigationBar(
largeTitle: Text('大标题'), // 大标题
previousPageTitle: '返回', // 返回按钮文字
trailing: CupertinoButton( // 右侧按钮
padding: EdgeInsets.zero,
child: Icon(CupertinoIcons.search),
onPressed: () {},
),
border: Border( // 底部分割线
bottom: BorderSide(
color: "#F5F5F5".toColor,
width: 1,
),
),
),
// 内容区域
SliverToBoxAdapter(
child: Column(
children: [
SizedBox(
height: AppScreenAdaptor.width(12, 16),
),
// 其他内容...
],
),
),
],
),
);
}
}