Created
March 3, 2025 18:18
-
-
Save loic-sharma/a6fa46b011bc1ac8d32470adf2e84844 to your computer and use it in GitHub Desktop.
Cupertino bottom sheet broken with Cupertino sliver navigation bar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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