rich_alert 0.1.2 copy "rich_alert: ^0.1.2" to clipboard
rich_alert: ^0.1.2 copied to clipboard

outdated

Flutter Alert Dialogs for the "rich". Used for rendering beautiful untraditional alert dialogs in Flutter apps.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:rich_alert/rich_alert.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Rich Alert Dialog'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'This is to test the rich dialog',
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          /// Use case scenario for the rich alert dialog
          showDialog(
              context: context,
              builder: (BuildContext context) {
                return RichAlertDialog(
                  alertTitle: title("Alert title"),
                  alertSubtitle: richSubtitle("Subtitle"),
                  alertType: RichAlertType.WARNING,
                  actions: <Widget>[
                    Text("hello"),
                    Text("its me"),
                  ],
                );
              });
        },
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
30
likes
0
pub points
66%
popularity

Publisher

unverified uploader

Flutter Alert Dialogs for the "rich". Used for rendering beautiful untraditional alert dialogs in Flutter apps.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

cupertino_icons, flutter

More

Packages that depend on rich_alert