![](https://private-user-images.githubusercontent.com/25728414/262762848-bdd3284f-4c54-4ae4-8c65-c2fbc880247f.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc4NTMxNTAsIm5iZiI6MTcxNzg1Mjg1MCwicGF0aCI6Ii8yNTcyODQxNC8yNjI3NjI4NDgtYmRkMzI4NGYtNGM1NC00YWU0LThjNjUtYzJmYmM4ODAyNDdmLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjA4VDEzMjA1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgyOTRjNzEwMTRiMTA4NDZlNjdiNTc2ODgwNzU2YTFkMDc2MzgyZjMzNjRmY2FjMWRmMDU0MTQ2YWYwZmY3NWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.CK8UulbvBQ2QaeB1PDuNuTi2_XYC4LYtO4B3aLw5Rt4)
A minimalistic modal sheet inspired by AirPods that can be used to present quick information, such as onboarding, permissions, notifications, statuses, or bulletins.
import 'package:glimpse/glimpse.dart';
await showGlimpse(
context: context,
height: 450, // optional
dismissible: true, // optional
builder: (context) => Text('Bonjour'),
);
When using a route, you should also insert a initializeGlimpse()
before your runApp()
call to manually initialize Glimpse. It is required for calculating the correct corner radius of the modal sheet on iOS.
void main() async {
await initializeGlimpse();
// ...
runApp(YourApp());
}
When you've done that, you can use the GlimpseModalRoute
to present a modal sheet:
import 'package:glimpse/glimpse.dart';
await Navigator.of(context).push(
GlimpseModalRoute(
builder: (BuildContext context) {
return Text('Bonjour!');
},
),
);