overlay_options_button 0.0.1 copy "overlay_options_button: ^0.0.1" to clipboard
overlay_options_button: ^0.0.1 copied to clipboard

A widget that displays a selected value and expands into an overlayed list of alternatives when pressed.

overlay_options_button #

A widget that displays a selected value and expands into an overlayed list of alternatives when pressed.

Usage #

One use case is a locale picker that expands into a floating list of available languages anchored to the currently selected language.

OverlayOptionsButton(
    initialValue: locale,
    items: supportedLocales,
    onChanged: (value) => locale = value,
    itemBuilder: (context, index, value, select) {
        return IconButton(
            onPressed: () => select(),
            icon: SizedBox.square(
                dimension: 24.0,
                child: ClipOval(
                    child: SvgPicture.asset(
                        resolveAssetFromLocale(locale),
                        fit: BoxFit.cover,
                    ),
                ),
            ),
        );
    },
);
0
likes
150
points
12
downloads

Documentation

API reference

Publisher

verified publishertiagomlbrasil.com

Weekly Downloads

A widget that displays a selected value and expands into an overlayed list of alternatives when pressed.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on overlay_options_button