All Projects → inRush → TipDialog

inRush / TipDialog

Licence: MIT license
flutter tip dialog

Programming Languages

dart
5743 projects
objective c
16641 projects - #2 most used programming language
shell
77523 projects
java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to TipDialog

Android Circledialog
仿IOS圆角对话框、进度条、列表框、输入框,ad广告框,支持横竖屏切换
Stars: ✭ 880 (+1028.21%)
Mutual labels:  dialog, loading
android-blog-samples
source code for my blog~
Stars: ✭ 32 (-58.97%)
Mutual labels:  dialog, loading
Vue Ui For Pc
基于Vue2.x的一套PC端UI组件,包括了Carousel 跑马灯、Cascader 级联、Checkbox 多选框、Collapse 折叠面板、DatePicker 日期选择、Dialog 对话框、Form 表单、Input 输入框、InputNumber 数字输入框、Layer 弹窗层、Loading 加载、Menu 菜单、Page 分页、Progress 进度条、Radio 单选框、SelectDropDown 仿select、Switch 开关、Table 表格、Tabs 标签页、Textarea 文本框、Tooltip 文字提示、BackTop 返回顶部、steps 步骤条、Transfer 穿梭框、Tree 树形、Upload 文件上传、Lazy 图片懒加载、Loading 加载、Pagination 分页等等
Stars: ✭ 156 (+100%)
Mutual labels:  dialog, loading
Android Loading Dialog
这个是我在泡网看见的一个等待的dialog
Stars: ✭ 297 (+280.77%)
Mutual labels:  dialog, loading
Dialogutil
common used dialog with material style ( in support v7),ios style,get top activity automatically, invoke everywhere (any thread , any window)
Stars: ✭ 948 (+1115.38%)
Mutual labels:  dialog, loading
Aiforms.dialogs
AiForms.Dialogs for Xamarin.Forms
Stars: ✭ 143 (+83.33%)
Mutual labels:  dialog, loading
Loadingbar
极简使用的解耦Loading组件 - http://blog.csdn.net/aa464971/article/details/70197394
Stars: ✭ 179 (+129.49%)
Mutual labels:  dialog, loading
ember-contextual-services
Services in Ember are scoped to the app as a whole and are singletons. Sometimes you don't want that. :) This addon provides ephemeral route-based services.
Stars: ✭ 20 (-74.36%)
Mutual labels:  loading
ngx-simple-modal
A simple unopinionated framework to implement simple modal based behaviour in angular (v2+) projects.
Stars: ✭ 50 (-35.9%)
Mutual labels:  dialog
FabDialog
🎈 Fab into Dialog Animation on Android
Stars: ✭ 36 (-53.85%)
Mutual labels:  dialog
spinners-angular
Lightweight SVG/CSS spinners for Angular
Stars: ✭ 21 (-73.08%)
Mutual labels:  loading
flutter page tracker
flutter埋点、弹窗埋点、页面埋点事件捕获框架,支持普通页面的页面曝光事件(PageView),页面离开事件(PageExit)。支持在TabView和PageView组件中发送页面曝光和页面离开
Stars: ✭ 103 (+32.05%)
Mutual labels:  dialog
CompatAlertDialog
No description or website provided.
Stars: ✭ 27 (-65.38%)
Mutual labels:  dialog
react-spring-bottom-sheet
Accessible ♿️, Delightful ✨, & Fast 🚀
Stars: ✭ 604 (+674.36%)
Mutual labels:  dialog
Talkit
Non-Linear Game Dialogue Editor
Stars: ✭ 83 (+6.41%)
Mutual labels:  dialog
few shot dialogue generation
Dialogue Knowledge Transfer Networks (DiKTNet)
Stars: ✭ 24 (-69.23%)
Mutual labels:  dialog
react-positioning-portal
The positioning portal is a low level React component to build all kinds of absolutely positioned flyouts which are anchored to another element in the viewport.
Stars: ✭ 18 (-76.92%)
Mutual labels:  ui-component
colr pickr
Colr Pickr, a vanilla JavaScript color picker component built with SVGs, with features like saving colors. Similar design to the chrome-dev-tools color picker.
Stars: ✭ 27 (-65.38%)
Mutual labels:  ui-component
dynamic-dialogs
Display improved dialogs and dialog fragments on Android.
Stars: ✭ 33 (-57.69%)
Mutual labels:  dialog
GradientLoading
No description or website provided.
Stars: ✭ 12 (-84.62%)
Mutual labels:  loading

TipDialog

  1. Please use 3.0.0 or above version, because earlier versions have serious performance issues
  2. if example no working, please google questions about Flutter upgrade AndroidX, AndroidX Migration - Flutterblock
  3. if run your app, it shows Error: Cannot run with sound null safety, please upgrade version to 4.0.0 Reference

中文版

A Flutter Tip Dialog

Loading Type Dialog Success Tye Dialog Fail Type Dialog
Loading Success Fail
Info Type Dialog Only Icon Dialog Onl Text Dialog
Info OnlyIcon OnlyText
Custom Icon Dialog Custom Body Dialog
CustomIcon CustomBody

1. Depend on it

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

dependencies:
  tip_dialog: ^4.0.0

2. Install it

You can install packages from the command line: with Flutter:

$ flutter packages get

3. Import it

Now in your Dart code, you can use:

import 'package:tip_dialog/tip_dialog.dart';

4. Use

Available attributes

/// [TipDialogContainer]
@required this.child,
/// automatically disappear time
this.duration: const Duration(seconds: 3),
/// mask layer alpha
this.maskAlpha: 0.3
// outside touchable, default false
// if true and onOutsideTouch not set, when use TipDialogHelper.loading(), you can touch mask layer to dismiss
// if true and onOutsideTouch set, when touching the mask layer, onOutsideTouch will be called.
this.outsideTouchable: false
// outside touch callback {@link OutsideTouchCallback}
this.onOutsideTouch

Global Use

/// Use [TipDialogContainer] globally
/// This widget can be globally supported
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'TipDialog Demo',
      theme: new ThemeData(),
      home: Stack(
        children: <Widget>[
          MyHomePage(title: 'TipDialog Demo Home Page'),
          // add [TipDialogContainer] widget here
          TipDialogContainer(duration: const Duration(seconds: 2))
        ],
      ),
    );
  }
}
/// use TipDialogHelper to show or dismiss tip
  Widget build(BuildContext context) {
    return new Scaffold(
        appBar: new AppBar(
          title: new Text(widget.title),
          elevation: 0.5,
        ),
        body: new ListView(children: <Widget>[
          _buildItem("Loading Type Tip Dialog", () async {
            TipDialogHelper.loading("Loading");
            await new Future.delayed(new Duration(seconds: 5));
            TipDialogHelper.dismiss();
          }),
          new Divider(),
          _buildItem("Success Type Tip Dialog", () async {
            TipDialogHelper.success("Loaded Successfully");
          }),
          new Divider(),
          _buildItem("Only text Tip Dialog", () async {
            TipDialogHelper.show(new TipDialog(
              type: TipDialogType.NOTHING,
              tip: "Do Not Repeat",
            ));
          }),
          new Divider(),
          _buildItem("Custom Icon Tip Dialog", () async {
            TipDialogHelper.show(new TipDialog.customIcon(
              icon: new Icon(
                Icons.file_download,
                color: Colors.white,
                size: 30.0,
                textDirection: TextDirection.ltr,
              ),
              tip: "Download",
            ));
          }),
          new Divider(),
          _buildItem("Custom Body Tip Dialog", () async {
            TipDialogHelper.show(new TipDialog.builder(
              bodyBuilder: (context) {
                return new Container(
                  width: 120.0,
                  height: 90.0,
                  alignment: Alignment.center,
                  child: new Text(
                    "Custom",
                    style: new TextStyle(color: Colors.white),
                    /// if TipDialogContainer are outside of MaterialApp,
                    /// here is a must to set
                    textDirection: TextDirection.ltr,
                  ),
                );
              },
              color: Colors.blue.withAlpha(150),
            ));
          }),
          new Divider(),
        ]));
  }

Use a custom widget when using [TipDialogContainer] globally, there may be appear some unexpected errors. such as Text or Icon, will appear similar to the following error.

No Directionality widget found.

Just set TextDirection just fine. See the custom Widget in the example for details.

5. Default Dialog Type

enum TipDialogType { NOTHING, LOADING, SUCCESS, FAIL, INFO }

NOTHING: no icon
LOADING: have a loading icon
SUCCESS: have a success icon
FAIL: have a fail icon
INFO: have a info icon
CUSTOM: custom tip dialog type, just a sign, do nothing

6. TipDialogHelper Method

/// tipDialog: Need to display the widget
///
/// isAutoDismiss: decide whether to disappear automatically, default is true
/// if true, the dialog will not automatically disappear
/// otherwise, the dialog will automatically disappear after the [Duration] set by [TipDialogContainer]
void show(Widget tipDialog, {bool isAutoDismiss: true});

/// dismiss dialog
void dismiss();

/// show info dialog
void info(String tip);
/// show fail dialog
void fail(String errMsg);
/// show success dialog
void success(String success);
/// show loading dialog
void loading(String loadingTip);

See the example directory for more details.

7. Change log

[4.0.0]

  • migrating to null safety

[3.1.0]

  • add outside touchable features

[3.0.0]

  • fix performance issues
  • easier way to call

[2.1.0]

  • add TipDialogHelper and deprecated TipDialogConnector

[2.0.1]

  • fix dismiss bug
  • upgrade android build gradle to 5.1.1

[2.0.0]

  • set default auto dismiss duration as 2 seconds
  • delete [TipDialogContainer] Partial parameters -- show -- outSideTouchable -- defaultTip -- defaultType
  • change show method parameter isLoading to isAutoDismiss
  • force display mask layer

[1.1.2] - (MODIFY)

  • fix infinite call dismiss bug
  • fixed an issue where setting the isLoading value is invalid

[1.1.1] - (MODIFY)

  • fix bugs that occur when using globally

[1.1.0] - (FUNCTION CHANGE)

  • add tip dialog global support

[1.0.1] - (MODIFY).

  • fix loading view version bug.
  • set default loading duration

[1.0.0] - first release.

  • add release.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].