glimpse 0.0.8 copy "glimpse: ^0.0.8" to clipboard
glimpse: ^0.0.8 copied to clipboard

A general-purpose modal sheet inspired by AirPods.

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!'),
);

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());
}

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!');
        },
    ),
);
6
likes
140
pub points
56%
popularity

Publisher

unverified uploader

A general-purpose modal sheet inspired by AirPods.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, screen_corners, smooth_corner

More

Packages that depend on glimpse