rich_alert 0.1.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 82

rich_alert #

An alert dialog package for the "rich". This package helps you to render an un-traditional alert dialog in your Flutter app 😃

Adding to your flutter project #

Add rich_alert as a dependency in your pubspec.yaml file

rich_alert: ^0.1.1

Use the package #

Import the library in your dart file

import 'package:rich_alert/rich_alert.dart';

Example #

showDialog(
  context: context,
  builder: (BuildContext context) {
    return RichAlertDialog( //uses the custom alert dialog
      alertTitle: title("Alert title"),
      alertSubtitle: richSubtitle("Subtitle"),
      alertType: RichAlertType.WARNING,      
    );
  }
);

Check examples

Screenshots #

Add screenshots here

0.1.1 - 2018-12-09 #

  • Minor fixes

0.1.0 - 2018-12-09 #

  • Initial release

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

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  rich_alert: ^0.1.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:rich_alert/rich_alert.dart';
  
Version Uploaded Documentation Archive
0.1.32 Dec 9, 2018 Go to the documentation of rich_alert 0.1.32 Download rich_alert 0.1.32 archive
0.1.31 Dec 9, 2018 Go to the documentation of rich_alert 0.1.31 Download rich_alert 0.1.31 archive
0.1.3 Dec 9, 2018 Go to the documentation of rich_alert 0.1.3 Download rich_alert 0.1.3 archive
0.1.2 Dec 9, 2018 Go to the documentation of rich_alert 0.1.2 Download rich_alert 0.1.2 archive
0.1.1 Dec 9, 2018 Go to the documentation of rich_alert 0.1.1 Download rich_alert 0.1.1 archive
0.1.0 Dec 9, 2018 Go to the documentation of rich_alert 0.1.0 Download rich_alert 0.1.0 archive
0.0.1 Dec 9, 2018 Go to the documentation of rich_alert 0.0.1 Download rich_alert 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
63
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
82
Learn more about scoring.

We analyzed this package on Feb 14, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13
  • Flutter: 1.2.0

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
cupertino_icons ^0.1.2 0.1.2
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test