glimpse 0.0.3 copy "glimpse: ^0.0.3" to clipboard
glimpse: ^0.0.3 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!');
        },
    ),
);
7
likes
0
pub points
44%
popularity

Publisher

unverified uploader

A general-purpose modal sheet inspired by AirPods.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, screen_corners, smooth_corner

More

Packages that depend on glimpse