Skip to content

Instantly share code, notes, and snippets.

@loic-sharma
Created March 3, 2025 18:18
Show Gist options
  • Save loic-sharma/a6fa46b011bc1ac8d32470adf2e84844 to your computer and use it in GitHub Desktop.
Save loic-sharma/a6fa46b011bc1ac8d32470adf2e84844 to your computer and use it in GitHub Desktop.
Cupertino bottom sheet broken with Cupertino sliver navigation bar
import 'package:flutter/cupertino.dart';
void main() {
runApp(
CupertinoApp(
home: CupertinoPageScaffold(
child: CustomScrollView(
slivers: [
CupertinoSliverNavigationBar(
largeTitle: Text('My app'),
),
SliverToBoxAdapter(
child: Builder(
builder: (context) {
return CupertinoButton(
child: Text('Open sheet'),
onPressed: () {
showCupertinoSheet(context: context, pageBuilder: (context) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(),
child: Center(child: Text('My sheet')),
);
});
},
);
},
),
),
]
),
),
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment