multiple_dialog 0.1.6

multiple_dialog #

This is a magazine with multiple material designs。 including loadingDialog, alertDialog, listDialog and continuous addition。。。。。 Then you can also add custom Dialog, if you have any Suggestions welcome to raise issues on github, if you think it is helpful to you, welcome start.

build status Pub support

Getting Started #

multiple_dialog: ^0.1.6

import 'package:multiple_dialog/multiple_dialog.dart';

1. showLoadingDialog #

RaisedButton(
            elevation: 10,
            child: Text(
              "showLoadingDialog",
            ),
            onPressed: () {
              showLoadingDialog(
                  context: context,
                  direction: Direction(
                    message: "加载中",
                    messageStyle:TextStyle();
                    orientations: Orientations.Horizontal,
                    width: 120,
                    height:120,
                  ));
            },
          ),

2. showAlertDialog #

     RaisedButton(
            elevation: 10,
            child: Text("showAlertDialog"),
            onPressed: () {
              showAlertDialog(
                  context: context,
                  title: Text("标题"),
                  content: Text("我是内容"),
                  semanticLabel: "AlertDialog扩展",
                  actions: <Widget>[
                    FlatButton(
                      child: Text("确认"),
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    ),
                    FlatButton(
                      child: Text("取消"),
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    ),
                  ]);
            },
          ),

3. showBottomDialog #

  RaisedButton(
              elevation: 10,
              child: Text(
                "showBottomDialog",
                style: _style(),
              ),
              onPressed: () {
                showBottomDialog(
                  context: context,
                  title: Text("标题"),
                  content: Container(child: Text("我是内容")),
                  isScrollControlled: true,
                  actions: <Widget>[
                    FlatButton(
                      child: Text("确认"),
                      onPressed: () {
                        Navigator.pop(context);
                      },
                    ),
                    FlatButton(
                      child: Text("取消"),
                      onPressed: () {
                        Navigator.pop(context);
                      },
                    ),
                  ],
                );
              }),

4. showCustomAlertDialog #

 RaisedButton(
            child: Text("showCustomAlertDialog",),
            elevation: 10,
            onPressed: () {
              showCustomAlertDialog(
                  context: context,
                  dialogBuilder: DialogBuilder(
                    simpleBuilder: SimpleBuilder(
                      title: Text("标题"),
                      content: SingleChildScrollView(
                        child: ListBody(
                          children: <Widget>[
                            for (var i in list)
                              InkWell(
                                child: Text(i),
                                onTap: () {
                                  print(i);
                                },
                              ),
                          ],
                        ),
                      ),
                    ),
                  ),
                  confirmWidget: Text("确认"),
                  cancelWidget: Text("取消"),
                  onConfirmCallBack: () {
                    Navigator.pop(context);
                  },
                  onCancelCallBack: () {
                    Navigator.pop(context);
                  });
            },
          ),

5. showCustomSimpleDialog #

 RaisedButton(
            child: Text(
              "showCustomDialog",
            ),
            elevation: 10,
            onPressed: () {
              showCustomDialog(
                context: context,
                simpleBuilder: SimpleBuilder(),
                children: <Widget>[Text("自定义CustomDialog")],
              );
            },
          ),

6. SimpleListDialog #

 RaisedButton(
            child: Text("showSimpleListDialog"),
            elevation: 10,
            onPressed: () {
              showSimpleListDialog(
                  context: context,
                  simpleBuilder: SimpleBuilder(),
                  children: <Widget>[
                    for (var i in list) Text(i),
                  ],
                  onItemCallBack: (index) {
                    print(list[index]);
                  });
            },
          ),
          

7. CustomDialog #

gravity changes the position from top to bottom by (-1~1) #
    showCustomDialog(
           context: context,
           gravity: 0,
           child: Text("showCustomDialog"));
                        

If you want to customize the Dialog, you can override showCustomDialog or showCustomAlertDialog #

LICENES #

Copyright 2019 Lans

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

[0.0.1] - New library and continuous addition。。。。。。

[0.0.2] - change loadingDialog,add api ,add example

[0.0.3] - change showBottomDialog,add CustomAlertDialog、CustomDialog

[0.0.4] - add showSimpleListDialog and override CustomDialog

[0.1.0] - fix bug and now release

[0.1.1] - add analysis_options.yaml

[0.1.2] - change analysis_options.yaml

[0.1.3] - Analysis

[0.1.4] - Analysis

[0.1.5] - remove showBottomDialog,if you want to use it , see example

[0.1.6] - change showCustomDialog to showCustomSimpleDialog ,add new showCustomDialog,change showLoadingDialog and more useful

example/README.md

multiple_dialog #

This is a magazine with multiple material designs。 including loadingDialog, alertDialog, bottomDialog, listDialog and continuous addition。。。。。

Getting Started #

multiple_dialog: ^0.1.5

import 'package:multiple_dialog/multiple_dialog.dart';

1. showLoadingDialog #

RaisedButton(
            elevation: 10,
            child: Text(
              "showLoadingDialog",
            ),
            onPressed: () {
              showLoadingDialog(
                context: context,
                backgroundColor: Colors.white,
                direction: Direction.Vertical,
              );
            },
          ),

2. showAlertDialog #

     RaisedButton(
            elevation: 10,
            child: Text("showAlertDialog"),
            onPressed: () {
              showAlertDialog(
                  context: context,
                  title: Text("标题"),
                  content: Text("我是内容"),
                  semanticLabel: "AlertDialog扩展",
                  actions: <Widget>[
                    FlatButton(
                      child: Text("确认"),
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    ),
                    FlatButton(
                      child: Text("取消"),
                      onPressed: () {
                        Navigator.of(context).pop();
                      },
                    ),
                  ]);
            },
          ),

3. showBottomDialog #

  RaisedButton(
              elevation: 10,
              child: Text(
                "showBottomDialog",
                style: _style(),
              ),
              onPressed: () {
                showBottomDialog(
                  context: context,
                  title: Text("标题"),
                  content: Container(child: Text("我是内容")),
                  isScrollControlled: true,
                  actions: <Widget>[
                    FlatButton(
                      child: Text("确认"),
                      onPressed: () {
                        Navigator.pop(context);
                      },
                    ),
                    FlatButton(
                      child: Text("取消"),
                      onPressed: () {
                        Navigator.pop(context);
                      },
                    ),
                  ],
                );
              }),

4. showCustomAlertDialog #

 RaisedButton(
            child: Text("showCustomAlertDialog",),
            elevation: 10,
            onPressed: () {
              showCustomAlertDialog(
                  context: context,
                  dialogBuilder: DialogBuilder(
                    simpleBuilder: SimpleBuilder(
                      title: Text("标题"),
                      content: SingleChildScrollView(
                        child: ListBody(
                          children: <Widget>[
                            for (var i in list)
                              InkWell(
                                child: Text(i),
                                onTap: () {
                                  print(i);
                                },
                              ),
                          ],
                        ),
                      ),
                    ),
                  ),
                  confirmWidget: Text("确认"),
                  cancelWidget: Text("取消"),
                  onConfirmCallBack: () {
                    Navigator.pop(context);
                  },
                  onCancelCallBack: () {
                    Navigator.pop(context);
                  });
            },
          ),

5. showCustomDialog #

 RaisedButton(
            child: Text(
              "showCustomDialog",
            ),
            elevation: 10,
            onPressed: () {
              showCustomDialog(
                context: context,
                simpleBuilder: SimpleBuilder(),
                children: <Widget>[Text("自定义CustomDialog")],
              );
            },
          ),

6. SimpleListDialog #

 RaisedButton(
            child: Text("showSimpleListDialog"),
            elevation: 10,
            onPressed: () {
              showSimpleListDialog(
                  context: context,
                  simpleBuilder: SimpleBuilder(),
                  children: <Widget>[
                    for (var i in list) Text(i),
                  ],
                  onItemCallBack: (index) {
                    print(list[index]);
                  });
            },
          ),
          

If you want to customize the Dialog, you can override showCustomDialog or showCustomAlertDialog #

A few resources to get you started if this is your first Flutter project:

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

LICENES #

Copyright 2019 Lans

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Use this package as a library

1. Depend on it

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


dependencies:
  multiple_dialog: ^0.1.6

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:multiple_dialog/multiple_dialog.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
26
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]
63
Learn more about scoring.

We analyzed this package on Jul 17, 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.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/multiple_dialog.dart.

Run flutter format to format lib/multiple_dialog.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
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

Admin