rich_alert 0.0.1

  • README.md
  • Example
  • Installing
  • Versions
  • 80

rich_flutter_dialog #

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_flutter_dialog as a dependency in your pubspec.yaml file

rich_flutter_dialog: ^0.0.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

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.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub 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]
80
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
80
Learn more about scoring.

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

  • Dart: 2.3.1
  • pana: 0.12.16
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

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