Last updated:
0 purchases
glimpse
Glimpse #
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,
constraints: BoxConstraints(maxHeight: 300), // optional
dismissible: true, // optional
builder: (context) => Text('Hello, world!'),
);
copied to clipboard
Route #
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());
}
copied to clipboard
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!');
},
),
);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.