multiple_dialog 0.0.4 copy "multiple_dialog: ^0.0.4" to clipboard
multiple_dialog: ^0.0.4 copied to clipboard

outdated

This is a magazine with multiple material designs

multiple_dialog #

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

Getting Started #

How to use #

multiple_dialog: ^0.0.3

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

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
likes
0
pub points
0%
popularity

Publisher

unverified uploader

This is a magazine with multiple material designs

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on multiple_dialog