easy_dialog 1.0.5

logo

pub package  GitHub stars  GitHub     LinkedIn  LinkedIn
Open Source Love


Easy Dialog package helps you easily create basic or custom dialogs. For extended documentation visit project pub package.

Star ⭐ this repo if you like our project. We would love your support. #

💾 Installation #

In the dependencies: section of your pubspec.yaml, add the following line:

dependencies:
  easy_dialog: <latest version>

📦 Usage #

Import this class #

import 'package:easy_dialog/easy_dialog.dart';

Basic structure #

EasyDialog(
        title: Text("Basic Easy Dialog Title"),
        description: Text("This is a basic dialog")).show(context);

🎯 Examples #

Let start creating simple but beautiful dialogs.
Here you have some basic examples of what can you build and let your creativity fly.

Network

🎨 Customization and Attributes #

All customizable attributes for easy_dialog

Attribute Name Example Value Description
topImage AssetImage("assets/topImage.png") Top image for decoration purpose with rounded top corners
title Text("Alert") Dialog title, located under topImage if exists
tittlePadding EdgeInsets.only(left: 8.0,right: 8.0) Title padding
description Text("Connection error") Dialog description, located between title and contentList
descriptionPadding EdgeInsets.only(left: 8.0,right: 8.0) Description padding
contentList [
Text("This is an extra text line"), FlatButton(onPressed: () {},
  child: Text("Okay"),),
]
Optional widget list, located in order before description
contentPadding EdgeInsets.all(12.0) Content padding. It wraps all widgets including title and description
height 200 Dialog height
width 250 Dialog width
cornerRadius 15.0 Dialog corner radius
fogOpacity 0.5 Fog opacity, sets the black fog opacity behind our dialog from 0 to 1
closeButton false Close button enable/disable

🧱 How to Contribute #

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

📃 MIT License #

Copyright (c) 2019 ricardonior29

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

1.0.5

Card color variable.

1.0.4

Flutter format to lib/easy_dialog.dart. Added an uploader.

1.0.3

Changes in readme files.

1.0.2

Clean example dir. Changes in readme files.

1.0.1

Minor changes-pubspec.yaml.

1.0.0

Initial Release.

example/README.md

logo

pub package  GitHub stars  GitHub     LinkedIn  LinkedIn
Open Source Love


Easy Dialog package helps you easily create basic or custom dialogs. For extended documentation visit project pub package.

Star ⭐ this repo if you like our project. We would love your support. #

🎨 Customization and Attributes #

All customizable attributes for easy_dialog

Attribute Name Example Value Description
topImage AssetImage("assets/topImage.png") Top image for decoration purpose with rounded top corners
title Text("Alert") Dialog title, located under topImage if exists
tittlePadding EdgeInsets.only(left: 8.0,right: 8.0) Title padding
description Text("Connection error") Dialog description, located between title and contentList
descriptionPadding EdgeInsets.only(left: 8.0,right: 8.0) Description padding
contentList [
Text("This is an extra text line"), FlatButton(onPressed: () {},
  child: Text("Okay"),),
]
Optional widget list, located in order before description
contentPadding EdgeInsets.all(12.0) Content padding. It wraps all widgets including title and description
height 200 Dialog height
width 250 Dialog width
cornerRadius 15.0 Dialog corner radius
fogOpacity 0.5 Fog opacity, sets the black fog opacity behind our dialog from 0 to 1
closeButton false Close button enable/disable

🎯 Examples #

Import this class #

import 'package:easy_dialog/easy_dialog.dart';

Basic Dialog 1 #

Network
EasyDialog(

      title: Text(
        "Basic Easy Dialog Title",
        style: TextStyle(fontWeight: FontWeight.bold),
        textScaleFactor: 1.2,
      ),
      
      description: Text(
        "This is a basic dialog. Easy Dialog helps 
        	you easily create basic or custom dialogs.",
        textScaleFactor: 1.1,
        textAlign: TextAlign.center,
      )
      
    ).show(context);
              
       
       
              

Basic Dialog 2 #

Network
EasyDialog(

      title: Text(
        "Basic Easy Dialog Title",
        style: TextStyle(fontWeight: FontWeight.bold),
        textScaleFactor: 1.2,
      ),
      
      description: Text(
        "This is a basic dialog. Easy Dialog helps 
        	you easily create basic or custom dialogs.",
        textScaleFactor: 1.1,
        textAlign: TextAlign.center,
      ),
      
      topImage: NetworkImage("https://raw.githubusercontent.com/
      	ricardonior29/easy_dialog/master/example/assets/topImageblack.png"),
      height: 180,
      
    ).show(context);

Basic Dialog 3 #

Network
EasyDialog(
      title: Text(
        "Basic Easy Dialog Title",
        style: TextStyle(fontWeight: FontWeight.bold),
        textScaleFactor: 1.2,
      ),
      description: Text(
        "This is a basic dialog. Easy Dialog helps 
        	you easily create basic or custom dialogs.",
        textScaleFactor: 1.1,
        textAlign: TextAlign.center,
      ),
      topImage: NetworkImage("https://raw.githubusercontent.com/
          	ricardonior29/easy_dialog/master/example/assets/topImageblack.png"),
      height: 220,
      contentList: [
        Row(
          mainAxisAlignment: MainAxisAlignment.end,
          children: <Widget>[
            new FlatButton(
              padding: const EdgeInsets.only(top: 8.0),
              textColor: Colors.lightBlue,
              onPressed: () {
                Navigator.of(context).pop();
              },
              child: new Text("Accept",
                textScaleFactor: 1.2,
              ),),
            new FlatButton(
              padding: const EdgeInsets.only(top: 8.0),
              textColor: Colors.lightBlue,
              onPressed: () {
                Navigator.of(context).pop();
              },
              child: new Text("Cancel",
                textScaleFactor: 1.2,
              ),),
           ],)
      ]).show(context);

Custom Dialog 1 #

Network
EasyDialog(
      closeButton: false,
      cornerRadius: 10.0,
      fogOpacity: 0.1,
      width: 280,
      height: 220,
      title: Text(
        "Custom Easy Dialog Title",
        style: TextStyle(fontWeight: FontWeight.bold),
        textScaleFactor: 1.2,
      ),
      descriptionPadding:
          EdgeInsets.only(left: 17.5, right: 17.5, bottom: 15.0),
      description: Text(
        "This is a custom dialog. Easy Dialog 
        	helps you easily create basic or custom dialogs.",
        textScaleFactor: 1.1,
        textAlign: TextAlign.center,
      ),
      topImage: NetworkImage(
          "https://raw.githubusercontent.com/
          	ricardonior29/easy_dialog/master/example/assets/topImageblack.png"),
      contentPadding:
          EdgeInsets.only(top: 12.0), // Needed for the button design
      contentList: [
        Container(
          width: double.infinity,
          decoration: BoxDecoration(
              color: Colors.greenAccent,
              borderRadius: BorderRadius.only(
                  bottomLeft: Radius.circular(10.0),
                  bottomRight: Radius.circular(10.0))),
          child: FlatButton(
            onPressed: () {
              Navigator.of(context).pop();},
            child: Text("Okay",
              textScaleFactor: 1.3,
            ),),
        ),
      ]).show(context);

Custom Dialog 2 #

Network
EasyDialog(
      cornerRadius: 15.0,
      fogOpacity: 0.1,
      width: 280,
      height: 180,
      contentPadding:
          EdgeInsets.only(top: 12.0), // Needed for the button design
      contentList: [
        Expanded(
          flex: 1,
          child: Row(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              Padding(padding: EdgeInsets.only(left: 30.0)),
              Text("Rate",
                style: TextStyle(fontWeight: FontWeight.bold),
                textScaleFactor: 1.3,
              ),
              Padding(padding: EdgeInsets.only(left: 10.0)),
              Row(
                mainAxisSize: MainAxisSize.min,
                children: List.generate(5, (index) {
                  return Icon(
                    index < 3 ? Icons.star : Icons.star_border,
                    size: 30.0,
                    color: Colors.orange,
                  );
                }),
              )],),
        ),
        Expanded(
            flex: 3,
            child: Padding(
              padding: EdgeInsets.all(10.0),
              child: TextFormField(
                maxLines: 5,
                decoration: InputDecoration(
                  border: InputBorder.none,
                  hintText: "Add review",
                ),
              ),
            )),
        Container(
          width: double.infinity,
          decoration: BoxDecoration(
              color: Colors.greenAccent,
              borderRadius: BorderRadius.only(
                  bottomLeft: Radius.circular(10.0),
                  bottomRight: Radius.circular(10.0))),
          child: FlatButton(
            onPressed: () {
              Navigator.of(context).pop();
            },
            child: Text("Rate",
              textScaleFactor: 1.3,
            ),),
        ),
      ]).show(context);

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

Use this package as a library

1. Depend on it

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


dependencies:
  easy_dialog: ^1.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:easy_dialog/easy_dialog.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
83
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
91
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

22 out of 22 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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
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