bootstrap_alert 1.0.1 copy "bootstrap_alert: ^1.0.1" to clipboard
bootstrap_alert: ^1.0.1 copied to clipboard

Bootstrap Alerts for Flutter.

Default isDismissable autoCloseDuration
Default Alerts Dismissible Alerts AutoCloseDuration Alerts

bootstrap_alert package helps to show some alerts to users. This package was inspired by Bootstrap.

Getting started #

Add the package in pubspec.yaml.

dependencies:
    bootstrap_alert: latest

Usage #

Default Primary Alert

BootstrapAlert(
    visible: true,
    status: AlertStatus.primary,
    text: 'Default Primary Alert',
),

Warning with Icon Alert

BootstrapAlert(
    visible: true,
    status: AlertStatus.warning,
    leadingIcon: AlertIcons.warning,
    text: 'Warning Alert with Icon',
),

Success with Icon and Dismiss Button Alert

BootstrapAlert(
    visible: true,
    status: AlertStatus.success,
    leadingIcon: AlertIcons.success,
    isDismissible: true,
    text: 'Success Alert with Icon',
),

Danger with Icon, Dismiss Button and Auto Close Alert

BootstrapAlert(
    visible: true,
    status: AlertStatus.danger,
    leadingIcon: AlertIcons.warning,
    isDismissible: true,
    autoCloseDuration: Duration(seconds: 1),
    text: 'Danger Alert with Icon, Dismiss Button and Auto Close',
),

Primary with BorderRadius Alert

BootstrapAlert(
    visible: true,
    text: 'Danger Alert with Icon, Dismiss Button and Auto Close',
    borderRadius: BorderRadius.only(
        topLeft: Radius.circular(36),
        bottomRight: Radius.circular(36),
    ),
),

Primary with Padding Alert

BootstrapAlert(
    visible: true,
    text: 'Danger Alert with Icon, Dismiss Button and Auto Close',
    padding: EdgeInsets.all(4),
),