Open jhonatn opened 1 year ago
I had to make my own; this was taken from one of the examples in the repo though:
class LargeAppBarWrapper extends StatelessWidget {
const LargeAppBarWrapper({
super.key,
required this.title,
required this.children,
});
final String title;
final List<Widget> children;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return PlatformScaffold(
iosContentPadding: true,
body: CustomScrollView(
slivers: [
PlatformWidget(
material: (context, _) => SliverAppBar.medium(
backgroundColor: theme.appBarTheme.backgroundColor,
title: Text(
title,
),
),
cupertino: (context, _) => CupertinoSliverNavigationBar(
largeTitle: Text(
title,
),
),
),
SliverSafeArea(
top: false,
sliver: SliverList(
delegate: SliverChildListDelegate(children),
),
),
],
),
);
}
}
Is it possible for us to have a Platform widget for SliverAppBar (material) and CupertinoSliverNavigationBar?