abhi_flutter_alertdialog 0.0.5

abhi_flutter_alertdialog #

A new Flutter package.

AlertDialog #

This project deals with flutter alert dialog's package, a library module containing code that can be utilised in flutter projects to create a alert dialog.

A customized alert dialog can be obtained using the available parameters.

For help getting started with abhi_flutter-alertdialog, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Dependency #

  abhi_flutter_alertdialog: [latest version]

Customization #

Alert dialog can be customized using the parameters available

** Content **

These parameters are the basic parameter used to display details of the alert dialog.

  • Title : String format title to be displayed.
  • Content : String format content to be displayed.
  • action1 : Button 1 text to be displayed.
  • action2 : Button 2 text to be displayed.

** Functional **

These parameters are used to perform action on the button clicks. You need to pass the function to the parameter so that the operation is performed on button click.

  • function1 : This is the function to be performed on first button click.
  • function2 : This is the function to be performed on second button click.


  functionB(BuildContext context) {

** Design **

These parameters are used to customize design changes to the alert dialog.

  • div : Add a divider line in the dialog above buttons.

  • txtAlign : Align the text to left, center and right using this key.

              - left   : 1
              - center : 2
              - right  : 3
  • radius : Radius of the alert box can be specified in double format.

  • boxColor : Box background color can be specified.

  • btnTxtColor : Button text color can be specified.

  • txtColor : Title, Content text color is specified.

Usage #

A sample dialog showing the usage of the library.

    context: context,
    builder: (context) => AlertDialog1(
      context: context,
      title: 'Welcome ',
      content: 'Hi how are you',
      action1: 'continue',
      action2: 'cancel',
      function1: () => functionA(),
      function2: () => functionB(context),
      div: true,
      txtAlign: 1,
      radius: 2.0,
      boxColor: Colors.white,
      btnTxtColor: Colors.blue,
      txtColor: Colors.black,

Alert_Dialog Alert_Dialog Alert_Dialog Alert_Dialog Alert_Dialog Alert_Dialog

[0.0.5] - TODO: Add release date.

  • TODO: Describe initial release.

Use this package as a library

1. Depend on it

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

  abhi_flutter_alertdialog: ^0.0.5

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:abhi_flutter_alertdialog/abhi_flutter_alertdialog.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health issues and suggestions

Document public APIs. (-0.09 points)

31 out of 32 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/alertdialog.dart. (-1 points)

Analysis of lib/src/alertdialog.dart reported 2 hints:

line 2 col 8: Unused import: 'package:flutter/foundation.dart'.

line 7 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: AlertDialog1.context, AlertDialog1.title, AlertDialog1.content, AlertDialog1.action1, AlertDialog1.action2, AlertDialog1.function1, AlertDialog1.function2, AlertDialog1.boxColor, AlertDialog1.txtColor, AlertDialog1.btnTxtColor, AlertDialog1.radius, AlertDialog1.div, AlertDialog1.txtAlign, AlertDialog1.align

Maintenance suggestions

Update README.md. (-12 points)

6 image links are insecure (e.g. http://www.androidcoding.in/wp-content/uploads/flutter_1.png), use https URLs instead.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and abhi_flutter_alertdialog.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

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.

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies