From 3b455b56b60c675455535708b3e176a5653bcca2 Mon Sep 17 00:00:00 2001 From: xuyingjun Date: Mon, 30 Dec 2019 19:44:08 +0800 Subject: [PATCH 01/26] v1.0.15 addCallBack --- .idea/workspace.xml | 207 ++++++++++++++++++++------ CHANGELOG.md | 6 +- README.md | 40 ++++- README_CN.md | 40 ++++- example/lib/dialog/alert_dialog.dart | 39 +++++ example/lib/dialog/notice_dialog.dart | 6 + example/lib/main.dart | 3 + example/pubspec.lock | 2 +- lib/flutter_custom_dialog.dart | 13 ++ pubspec.yaml | 2 +- 10 files changed, 292 insertions(+), 66 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 01b7955..b40cb42 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,8 +1,20 @@ + + + + + + + + + + + @@ -50,48 +62,102 @@ - + - + - + - + + + - + + + - + - + + - + - + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -99,8 +165,8 @@ - - + + @@ -108,6 +174,15 @@ + + + + + + + + + @@ -125,6 +200,10 @@ SNAPSHOTSNAPSHOT SNAPSHOT + showNotice + animatedFunc + showC + scaleIn @@ -134,16 +213,22 @@ - @@ -151,8 +236,8 @@ - + @@ -238,10 +323,10 @@ - + - + @@ -249,18 +334,18 @@ - - + - + - + - - + + + @@ -324,57 +409,81 @@ - + - - + + - + - - + + + + - + - - + + - + - - + + + + + - - + + - - + + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CHANGELOG.md b/CHANGELOG.md index e1ec8ae..1f40780 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,4 +57,8 @@ ## 1.0.14 -* remove log \ No newline at end of file +* remove log + +## 1.0.15 + +* add callback \ No newline at end of file diff --git a/README.md b/README.md index 42db5a3..dbe9130 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Global dialog function encapsulation, with a semantic way to fill the content in ```yaml dependencies: - flutter_custom_dialog: ^1.0.14 + flutter_custom_dialog: ^1.0.15 ``` **2、import** @@ -219,18 +219,42 @@ import 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; dialog property Settings can be called through the method of member variables, as detailed in the following table ```dart -YYDialog YYDialogDemo(BuildContext context) { - return YYDialog().build(context) - ..width = 220 - ..height = 500 - ..barrierColor = Colors.black.withOpacity(.3) +YYDialog YYNoticeDialog() { + return YYDialog().build() + ..width = 120 + ..height = 110 + ..backgroundColor = Colors.black.withOpacity(0.8) + ..borderRadius = 10.0 + ..showCallBack = () { + print("showCallBack invoke"); + } + ..dismissCallBack = () { + print("dismissCallBack invoke"); + } + ..widget(Padding( + padding: EdgeInsets.only(top: 21), + child: Image.asset( + 'images/success.png', + width: 38, + height: 38, + ), + )) + ..widget(Padding( + padding: EdgeInsets.only(top: 10), + child: Text( + "Success", + style: TextStyle( + fontSize: 15, + color: Colors.white, + ), + ), + )) ..animatedFunc = (child, animation) { return ScaleTransition( child: child, scale: Tween(begin: 0.0, end: 1.0).animate(animation), ); } - ..borderRadius = 4.0 ..show(); } ``` @@ -250,6 +274,8 @@ backgroundColor|Dialog backgroundColor|white borderRadius|Dialog borderRadius|0.0 constraints|Dialog constraints|no constraints animatedFunc|Animation of dialog|Emerge from the middle +showCallBack|dialog show callbacks|not +dismissCallBack|dialog dismiss callbacks|not barrierDismissible|Whether to click to pop up the external disappear|true Supported method diff --git a/README_CN.md b/README_CN.md index e8dfa79..9f6aece 100644 --- a/README_CN.md +++ b/README_CN.md @@ -15,7 +15,7 @@ ```yaml dependencies: - flutter_custom_dialog: ^1.0.14 + flutter_custom_dialog: ^1.0.15 ``` **2、import** @@ -217,18 +217,42 @@ import 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; 弹窗的属性设置可以通过成员变量的方法去调用,具体详见下表 ```dart -YYDialog YYDialogDemo(BuildContext context) { - return YYDialog().build(context) - ..width = 220 - ..height = 500 - ..barrierColor = Colors.black.withOpacity(.3) +YYDialog YYNoticeDialog() { + return YYDialog().build() + ..width = 120 + ..height = 110 + ..backgroundColor = Colors.black.withOpacity(0.8) + ..borderRadius = 10.0 + ..showCallBack = () { + print("showCallBack invoke"); + } + ..dismissCallBack = () { + print("dismissCallBack invoke"); + } + ..widget(Padding( + padding: EdgeInsets.only(top: 21), + child: Image.asset( + 'images/success.png', + width: 38, + height: 38, + ), + )) + ..widget(Padding( + padding: EdgeInsets.only(top: 10), + child: Text( + "Success", + style: TextStyle( + fontSize: 15, + color: Colors.white, + ), + ), + )) ..animatedFunc = (child, animation) { return ScaleTransition( child: child, scale: Tween(begin: 0.0, end: 1.0).animate(animation), ); } - ..borderRadius = 4.0 ..show(); } ``` @@ -248,6 +272,8 @@ backgroundColor|弹窗内的背景色|白色 borderRadius|弹窗圆角|0.0 constraints|弹窗约束|无 animatedFunc|弹窗出现的动画|从中间出现 +showCallBack|弹窗展示的回调|无 +dismissCallBack|弹窗消失的回调|无 barrierDismissible|是否点击弹出外部消失|true 支持的方法 diff --git a/example/lib/dialog/alert_dialog.dart b/example/lib/dialog/alert_dialog.dart index 7498e90..7794e45 100644 --- a/example/lib/dialog/alert_dialog.dart +++ b/example/lib/dialog/alert_dialog.dart @@ -484,3 +484,42 @@ YYDialog YYAlertDialogCustomXY() { ) ..show(80.0, 100.0); } + +YYDialog YYNoticeDialogCallback() { + return YYDialog().build() + ..width = 120 + ..height = 110 + ..backgroundColor = Colors.black.withOpacity(0.8) + ..borderRadius = 10.0 + ..showCallBack = () { + print("showCallBack invoke"); + } + ..dismissCallBack = () { + print("dismissCallBack invoke"); + } + ..widget(Padding( + padding: EdgeInsets.only(top: 21), + child: Image.asset( + 'images/success.png', + width: 38, + height: 38, + ), + )) + ..widget(Padding( + padding: EdgeInsets.only(top: 10), + child: Text( + "Success", + style: TextStyle( + fontSize: 15, + color: Colors.white, + ), + ), + )) + ..animatedFunc = (child, animation) { + return ScaleTransition( + child: child, + scale: Tween(begin: 0.0, end: 1.0).animate(animation), + ); + } + ..show(); +} diff --git a/example/lib/dialog/notice_dialog.dart b/example/lib/dialog/notice_dialog.dart index b34104c..21931da 100644 --- a/example/lib/dialog/notice_dialog.dart +++ b/example/lib/dialog/notice_dialog.dart @@ -25,5 +25,11 @@ YYDialog YYNoticeDialog() { ), ), )) + ..animatedFunc = (child, animation) { + return ScaleTransition( + child: child, + scale: Tween(begin: 0.0, end: 1.0).animate(animation), + ); + } ..show(); } diff --git a/example/lib/main.dart b/example/lib/main.dart index c1ced12..2a6d449 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -94,6 +94,9 @@ showAlertDialog(BuildContext context) { makeTextButton("notice", () { YYNoticeDialog(); }), + makeTextButton("callback", () { + YYNoticeDialogCallback(); + }), ], ), Text("2、dialog property"), diff --git a/example/pubspec.lock b/example/pubspec.lock index 18bd9d1..40de0da 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -47,7 +47,7 @@ packages: path: ".." relative: true source: path - version: "1.0.13" + version: "1.0.14" flutter_test: dependency: "direct dev" description: flutter diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index 4339440..9e2ba1a 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -23,6 +23,9 @@ class YYDialog { bool barrierDismissible = true; //是否点击弹出外部消失 EdgeInsets margin = EdgeInsets.all(0.0); //弹窗布局的外边距 + Function() showCallBack; //展示的回调 + Function() dismissCallBack; //消失的回调 + get isShowing => _isShowing; //当前弹窗是否可见 bool _isShowing = false; @@ -280,6 +283,16 @@ class YYDialog { child: CustomDialogChildren( widgetList: widgetList, isShowingChange: (bool isShowingChange) { + // showing or dismiss Callback + if (isShowingChange) { + if (showCallBack != null) { + showCallBack(); + } + } else { + if (dismissCallBack != null) { + dismissCallBack(); + } + } _isShowing = isShowingChange; }, ), diff --git a/pubspec.yaml b/pubspec.yaml index d313a44..97a724f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_custom_dialog description: Semantic dialog -version: 1.0.14 +version: 1.0.15 author: AndroidHensen homepage: https://github.com/YYFlutter/flutter-custom-dialog.git From 2f3d02d2004e14b20a2ca43444334abfacc8a54b Mon Sep 17 00:00:00 2001 From: slavap Date: Thu, 30 Jan 2020 19:37:04 -0800 Subject: [PATCH 02/26] decoration param added; warnings eliminated. --- lib/flutter_custom_dialog.dart | 9 +++++---- lib/flutter_custom_dialog_widget.dart | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index 9e2ba1a..2a2dabe 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -17,6 +17,7 @@ class YYDialog { bool gravityAnimationEnable = false; //弹窗出现的位置带有的默认动画是否可用 Color barrierColor = Colors.black.withOpacity(.3); //弹窗外的背景色 Color backgroundColor = Colors.white; //弹窗内的背景色 + Decoration decoration; double borderRadius = 0.0; //弹窗圆角 BoxConstraints constraints; //弹窗约束 Function(Widget child, Animation animation) animatedFunc; //弹窗出现的动画 @@ -275,7 +276,7 @@ class YYDialog { padding: EdgeInsets.all(borderRadius / 3.14), width: width ?? null, height: height ?? null, - decoration: BoxDecoration( + decoration: decoration ?? BoxDecoration( borderRadius: BorderRadius.circular(borderRadius), color: backgroundColor, ), @@ -384,10 +385,10 @@ class YYDialog { ///弹窗的内容作为可变组件 class CustomDialogChildren extends StatefulWidget { - List widgetList = []; //弹窗内部所有组件 - Function(bool) isShowingChange; + final List widgetList; //弹窗内部所有组件 + final Function(bool) isShowingChange; - CustomDialogChildren({this.widgetList, this.isShowingChange}); + CustomDialogChildren({this.widgetList = const [], this.isShowingChange}); @override CustomDialogChildState createState() => CustomDialogChildState(); diff --git a/lib/flutter_custom_dialog_widget.dart b/lib/flutter_custom_dialog_widget.dart index f90bb87..fe80bb2 100644 --- a/lib/flutter_custom_dialog_widget.dart +++ b/lib/flutter_custom_dialog_widget.dart @@ -12,9 +12,9 @@ class YYRadioListTile extends StatefulWidget { }) : assert(items != null), super(key: key); - List items; - Color activeColor; - Function(int) onChanged; + final List items; + final Color activeColor; + final Function(int) onChanged; @override State createState() { From edf2e8454d997b5870a89823cf48261c9fd390d8 Mon Sep 17 00:00:00 2001 From: xuyingjun Date: Fri, 31 Jan 2020 13:58:36 +0800 Subject: [PATCH 03/26] v1.0.16 --- CHANGELOG.md | 6 +++++- README.md | 6 +++++- README_CN.md | 6 +++++- lib/flutter_custom_dialog.dart | 7 ++++--- pubspec.lock | 14 +++++++------- pubspec.yaml | 2 +- 6 files changed, 27 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f40780..b676664 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,4 +61,8 @@ ## 1.0.15 -* add callback \ No newline at end of file +* add callback + +## 1.0.16 + +* add decoration property \ No newline at end of file diff --git a/README.md b/README.md index dbe9130..3d66906 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Global dialog function encapsulation, with a semantic way to fill the content in ```yaml dependencies: - flutter_custom_dialog: ^1.0.15 + flutter_custom_dialog: ^1.0.16 ``` **2、import** @@ -270,6 +270,7 @@ gravity|Where the dialog appears|center gravityAnimationEnable|The dialog appears with the default animation available|false margin|The margin of a dialog|EdgeInsets.all(0.0) barrierColor|Dialog barrierColor|30% of black +decoration|Dialog decoration|null backgroundColor|Dialog backgroundColor|white borderRadius|Dialog borderRadius|0.0 constraints|Dialog constraints|no constraints @@ -278,6 +279,9 @@ showCallBack|dialog show callbacks|not dismissCallBack|dialog dismiss callbacks|not barrierDismissible|Whether to click to pop up the external disappear|true +* After setting gravity, set gravityAnimationEnable = true if animation is needed +* If the decoration property is set, the backgroundColor and borderRadius are not in effect; they are mutually exclusive + Supported method method|description diff --git a/README_CN.md b/README_CN.md index 9f6aece..2dd54c6 100644 --- a/README_CN.md +++ b/README_CN.md @@ -15,7 +15,7 @@ ```yaml dependencies: - flutter_custom_dialog: ^1.0.15 + flutter_custom_dialog: ^1.0.16 ``` **2、import** @@ -268,6 +268,7 @@ gravity|弹窗出现的位置|居中 gravityAnimationEnable|弹窗出现的位置带有的默认动画是否可用|false margin|弹窗的外边距|EdgeInsets.all(0.0) barrierColor|弹窗外的背景色|30%黑色 +decoration|弹窗内的装饰|null backgroundColor|弹窗内的背景色|白色 borderRadius|弹窗圆角|0.0 constraints|弹窗约束|无 @@ -276,6 +277,9 @@ showCallBack|弹窗展示的回调|无 dismissCallBack|弹窗消失的回调|无 barrierDismissible|是否点击弹出外部消失|true +* 设置完gravity后,若需要动画则设置gravityAnimationEnable = true +* 若设置decoration属性,则backgroundColor和borderRadius不生效,他们是互斥关系 + 支持的方法 method|description diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index 2a2dabe..8a49d2e 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -16,14 +16,15 @@ class YYDialog { Gravity gravity = Gravity.center; //弹窗出现的位置 bool gravityAnimationEnable = false; //弹窗出现的位置带有的默认动画是否可用 Color barrierColor = Colors.black.withOpacity(.3); //弹窗外的背景色 - Color backgroundColor = Colors.white; //弹窗内的背景色 - Decoration decoration; - double borderRadius = 0.0; //弹窗圆角 BoxConstraints constraints; //弹窗约束 Function(Widget child, Animation animation) animatedFunc; //弹窗出现的动画 bool barrierDismissible = true; //是否点击弹出外部消失 EdgeInsets margin = EdgeInsets.all(0.0); //弹窗布局的外边距 + Decoration decoration; //弹窗内的装饰,与backgroundColor和borderRadius互斥 + Color backgroundColor = Colors.white; //弹窗内的背景色 + double borderRadius = 0.0; //弹窗圆角 + Function() showCallBack; //展示的回调 Function() dismissCallBack; //消失的回调 diff --git a/pubspec.lock b/pubspec.lock index aebdafa..7642229 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,14 +7,14 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.2.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.0.4" charcode: dependency: transitive description: @@ -52,28 +52,28 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.7" + version: "1.1.6" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" + version: "1.6.2" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.8.0+1" + version: "1.7.0" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.0.3" sky_engine: dependency: transitive description: flutter @@ -106,7 +106,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.0.4" term_glyph: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 97a724f..8465280 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_custom_dialog description: Semantic dialog -version: 1.0.15 +version: 1.0.16 author: AndroidHensen homepage: https://github.com/YYFlutter/flutter-custom-dialog.git From ed138410fabbe633d1395ca330ad7cce01ba05de Mon Sep 17 00:00:00 2001 From: xuyingjun Date: Fri, 31 Jan 2020 14:02:56 +0800 Subject: [PATCH 04/26] add description --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 8465280..3c10201 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: flutter_custom_dialog -description: Semantic dialog +description: Semantic dialog | Made In YY.inc | Welcome to contribute version: 1.0.16 author: AndroidHensen homepage: https://github.com/YYFlutter/flutter-custom-dialog.git From 625af8094d8922cffa60d21ad10f97332703ca19 Mon Sep 17 00:00:00 2001 From: Mehmet Date: Tue, 24 Mar 2020 18:31:11 +0300 Subject: [PATCH 05/26] value paramater added to "RadioItem" initialValue added to "listViewOfRadioButton", "listview_dialog.dart" file in example folder is updated with new feature --- example/lib/dialog/listview_dialog.dart | 10 ++++++++++ lib/flutter_custom_dialog.dart | 4 ++++ lib/flutter_custom_dialog_widget.dart | 17 ++++++++++++----- pubspec.yaml | 2 +- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/example/lib/dialog/listview_dialog.dart b/example/lib/dialog/listview_dialog.dart index d2f242c..ff6d22f 100644 --- a/example/lib/dialog/listview_dialog.dart +++ b/example/lib/dialog/listview_dialog.dart @@ -63,54 +63,63 @@ var radioItems = [ RadioItem( padding: EdgeInsets.only(left: 6.0), text: "None", + value: 1, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Callisto", + value: 11, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Ganymede", + value: 7, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Luna", + value: 6, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Oberon", + value: 4, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Phobos", + value: 18, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Dione", + value: 16, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "James", + value: 10, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Lina", + value: 25, color: Colors.black, fontSize: 16.0, ), @@ -151,6 +160,7 @@ YYDialog YYListViewDialogListRadio() { ..listViewOfRadioButton( items: radioItems, height: 370, + intialValue: 7, activeColor: Colors.deepPurpleAccent, onClickItemListener: (index) { var radioItem = radioItems[index]; diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index 8a49d2e..bd98d88 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -206,6 +206,7 @@ class YYDialog { List items, double height, Color activeColor, + int intialValue, Function(int) onClickItemListener, }) { Size size = MediaQuery.of(context).size; @@ -219,6 +220,7 @@ class YYDialog { ), child: YYRadioListTile( items: items, + intialValue: intialValue, activeColor: activeColor, onChanged: onClickItemListener, ), @@ -572,6 +574,7 @@ class RadioItem { RadioItem({ this.padding, this.text, + this.value, this.color, this.fontSize, this.fontWeight, @@ -580,6 +583,7 @@ class RadioItem { EdgeInsets padding; String text; + int value; Color color; double fontSize; FontWeight fontWeight; diff --git a/lib/flutter_custom_dialog_widget.dart b/lib/flutter_custom_dialog_widget.dart index fe80bb2..c142d0e 100644 --- a/lib/flutter_custom_dialog_widget.dart +++ b/lib/flutter_custom_dialog_widget.dart @@ -7,6 +7,7 @@ class YYRadioListTile extends StatefulWidget { YYRadioListTile({ Key key, this.items, + this.intialValue = 0, this.activeColor, this.onChanged, }) : assert(items != null), @@ -14,6 +15,7 @@ class YYRadioListTile extends StatefulWidget { final List items; final Color activeColor; + final intialValue; final Function(int) onChanged; @override @@ -24,25 +26,30 @@ class YYRadioListTile extends StatefulWidget { class YYRadioListTileState extends State { var groupId = 0; + var selectedItem = -1; @override Widget build(BuildContext context) { + if (selectedItem == -1) { + selectedItem = widget.intialValue != null ? widget.intialValue : 0; + } return ListView.builder( padding: EdgeInsets.all(0.0), shrinkWrap: true, itemCount: widget.items.length, itemBuilder: (BuildContext context, int index) { + var radioItem = widget.items[index]; return Material( color: Colors.white, child: RadioListTile( - title: Text(widget.items[index].text), - value: index, - groupValue: groupId, + title: Text(radioItem.text), + value: radioItem.value == null ? index : radioItem.value, + groupValue: selectedItem, activeColor: widget.activeColor, onChanged: (int value) { + print("change: " + value.toString()); setState(() { - widget.onChanged(value); - groupId = value; + selectedItem = value; }); }, ), diff --git a/pubspec.yaml b/pubspec.yaml index 3c10201..9d4e183 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_custom_dialog description: Semantic dialog | Made In YY.inc | Welcome to contribute -version: 1.0.16 +version: 1.0.20 author: AndroidHensen homepage: https://github.com/YYFlutter/flutter-custom-dialog.git From 15c6b4aeac1eb2596ff49ed4659bfbc9d3bcb3d7 Mon Sep 17 00:00:00 2001 From: Mehmet Date: Tue, 24 Mar 2020 19:38:00 +0300 Subject: [PATCH 06/26] Fixed Missing onChanged function --- lib/flutter_custom_dialog_widget.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flutter_custom_dialog_widget.dart b/lib/flutter_custom_dialog_widget.dart index c142d0e..c777b66 100644 --- a/lib/flutter_custom_dialog_widget.dart +++ b/lib/flutter_custom_dialog_widget.dart @@ -47,10 +47,10 @@ class YYRadioListTileState extends State { groupValue: selectedItem, activeColor: widget.activeColor, onChanged: (int value) { - print("change: " + value.toString()); setState(() { selectedItem = value; }); + widget.onChanged(value); }, ), ); From 93a9b7bc0a5a4675fd8d58413d872affb8829dae Mon Sep 17 00:00:00 2001 From: xuyingjun Date: Mon, 13 Apr 2020 18:16:56 +0800 Subject: [PATCH 07/26] v1.0.17 Initial value option added Radio List Dialog. --- CHANGELOG.md | 4 ++++ README.md | 2 +- README_CN.md | 2 +- example/lib/dialog/listview_dialog.dart | 11 +-------- example/pubspec.lock | 2 +- lib/flutter_custom_dialog.dart | 4 +--- lib/flutter_custom_dialog_widget.dart | 30 +++++++++++++++---------- pubspec.lock | 14 ++++++------ pubspec.yaml | 2 +- 9 files changed, 35 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b676664..a6444b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,4 +65,8 @@ ## 1.0.16 +* add decoration property + +## 1.0.17 + * add decoration property \ No newline at end of file diff --git a/README.md b/README.md index 3d66906..0a6a4ef 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Global dialog function encapsulation, with a semantic way to fill the content in ```yaml dependencies: - flutter_custom_dialog: ^1.0.16 + flutter_custom_dialog: ^1.0.17 ``` **2、import** diff --git a/README_CN.md b/README_CN.md index 2dd54c6..190ee48 100644 --- a/README_CN.md +++ b/README_CN.md @@ -15,7 +15,7 @@ ```yaml dependencies: - flutter_custom_dialog: ^1.0.16 + flutter_custom_dialog: ^1.0.17 ``` **2、import** diff --git a/example/lib/dialog/listview_dialog.dart b/example/lib/dialog/listview_dialog.dart index ff6d22f..6447b8b 100644 --- a/example/lib/dialog/listview_dialog.dart +++ b/example/lib/dialog/listview_dialog.dart @@ -63,63 +63,54 @@ var radioItems = [ RadioItem( padding: EdgeInsets.only(left: 6.0), text: "None", - value: 1, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Callisto", - value: 11, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Ganymede", - value: 7, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Luna", - value: 6, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Oberon", - value: 4, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Phobos", - value: 18, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Dione", - value: 16, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "James", - value: 10, color: Colors.black, fontSize: 16.0, ), RadioItem( padding: EdgeInsets.only(left: 6.0), text: "Lina", - value: 25, color: Colors.black, fontSize: 16.0, ), @@ -160,7 +151,7 @@ YYDialog YYListViewDialogListRadio() { ..listViewOfRadioButton( items: radioItems, height: 370, - intialValue: 7, + intialValue: 2, activeColor: Colors.deepPurpleAccent, onClickItemListener: (index) { var radioItem = radioItems[index]; diff --git a/example/pubspec.lock b/example/pubspec.lock index 40de0da..10ee4b2 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -47,7 +47,7 @@ packages: path: ".." relative: true source: path - version: "1.0.14" + version: "1.0.20" flutter_test: dependency: "direct dev" description: flutter diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index bd98d88..cb2d752 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -28,7 +28,7 @@ class YYDialog { Function() showCallBack; //展示的回调 Function() dismissCallBack; //消失的回调 - get isShowing => _isShowing; //当前弹窗是否可见 + get isShowing => _isShowing; //当前 弹窗是否可见 bool _isShowing = false; //============================================================================ @@ -574,7 +574,6 @@ class RadioItem { RadioItem({ this.padding, this.text, - this.value, this.color, this.fontSize, this.fontWeight, @@ -583,7 +582,6 @@ class RadioItem { EdgeInsets padding; String text; - int value; Color color; double fontSize; FontWeight fontWeight; diff --git a/lib/flutter_custom_dialog_widget.dart b/lib/flutter_custom_dialog_widget.dart index c777b66..7273d13 100644 --- a/lib/flutter_custom_dialog_widget.dart +++ b/lib/flutter_custom_dialog_widget.dart @@ -7,7 +7,7 @@ class YYRadioListTile extends StatefulWidget { YYRadioListTile({ Key key, this.items, - this.intialValue = 0, + this.intialValue, this.activeColor, this.onChanged, }) : assert(items != null), @@ -25,32 +25,38 @@ class YYRadioListTile extends StatefulWidget { } class YYRadioListTileState extends State { - var groupId = 0; - var selectedItem = -1; + var groupId = -1; + + void intialSelectedItem() { + //intialValue: + //The button initializes the position. + //If it is not filled, it is not selected. + if (groupId == -1) { + groupId = widget.intialValue ?? -1; + } + } @override Widget build(BuildContext context) { - if (selectedItem == -1) { - selectedItem = widget.intialValue != null ? widget.intialValue : 0; - } + intialSelectedItem(); + return ListView.builder( padding: EdgeInsets.all(0.0), shrinkWrap: true, itemCount: widget.items.length, itemBuilder: (BuildContext context, int index) { - var radioItem = widget.items[index]; return Material( color: Colors.white, child: RadioListTile( - title: Text(radioItem.text), - value: radioItem.value == null ? index : radioItem.value, - groupValue: selectedItem, + title: Text(widget.items[index].text), + value: index, + groupValue: groupId, activeColor: widget.activeColor, onChanged: (int value) { setState(() { - selectedItem = value; + widget.onChanged(value); + groupId = value; }); - widget.onChanged(value); }, ), ); diff --git a/pubspec.lock b/pubspec.lock index 7642229..aebdafa 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,14 +7,14 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.3.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" charcode: dependency: transitive description: @@ -52,28 +52,28 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.1.7" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" + version: "1.6.4" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0+1" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.5" sky_engine: dependency: transitive description: flutter @@ -106,7 +106,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" term_glyph: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 9d4e183..7658a0d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_custom_dialog description: Semantic dialog | Made In YY.inc | Welcome to contribute -version: 1.0.20 +version: 1.0.17 author: AndroidHensen homepage: https://github.com/YYFlutter/flutter-custom-dialog.git From 65d827dd44c7d4aef6a5b9b8c7579f73a1fa588b Mon Sep 17 00:00:00 2001 From: xuyingjun Date: Mon, 13 Apr 2020 18:26:56 +0800 Subject: [PATCH 08/26] v1.0.18 add color property for listRadio --- example/lib/dialog/listview_dialog.dart | 1 + lib/flutter_custom_dialog.dart | 11 +++++++---- lib/flutter_custom_dialog_widget.dart | 4 +++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/example/lib/dialog/listview_dialog.dart b/example/lib/dialog/listview_dialog.dart index 6447b8b..1f5037f 100644 --- a/example/lib/dialog/listview_dialog.dart +++ b/example/lib/dialog/listview_dialog.dart @@ -152,6 +152,7 @@ YYDialog YYListViewDialogListRadio() { items: radioItems, height: 370, intialValue: 2, + color: Colors.white, activeColor: Colors.deepPurpleAccent, onClickItemListener: (index) { var radioItem = radioItems[index]; diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index cb2d752..04d95dd 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -205,6 +205,7 @@ class YYDialog { YYDialog listViewOfRadioButton({ List items, double height, + Color color, Color activeColor, int intialValue, Function(int) onClickItemListener, @@ -221,6 +222,7 @@ class YYDialog { child: YYRadioListTile( items: items, intialValue: intialValue, + color: color, activeColor: activeColor, onChanged: onClickItemListener, ), @@ -279,10 +281,11 @@ class YYDialog { padding: EdgeInsets.all(borderRadius / 3.14), width: width ?? null, height: height ?? null, - decoration: decoration ?? BoxDecoration( - borderRadius: BorderRadius.circular(borderRadius), - color: backgroundColor, - ), + decoration: decoration ?? + BoxDecoration( + borderRadius: BorderRadius.circular(borderRadius), + color: backgroundColor, + ), constraints: constraints ?? BoxConstraints(), child: CustomDialogChildren( widgetList: widgetList, diff --git a/lib/flutter_custom_dialog_widget.dart b/lib/flutter_custom_dialog_widget.dart index 7273d13..4978476 100644 --- a/lib/flutter_custom_dialog_widget.dart +++ b/lib/flutter_custom_dialog_widget.dart @@ -8,12 +8,14 @@ class YYRadioListTile extends StatefulWidget { Key key, this.items, this.intialValue, + this.color, this.activeColor, this.onChanged, }) : assert(items != null), super(key: key); final List items; + final Color color; final Color activeColor; final intialValue; final Function(int) onChanged; @@ -46,7 +48,7 @@ class YYRadioListTileState extends State { itemCount: widget.items.length, itemBuilder: (BuildContext context, int index) { return Material( - color: Colors.white, + color: widget.color, child: RadioListTile( title: Text(widget.items[index].text), value: index, From 3523550e8c642ba37b3556320a715d329a6950e5 Mon Sep 17 00:00:00 2001 From: xuyingjun Date: Mon, 13 Apr 2020 18:27:26 +0800 Subject: [PATCH 09/26] v1.0.18 add color property for listRadio --- CHANGELOG.md | 6 +++++- README.md | 2 +- README_CN.md | 2 +- pubspec.yaml | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6444b2..5fe55a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,4 +69,8 @@ ## 1.0.17 -* add decoration property \ No newline at end of file +* add decoration property + +## 1.0.18 + +* add color property for listRadio \ No newline at end of file diff --git a/README.md b/README.md index 0a6a4ef..96e9dbb 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Global dialog function encapsulation, with a semantic way to fill the content in ```yaml dependencies: - flutter_custom_dialog: ^1.0.17 + flutter_custom_dialog: ^1.0.18 ``` **2、import** diff --git a/README_CN.md b/README_CN.md index 190ee48..ba7c28c 100644 --- a/README_CN.md +++ b/README_CN.md @@ -15,7 +15,7 @@ ```yaml dependencies: - flutter_custom_dialog: ^1.0.17 + flutter_custom_dialog: ^1.0.18 ``` **2、import** diff --git a/pubspec.yaml b/pubspec.yaml index 7658a0d..d935f0b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_custom_dialog description: Semantic dialog | Made In YY.inc | Welcome to contribute -version: 1.0.17 +version: 1.0.18 author: AndroidHensen homepage: https://github.com/YYFlutter/flutter-custom-dialog.git From 665670038df7be81a2d548352082b02c0339aaae Mon Sep 17 00:00:00 2001 From: xuyingjun Date: Mon, 13 Apr 2020 19:11:54 +0800 Subject: [PATCH 10/26] v1.0.19 fix a padding bug --- CHANGELOG.md | 6 +++++- README.md | 2 +- README_CN.md | 2 +- lib/flutter_custom_dialog.dart | 3 ++- pubspec.yaml | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fe55a3..d0231a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,4 +73,8 @@ ## 1.0.18 -* add color property for listRadio \ No newline at end of file +* add color property for listRadio + +## 1.0.19 + +* fix a padding bug \ No newline at end of file diff --git a/README.md b/README.md index 96e9dbb..19ef156 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Global dialog function encapsulation, with a semantic way to fill the content in ```yaml dependencies: - flutter_custom_dialog: ^1.0.18 + flutter_custom_dialog: ^1.0.19 ``` **2、import** diff --git a/README_CN.md b/README_CN.md index ba7c28c..539ca47 100644 --- a/README_CN.md +++ b/README_CN.md @@ -15,7 +15,7 @@ ```yaml dependencies: - flutter_custom_dialog: ^1.0.18 + flutter_custom_dialog: ^1.0.19 ``` **2、import** diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index 04d95dd..fb480e3 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -276,9 +276,10 @@ class YYDialog { crossAxisAlignment: crossAxisAlignment, children: [ Material( + clipBehavior: Clip.antiAlias, type: MaterialType.transparency, + borderRadius: BorderRadius.circular(borderRadius), child: Container( - padding: EdgeInsets.all(borderRadius / 3.14), width: width ?? null, height: height ?? null, decoration: decoration ?? diff --git a/pubspec.yaml b/pubspec.yaml index d935f0b..220c3ed 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_custom_dialog description: Semantic dialog | Made In YY.inc | Welcome to contribute -version: 1.0.18 +version: 1.0.19 author: AndroidHensen homepage: https://github.com/YYFlutter/flutter-custom-dialog.git From 0832042da8e84250600b8c68bab50ab67f3113a5 Mon Sep 17 00:00:00 2001 From: Dot Cink Date: Tue, 28 Apr 2020 16:45:22 +0800 Subject: [PATCH 11/26] add useRootNavigator parameter --- lib/flutter_custom_dialog.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index fb480e3..fd0103b 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -19,6 +19,7 @@ class YYDialog { BoxConstraints constraints; //弹窗约束 Function(Widget child, Animation animation) animatedFunc; //弹窗出现的动画 bool barrierDismissible = true; //是否点击弹出外部消失 + bool useRootNavigator = true; // see also Navigator.of() EdgeInsets margin = EdgeInsets.all(0.0); //弹窗布局的外边距 Decoration decoration; //弹窗内的装饰,与backgroundColor和borderRadius互斥 @@ -267,6 +268,7 @@ class YYDialog { barrierColor: barrierColor, animatedFunc: animatedFunc, barrierDismissible: barrierDismissible, + useRootNavigator: useRootNavigator, duration: duration, child: Padding( padding: margin, @@ -314,7 +316,7 @@ class YYDialog { void dismiss() { if (_isShowing) { - Navigator.of(context, rootNavigator: true).pop(); + Navigator.of(context, rootNavigator: useRootNavigator).pop(); } } @@ -425,6 +427,7 @@ class CustomDialog { Color _barrierColor; RouteTransitionsBuilder _transitionsBuilder; bool _barrierDismissible; + bool _useRootNavigator; Gravity _gravity; bool _gravityAnimationEnable; Function _animatedFunc; @@ -439,6 +442,7 @@ class CustomDialog { bool gravityAnimationEnable, Function animatedFunc, bool barrierDismissible, + bool useRootNavigator, }) : _child = child, _context = context, _gravity = gravity, @@ -447,8 +451,9 @@ class CustomDialog { _barrierColor = barrierColor, _animatedFunc = animatedFunc, _transitionsBuilder = transitionsBuilder, - _barrierDismissible = barrierDismissible { - this.show(); + _barrierDismissible = barrierDismissible, + _useRootNavigator = useRootNavigator { + this.show(); } show() { @@ -461,6 +466,7 @@ class CustomDialog { context: _context, barrierColor: _barrierColor ?? Colors.black.withOpacity(.3), barrierDismissible: _barrierDismissible ?? true, + useRootNavigator: _useRootNavigator ?? true, barrierLabel: "", transitionDuration: _duration ?? Duration(milliseconds: 250), transitionBuilder: _transitionsBuilder ?? _buildMaterialDialogTransitions, From 8bfc81e6e28e833863e3158a8821889c3494ec9b Mon Sep 17 00:00:00 2001 From: xuyingjun Date: Mon, 1 Jun 2020 17:37:11 +0800 Subject: [PATCH 12/26] add textfield demo --- example/lib/dialog/develop_dialog.dart | 18 ++++++++++++++++++ example/lib/main.dart | 5 +++++ 2 files changed, 23 insertions(+) create mode 100644 example/lib/dialog/develop_dialog.dart diff --git a/example/lib/dialog/develop_dialog.dart b/example/lib/dialog/develop_dialog.dart new file mode 100644 index 0000000..16e8898 --- /dev/null +++ b/example/lib/dialog/develop_dialog.dart @@ -0,0 +1,18 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; + +YYDialog YYFixTextFieldDialog() { + return YYDialog().build() + ..width = 120 + ..height = 110 + ..backgroundColor = Colors.white + ..borderRadius = 10.0 + ..gravity = Gravity.bottom + ..widget( + Padding( + padding: EdgeInsets.all(24), + child: TextField(), + ), + ) + ..show(); +} diff --git a/example/lib/main.dart b/example/lib/main.dart index 2a6d449..be828a5 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -8,6 +8,8 @@ import 'package:flutter_custom_dialog_example/dialog/progress_dialog.dart'; import 'package:flutter_custom_dialog_example/dialog/notice_dialog.dart'; import 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; +import 'dialog/develop_dialog.dart'; + void main() => runApp(MyApp()); var titleTextStyle = TextStyle(fontSize: 22, color: Colors.black); @@ -258,6 +260,9 @@ showDevelopDialog(BuildContext context) { )), ); }), + makeTextButton("fix textfield", () { + YYFixTextFieldDialog(); + }), ], ), ], From fed614bd08dfa1038166faf9db87835ccb9da2f9 Mon Sep 17 00:00:00 2001 From: xuyingjun Date: Tue, 2 Jun 2020 17:44:24 +0800 Subject: [PATCH 13/26] v1.0.20 --- CHANGELOG.md | 6 +++++- README.md | 3 ++- README_CN.md | 3 ++- example/pubspec.lock | 2 +- lib/flutter_custom_dialog.dart | 15 +++++++-------- pubspec.yaml | 2 +- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0231a5..eb84f80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,4 +77,8 @@ ## 1.0.19 -* fix a padding bug \ No newline at end of file +* fix a padding bug + +## 1.0.20 + +* add a useRootNavigator property \ No newline at end of file diff --git a/README.md b/README.md index 19ef156..d281d4a 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Global dialog function encapsulation, with a semantic way to fill the content in ```yaml dependencies: - flutter_custom_dialog: ^1.0.19 + flutter_custom_dialog: ^1.0.20 ``` **2、import** @@ -278,6 +278,7 @@ animatedFunc|Animation of dialog|Emerge from the middle showCallBack|dialog show callbacks|not dismissCallBack|dialog dismiss callbacks|not barrierDismissible|Whether to click to pop up the external disappear|true +useRootNavigator|Whether to use root navigation|true * After setting gravity, set gravityAnimationEnable = true if animation is needed * If the decoration property is set, the backgroundColor and borderRadius are not in effect; they are mutually exclusive diff --git a/README_CN.md b/README_CN.md index 539ca47..9f2784f 100644 --- a/README_CN.md +++ b/README_CN.md @@ -15,7 +15,7 @@ ```yaml dependencies: - flutter_custom_dialog: ^1.0.19 + flutter_custom_dialog: ^1.0.20 ``` **2、import** @@ -276,6 +276,7 @@ animatedFunc|弹窗出现的动画|从中间出现 showCallBack|弹窗展示的回调|无 dismissCallBack|弹窗消失的回调|无 barrierDismissible|是否点击弹出外部消失|true +useRootNavigator|是否使用根导航|true * 设置完gravity后,若需要动画则设置gravityAnimationEnable = true * 若设置decoration属性,则backgroundColor和borderRadius不生效,他们是互斥关系 diff --git a/example/pubspec.lock b/example/pubspec.lock index 10ee4b2..aa5283a 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -47,7 +47,7 @@ packages: path: ".." relative: true source: path - version: "1.0.20" + version: "1.0.19" flutter_test: dependency: "direct dev" description: flutter diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index fd0103b..fd072e9 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -19,9 +19,13 @@ class YYDialog { BoxConstraints constraints; //弹窗约束 Function(Widget child, Animation animation) animatedFunc; //弹窗出现的动画 bool barrierDismissible = true; //是否点击弹出外部消失 - bool useRootNavigator = true; // see also Navigator.of() EdgeInsets margin = EdgeInsets.all(0.0); //弹窗布局的外边距 + /// 用于有多个navigator嵌套的情况,默认为true + /// @params useRootNavigator=false,push是用的是当前布局的context + /// @params useRootNavigator=true,push是用的嵌套根布局的context + bool useRootNavigator = true; + Decoration decoration; //弹窗内的装饰,与backgroundColor和borderRadius互斥 Color backgroundColor = Colors.white; //弹窗内的背景色 double borderRadius = 0.0; //弹窗圆角 @@ -268,7 +272,6 @@ class YYDialog { barrierColor: barrierColor, animatedFunc: animatedFunc, barrierDismissible: barrierDismissible, - useRootNavigator: useRootNavigator, duration: duration, child: Padding( padding: margin, @@ -427,7 +430,6 @@ class CustomDialog { Color _barrierColor; RouteTransitionsBuilder _transitionsBuilder; bool _barrierDismissible; - bool _useRootNavigator; Gravity _gravity; bool _gravityAnimationEnable; Function _animatedFunc; @@ -442,7 +444,6 @@ class CustomDialog { bool gravityAnimationEnable, Function animatedFunc, bool barrierDismissible, - bool useRootNavigator, }) : _child = child, _context = context, _gravity = gravity, @@ -451,9 +452,8 @@ class CustomDialog { _barrierColor = barrierColor, _animatedFunc = animatedFunc, _transitionsBuilder = transitionsBuilder, - _barrierDismissible = barrierDismissible, - _useRootNavigator = useRootNavigator { - this.show(); + _barrierDismissible = barrierDismissible { + this.show(); } show() { @@ -466,7 +466,6 @@ class CustomDialog { context: _context, barrierColor: _barrierColor ?? Colors.black.withOpacity(.3), barrierDismissible: _barrierDismissible ?? true, - useRootNavigator: _useRootNavigator ?? true, barrierLabel: "", transitionDuration: _duration ?? Duration(milliseconds: 250), transitionBuilder: _transitionsBuilder ?? _buildMaterialDialogTransitions, diff --git a/pubspec.yaml b/pubspec.yaml index 220c3ed..9d4e183 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_custom_dialog description: Semantic dialog | Made In YY.inc | Welcome to contribute -version: 1.0.19 +version: 1.0.20 author: AndroidHensen homepage: https://github.com/YYFlutter/flutter-custom-dialog.git From d9b637aeb07a17a02fc65b289816a809edd66768 Mon Sep 17 00:00:00 2001 From: Daniel Carneiro Date: Tue, 10 Nov 2020 12:30:07 +0000 Subject: [PATCH 14/26] fix: type on readme file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d281d4a..4d07627 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![pub package](https://img.shields.io/pub/v/flutter_custom_dialog.svg)](https://pub.dev/packages/flutter_custom_dialog) -**[Lanuage ~~]** [English](README.md) | [中文文档](README_CN.md) +**[Language ~~]** [English](README.md) | [中文文档](README_CN.md) Global dialog function encapsulation, with a semantic way to fill the content inside the dialog, the current function provided From d085c4aa91ca0c8c4eae785e3953380674e75b97 Mon Sep 17 00:00:00 2001 From: JayYu Date: Mon, 18 Jan 2021 06:46:40 +0900 Subject: [PATCH 15/26] Add SpaceEvenly Gravity --- lib/flutter_custom_dialog.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index fd072e9..9ebc520 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -386,6 +386,9 @@ class YYDialog { case Gravity.right: mainAxisAlignment = MainAxisAlignment.end; break; + case Gravity.spaceEvenly: + mainAxisAlignment = MainAxisAlignment.spaceEvenly; + break; case Gravity.center: default: mainAxisAlignment = MainAxisAlignment.center; @@ -555,6 +558,7 @@ enum Gravity { leftTop, rightBottom, leftBottom, + spaceEvenly, } //============================================================================ From 48d687230fb92a1ace8834ed65f4a62fea03619b Mon Sep 17 00:00:00 2001 From: frozenrainyoo Date: Sat, 30 Jan 2021 23:31:01 +0900 Subject: [PATCH 16/26] Apply custom buttonPadding for doubleButton When button text length is short, doubleButton is hard to tab. so, need custom buttonPadding. --- lib/flutter_custom_dialog.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index fd072e9..a1d7708 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -102,12 +102,14 @@ class YYDialog { fontWeight1, fontFamily1, VoidCallback onTap1, + buttonPadding1 = const EdgeInsets.all(0.0), text2, color2, fontSize2, fontWeight2, fontFamily2, onTap2, + buttonPadding2 = const EdgeInsets.all(0.0), }) { return this.widget( SizedBox( @@ -122,7 +124,7 @@ class YYDialog { dismiss(); } }, - padding: EdgeInsets.all(0.0), + padding: buttonPadding1, child: Text( text1 ?? "", style: TextStyle( @@ -144,7 +146,7 @@ class YYDialog { dismiss(); } }, - padding: EdgeInsets.all(0.0), + padding: buttonPadding2, child: Text( text2 ?? "", style: TextStyle( From 6a9ab572ae45f3ab3360183a13316fd66dc83270 Mon Sep 17 00:00:00 2001 From: xuyingjun Date: Mon, 16 Aug 2021 17:34:06 +0800 Subject: [PATCH 17/26] 1.0.21 --- CHANGELOG.md | 6 ++- README.md | 2 +- README_CN.md | 2 +- example/.flutter-plugins-dependencies | 1 + example/lib/main.dart | 12 +++-- example/pubspec.lock | 70 +++++++++++++++------------ local.properties | 8 +++ pubspec.lock | 68 ++++++++++++++------------ pubspec.yaml | 12 +++-- 9 files changed, 110 insertions(+), 71 deletions(-) create mode 100644 example/.flutter-plugins-dependencies create mode 100644 local.properties diff --git a/CHANGELOG.md b/CHANGELOG.md index eb84f80..faf3749 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,4 +81,8 @@ ## 1.0.20 -* add a useRootNavigator property \ No newline at end of file +* add a useRootNavigator property + +## 1.0.21 + +* Add SpaceEvenly Gravity \ No newline at end of file diff --git a/README.md b/README.md index d281d4a..f7642f6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Global dialog function encapsulation, with a semantic way to fill the content in ```yaml dependencies: - flutter_custom_dialog: ^1.0.20 + flutter_custom_dialog: ^1.0.21 ``` **2、import** diff --git a/README_CN.md b/README_CN.md index 9f2784f..2534ac4 100644 --- a/README_CN.md +++ b/README_CN.md @@ -15,7 +15,7 @@ ```yaml dependencies: - flutter_custom_dialog: ^1.0.20 + flutter_custom_dialog: ^1.0.21 ``` **2、import** diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies new file mode 100644 index 0000000..a15985a --- /dev/null +++ b/example/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"android":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_custom_dialog","dependencies":[]}],"date_created":"2021-08-16 17:32:14.319764","version":"2.2.3"} \ No newline at end of file diff --git a/example/lib/main.dart b/example/lib/main.dart index be828a5..2d7693f 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -74,7 +74,7 @@ showAlertDialog(BuildContext context) { ), Row( children: [ - makeTextButton("bottomsheet", () { + makeTextButton("bottom\nsheet", () { YYBottomSheetDialog(); }), makeTextButton("progress", () { @@ -203,6 +203,12 @@ showAlertDialog(BuildContext context) { doubleButtonGravity: Gravity.center, ); }), + makeTextButton("space\nEvenly", () { + YYAlertDialogWithGravity( + width: 250.0, + doubleButtonGravity: Gravity.spaceEvenly, + ); + }), ], ), Text("5、dialog animation"), @@ -239,7 +245,7 @@ showDevelopDialog(BuildContext context) { Text("1、debug"), Row( children: [ - makeTextButton("fix dismiss\nbug in v1.0.1", () { + makeTextButton("fix dismiss\nbug", () { Navigator.push( context, MaterialPageRoute( @@ -272,7 +278,7 @@ showDevelopDialog(BuildContext context) { Widget makeTextButton(title, Function() function) { return SizedBox( - width: 70.0, + width: 65.0, height: 35.0, child: RaisedButton( padding: EdgeInsets.all(0.0), diff --git a/example/pubspec.lock b/example/pubspec.lock index aa5283a..f90a913 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,28 +7,42 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.6.1" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.2.0" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.11" + version: "1.15.0" cupertino_icons: dependency: "direct main" description: @@ -36,6 +50,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.2" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -47,7 +68,7 @@ packages: path: ".." relative: true source: path - version: "1.0.19" + version: "1.0.21" flutter_test: dependency: "direct dev" description: flutter @@ -59,35 +80,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.5" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.7" + version: "1.3.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0+1" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" + version: "1.8.0" sky_engine: dependency: transitive description: flutter @@ -99,55 +106,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.5" + version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.3" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.5" + version: "0.3.0" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.1.0" sdks: - dart: ">=2.2.2 <3.0.0" + dart: ">=2.12.0 <3.0.0" + flutter: ">=1.12.0" diff --git a/local.properties b/local.properties new file mode 100644 index 0000000..c154f3d --- /dev/null +++ b/local.properties @@ -0,0 +1,8 @@ +## This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# Location of the SDK. This is only used by Gradle. +# For customization when using a Version Control System, please read the +# header note. +#Mon Aug 16 16:54:26 CST 2021 +sdk.dir=C\:\\Users\\Administrator\\AppData\\Local\\Android\\Sdk diff --git a/pubspec.lock b/pubspec.lock index aebdafa..e9ed765 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,28 +7,49 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.6.1" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.2.0" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.11" + version: "1.15.0" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -45,35 +66,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.5" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.7" + version: "1.3.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.4" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0+1" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" + version: "1.8.0" sky_engine: dependency: transitive description: flutter @@ -85,55 +92,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.5" + version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.3" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.5" + version: "0.3.0" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.1.0" sdks: - dart: ">=2.2.2 <3.0.0" + dart: ">=2.12.0 <3.0.0" + flutter: ">=1.12.0" diff --git a/pubspec.yaml b/pubspec.yaml index 9d4e183..8aacb75 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,11 +1,11 @@ name: flutter_custom_dialog description: Semantic dialog | Made In YY.inc | Welcome to contribute -version: 1.0.20 -author: AndroidHensen +version: 1.0.21 homepage: https://github.com/YYFlutter/flutter-custom-dialog.git environment: sdk: ">=2.1.0 <3.0.0" + flutter: ">=1.10.0" dependencies: flutter: @@ -25,8 +25,12 @@ flutter: # be modified. They are used by the tooling to maintain consistency when # adding or updating assets for this project. plugin: - androidPackage: yy.inc.flutter_custom_dialog - pluginClass: FlutterCustomDialogPlugin + platforms: + android: + package: yy.inc.flutter_custom_dialog + pluginClass: FlutterCustomDialogPlugin + ios: + pluginClass: FlutterCustomDialogPlugin # To add assets to your plugin package, add an assets section, like this: # assets: From 634c6f0265d4f92fd9e64912eac3e37a5a4891a4 Mon Sep 17 00:00:00 2001 From: AndroidHensen Date: Mon, 16 Aug 2021 19:05:31 +0800 Subject: [PATCH 18/26] example --- example/.flutter-plugins-dependencies | 2 +- pubspec.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index a15985a..0f072fd 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"android":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_custom_dialog","dependencies":[]}],"date_created":"2021-08-16 17:32:14.319764","version":"2.2.3"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"android":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_custom_dialog","dependencies":[]}],"date_created":"2021-08-16 18:33:17.928565","version":"2.2.3"} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 8aacb75..940d09c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,6 +2,7 @@ name: flutter_custom_dialog description: Semantic dialog | Made In YY.inc | Welcome to contribute version: 1.0.21 homepage: https://github.com/YYFlutter/flutter-custom-dialog.git +publish_to: 'https://pub.dev' environment: sdk: ">=2.1.0 <3.0.0" From dd0f44b8ba644739ab65d12d2dae4d4e34bae919 Mon Sep 17 00:00:00 2001 From: AndroidHensen Date: Mon, 16 Aug 2021 19:20:48 +0800 Subject: [PATCH 19/26] RadioItem --- lib/flutter_custom_dialog_widget.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/flutter_custom_dialog_widget.dart b/lib/flutter_custom_dialog_widget.dart index 4978476..047f723 100644 --- a/lib/flutter_custom_dialog_widget.dart +++ b/lib/flutter_custom_dialog_widget.dart @@ -1,3 +1,5 @@ +import 'dart:ui'; + import 'package:flutter/material.dart'; import 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; @@ -50,7 +52,13 @@ class YYRadioListTileState extends State { return Material( color: widget.color, child: RadioListTile( - title: Text(widget.items[index].text), + title: Text( + widget.items[index].text, + style: TextStyle( + fontSize: widget.items[index].fontSize, + fontWeight: widget.items[index].fontWeight, + color: widget.items[index].color), + ), value: index, groupValue: groupId, activeColor: widget.activeColor, From 11c781813898640d981160f476a3545a583c56c3 Mon Sep 17 00:00:00 2001 From: AndroidHensen Date: Mon, 16 Aug 2021 20:12:46 +0800 Subject: [PATCH 20/26] #Migrate to null safety v1.1.0 --- CHANGELOG.md | 6 +- README.md | 2 +- README_CN.md | 2 +- example/.flutter-plugins-dependencies | 2 +- example/pubspec.lock | 1 - lib/flutter_custom_dialog.dart | 138 +++++++++++++------------- lib/flutter_custom_dialog_widget.dart | 29 +++--- pubspec.lock | 1 - pubspec.yaml | 4 +- 9 files changed, 95 insertions(+), 90 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index faf3749..2a6e983 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -85,4 +85,8 @@ ## 1.0.21 -* Add SpaceEvenly Gravity \ No newline at end of file +* Add SpaceEvenly Gravity + +## 1.1.0 + +* Migrate to null safety \ No newline at end of file diff --git a/README.md b/README.md index 43bb340..5c827aa 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Global dialog function encapsulation, with a semantic way to fill the content in ```yaml dependencies: - flutter_custom_dialog: ^1.0.21 + flutter_custom_dialog: ^1.1.0 ``` **2、import** diff --git a/README_CN.md b/README_CN.md index 2534ac4..4aec0e9 100644 --- a/README_CN.md +++ b/README_CN.md @@ -15,7 +15,7 @@ ```yaml dependencies: - flutter_custom_dialog: ^1.0.21 + flutter_custom_dialog: ^1.1.0 ``` **2、import** diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 0f072fd..f382161 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"android":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_custom_dialog","dependencies":[]}],"date_created":"2021-08-16 18:33:17.928565","version":"2.2.3"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"android":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_custom_dialog","dependencies":[]}],"date_created":"2021-08-16 20:01:06.563734","version":"2.2.3"} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index f90a913..e9049b7 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -158,4 +158,3 @@ packages: version: "2.1.0" sdks: dart: ">=2.12.0 <3.0.0" - flutter: ">=1.12.0" diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index 1bfac6f..598eb6a 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -7,17 +7,17 @@ export 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; class YYDialog { //================================弹窗属性====================================== List widgetList = []; //弹窗内部所有组件 - static BuildContext _context; //弹窗上下文 - BuildContext context; //弹窗上下文 + static BuildContext? _context; //弹窗上下文 + BuildContext? context; //弹窗上下文 - double width; //弹窗宽度 - double height; //弹窗高度 + double? width; //弹窗宽度 + double? height; //弹窗高度 Duration duration = Duration(milliseconds: 250); //弹窗动画出现的时间 Gravity gravity = Gravity.center; //弹窗出现的位置 bool gravityAnimationEnable = false; //弹窗出现的位置带有的默认动画是否可用 Color barrierColor = Colors.black.withOpacity(.3); //弹窗外的背景色 - BoxConstraints constraints; //弹窗约束 - Function(Widget child, Animation animation) animatedFunc; //弹窗出现的动画 + BoxConstraints? constraints; //弹窗约束 + Function(Widget child, Animation animation)? animatedFunc; //弹窗出现的动画 bool barrierDismissible = true; //是否点击弹出外部消失 EdgeInsets margin = EdgeInsets.all(0.0); //弹窗布局的外边距 @@ -26,12 +26,12 @@ class YYDialog { /// @params useRootNavigator=true,push是用的嵌套根布局的context bool useRootNavigator = true; - Decoration decoration; //弹窗内的装饰,与backgroundColor和borderRadius互斥 + Decoration? decoration; //弹窗内的装饰,与backgroundColor和borderRadius互斥 Color backgroundColor = Colors.white; //弹窗内的背景色 double borderRadius = 0.0; //弹窗圆角 - Function() showCallBack; //展示的回调 - Function() dismissCallBack; //消失的回调 + Function()? showCallBack; //展示的回调 + Function()? dismissCallBack; //消失的回调 get isShowing => _isShowing; //当前 弹窗是否可见 bool _isShowing = false; @@ -41,7 +41,7 @@ class YYDialog { _context = ctx; } - YYDialog build([BuildContext ctx]) { + YYDialog build([BuildContext? ctx]) { if (ctx == null && _context != null) { this.context = _context; return this; @@ -101,7 +101,7 @@ class YYDialog { fontSize1, fontWeight1, fontFamily1, - VoidCallback onTap1, + VoidCallback? onTap1, buttonPadding1 = const EdgeInsets.all(0.0), text2, color2, @@ -164,10 +164,10 @@ class YYDialog { } YYDialog listViewOfListTile({ - List items, - double height, + List? items, + double? height, isClickAutoDismiss = true, - Function(int) onClickItemListener, + Function(int)? onClickItemListener, }) { return this.widget( Container( @@ -175,7 +175,7 @@ class YYDialog { child: ListView.builder( padding: EdgeInsets.all(0.0), shrinkWrap: true, - itemCount: items.length, + itemCount: items?.length ?? 0, itemBuilder: (BuildContext context, int index) { return Material( color: Colors.white, @@ -189,15 +189,15 @@ class YYDialog { dismiss(); } }, - contentPadding: items[index].padding ?? EdgeInsets.all(0.0), - leading: items[index].leading, + contentPadding: items?[index].padding ?? EdgeInsets.all(0.0), + leading: items?[index].leading, title: Text( - items[index].text ?? "", + items?[index].text ?? "", style: TextStyle( - color: items[index].color ?? null, - fontSize: items[index].fontSize ?? null, - fontWeight: items[index].fontWeight, - fontFamily: items[index].fontFamily, + color: items?[index].color ?? null, + fontSize: items?[index].fontSize ?? null, + fontWeight: items?[index].fontWeight, + fontFamily: items?[index].fontFamily, ), ), ), @@ -210,14 +210,14 @@ class YYDialog { } YYDialog listViewOfRadioButton({ - List items, - double height, - Color color, - Color activeColor, - int intialValue, - Function(int) onClickItemListener, + List? items, + double? height, + Color? color, + Color? activeColor, + int? intialValue, + Function(int)? onClickItemListener, }) { - Size size = MediaQuery.of(context).size; + Size size = MediaQuery.of(context!).size; return this.widget( Container( height: height, @@ -270,7 +270,7 @@ class YYDialog { CustomDialog( gravity: gravity, gravityAnimationEnable: gravityAnimationEnable, - context: this.context, + context: this.context!, barrierColor: barrierColor, animatedFunc: animatedFunc, barrierDismissible: barrierDismissible, @@ -300,13 +300,9 @@ class YYDialog { isShowingChange: (bool isShowingChange) { // showing or dismiss Callback if (isShowingChange) { - if (showCallBack != null) { - showCallBack(); - } + showCallBack?.call(); } else { - if (dismissCallBack != null) { - dismissCallBack(); - } + dismissCallBack?.call(); } _isShowing = isShowingChange; }, @@ -321,7 +317,7 @@ class YYDialog { void dismiss() { if (_isShowing) { - Navigator.of(context, rootNavigator: useRootNavigator).pop(); + Navigator.of(context!, rootNavigator: useRootNavigator).pop(); } } @@ -403,7 +399,7 @@ class YYDialog { ///弹窗的内容作为可变组件 class CustomDialogChildren extends StatefulWidget { final List widgetList; //弹窗内部所有组件 - final Function(bool) isShowingChange; + final Function(bool)? isShowingChange; CustomDialogChildren({this.widgetList = const [], this.isShowingChange}); @@ -414,7 +410,9 @@ class CustomDialogChildren extends StatefulWidget { class CustomDialogChildState extends State { @override Widget build(BuildContext context) { - widget.isShowingChange(true); + if (widget.isShowingChange != null) { + widget.isShowingChange!(true); + } return Column( children: widget.widgetList, ); @@ -422,7 +420,9 @@ class CustomDialogChildState extends State { @override void dispose() { - widget.isShowingChange(false); + if (widget.isShowingChange != null) { + widget.isShowingChange!(false); + } super.dispose(); } } @@ -431,24 +431,24 @@ class CustomDialogChildState extends State { class CustomDialog { BuildContext _context; Widget _child; - Duration _duration; - Color _barrierColor; - RouteTransitionsBuilder _transitionsBuilder; - bool _barrierDismissible; - Gravity _gravity; + Duration? _duration; + Color? _barrierColor; + RouteTransitionsBuilder? _transitionsBuilder; + bool? _barrierDismissible; + Gravity? _gravity; bool _gravityAnimationEnable; - Function _animatedFunc; + Function? _animatedFunc; CustomDialog({ - @required Widget child, - @required BuildContext context, - Duration duration, - Color barrierColor, - RouteTransitionsBuilder transitionsBuilder, - Gravity gravity, - bool gravityAnimationEnable, - Function animatedFunc, - bool barrierDismissible, + required Widget child, + required BuildContext context, + Duration? duration, + Color? barrierColor, + RouteTransitionsBuilder? transitionsBuilder, + Gravity? gravity, + bool gravityAnimationEnable = false, + Function? animatedFunc, + bool? barrierDismissible, }) : _child = child, _context = context, _gravity = gravity, @@ -531,7 +531,7 @@ class CustomDialog { //自定义动画 if (_animatedFunc != null) { - return _animatedFunc(child, animation); + return _animatedFunc!(child, animation); } //不需要默认动画 @@ -576,13 +576,13 @@ class ListTileItem { this.fontFamily, }); - EdgeInsets padding; - Widget leading; - String text; - Color color; - double fontSize; - FontWeight fontWeight; - String fontFamily; + EdgeInsets? padding; + Widget? leading; + String? text; + Color? color; + double? fontSize; + FontWeight? fontWeight; + String? fontFamily; } class RadioItem { @@ -595,11 +595,11 @@ class RadioItem { this.onTap, }); - EdgeInsets padding; - String text; - Color color; - double fontSize; - FontWeight fontWeight; - Function(int) onTap; + EdgeInsets? padding; + String? text; + Color? color; + double? fontSize; + FontWeight? fontWeight; + Function(int)? onTap; } //============================================================================ diff --git a/lib/flutter_custom_dialog_widget.dart b/lib/flutter_custom_dialog_widget.dart index 047f723..9114a9d 100644 --- a/lib/flutter_custom_dialog_widget.dart +++ b/lib/flutter_custom_dialog_widget.dart @@ -7,7 +7,7 @@ export 'package:flutter_custom_dialog/flutter_custom_dialog_widget.dart'; class YYRadioListTile extends StatefulWidget { YYRadioListTile({ - Key key, + Key? key, this.items, this.intialValue, this.color, @@ -16,11 +16,11 @@ class YYRadioListTile extends StatefulWidget { }) : assert(items != null), super(key: key); - final List items; - final Color color; - final Color activeColor; + final List? items; + final Color? color; + final Color? activeColor; final intialValue; - final Function(int) onChanged; + final Function(int)? onChanged; @override State createState() { @@ -47,25 +47,28 @@ class YYRadioListTileState extends State { return ListView.builder( padding: EdgeInsets.all(0.0), shrinkWrap: true, - itemCount: widget.items.length, + itemCount: widget.items?.length ?? 0, itemBuilder: (BuildContext context, int index) { return Material( color: widget.color, child: RadioListTile( title: Text( - widget.items[index].text, + widget.items?[index].text ?? "", style: TextStyle( - fontSize: widget.items[index].fontSize, - fontWeight: widget.items[index].fontWeight, - color: widget.items[index].color), + fontSize: widget.items?[index].fontSize ?? 14, + fontWeight: + widget.items?[index].fontWeight ?? FontWeight.normal, + color: widget.items?[index].color ?? Colors.black), ), value: index, groupValue: groupId, activeColor: widget.activeColor, - onChanged: (int value) { + onChanged: (int? value) { setState(() { - widget.onChanged(value); - groupId = value; + if (widget.onChanged != null) { + widget.onChanged!(value ?? 0); + } + groupId = value ?? -1; }); }, ), diff --git a/pubspec.lock b/pubspec.lock index e9ed765..ad6d1df 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -144,4 +144,3 @@ packages: version: "2.1.0" sdks: dart: ">=2.12.0 <3.0.0" - flutter: ">=1.12.0" diff --git a/pubspec.yaml b/pubspec.yaml index 940d09c..290ddc0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,11 +1,11 @@ name: flutter_custom_dialog description: Semantic dialog | Made In YY.inc | Welcome to contribute -version: 1.0.21 +version: 1.1.0 homepage: https://github.com/YYFlutter/flutter-custom-dialog.git publish_to: 'https://pub.dev' environment: - sdk: ">=2.1.0 <3.0.0" + sdk: ">=2.12.0 <3.0.0" flutter: ">=1.10.0" dependencies: From 0639824718a3a2156c03774f28f58d66f235755d Mon Sep 17 00:00:00 2001 From: AndroidHensen Date: Fri, 22 Oct 2021 15:38:00 +0800 Subject: [PATCH 21/26] try to fix Android V2 embedding --- .idea/libraries/Dart_SDK.xml | 31 +- .idea/misc.xml | 3 + .idea/workspace.xml | 519 ++++-------------- CHANGELOG.md | 6 +- example/.flutter-plugins-dependencies | 2 +- .../android/app/src/main/AndroidManifest.xml | 11 +- .../MainActivity.java | 13 - .../app/src/main/res/values/styles.xml | 4 + .../ios/Flutter/flutter_export_environment.sh | 13 +- example/pubspec.lock | 13 +- pubspec.lock | 1 + pubspec.yaml | 2 +- 12 files changed, 164 insertions(+), 454 deletions(-) delete mode 100644 example/android/app/src/main/java/yy/inc/flutter_custom_dialog_example/MainActivity.java diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index 5b80310..b54adb1 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,17 +1,26 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/misc.xml b/.idea/misc.xml index dfda312..ceac72e 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,7 @@ + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b40cb42..d51621e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,297 +3,61 @@ + + + + + + + + + + + + + + + + + - - \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a6e983..372827e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -89,4 +89,8 @@ ## 1.1.0 -* Migrate to null safety \ No newline at end of file +* Migrate to null safety + +## 1.1.1 + +* try to fix Android V2 embedding \ No newline at end of file diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index f382161..bcfc929 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"android":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_custom_dialog","dependencies":[]}],"date_created":"2021-08-16 20:01:06.563734","version":"2.2.3"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"android":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_custom_dialog","dependencies":[]}],"date_created":"2021-10-22 15:36:17.074586","version":"2.5.3"} \ No newline at end of file diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index a7cbfba..0063516 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -7,7 +7,6 @@ additional functionality it is fine to subclass or reimplement FlutterApplication and put your custom class here. --> + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" /> + + diff --git a/example/android/app/src/main/java/yy/inc/flutter_custom_dialog_example/MainActivity.java b/example/android/app/src/main/java/yy/inc/flutter_custom_dialog_example/MainActivity.java deleted file mode 100644 index 5c5a420..0000000 --- a/example/android/app/src/main/java/yy/inc/flutter_custom_dialog_example/MainActivity.java +++ /dev/null @@ -1,13 +0,0 @@ -package yy.inc.flutter_custom_dialog_example; - -import android.os.Bundle; -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; - -public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } -} diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml index 00fa441..9fa09fc 100644 --- a/example/android/app/src/main/res/values/styles.xml +++ b/example/android/app/src/main/res/values/styles.xml @@ -5,4 +5,8 @@ Flutter draws its first frame --> @drawable/launch_background + + diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh index 29b4ef4..a6ae7d7 100755 --- a/example/ios/Flutter/flutter_export_environment.sh +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -1,8 +1,13 @@ #!/bin/sh # This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=C:\FlutterSDK\flutter" -export "FLUTTER_APPLICATION_PATH=C:\YYLive4-OpenSource\flutter-custom-dialog\flutter_custom_dialog\example" +export "FLUTTER_ROOT=G:\flutter" +export "FLUTTER_APPLICATION_PATH=C:\YYLive4-OpenSource\flutter-custom-dialog\example" +export "COCOAPODS_PARALLEL_CODE_SIGN=true" export "FLUTTER_TARGET=lib\main.dart" export "FLUTTER_BUILD_DIR=build" -export "SYMROOT=${SOURCE_ROOT}/../build\ios" -export "FLUTTER_FRAMEWORK_DIR=C:\FlutterSDK\flutter\bin\cache\artifacts\engine\ios" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1" +export "DART_OBFUSCATION=false" +export "TRACK_WIDGET_CREATION=false" +export "TREE_SHAKE_ICONS=false" +export "PACKAGE_CONFIG=.packages" diff --git a/example/pubspec.lock b/example/pubspec.lock index e9049b7..3343e80 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.1" boolean_selector: dependency: transitive description: @@ -28,7 +28,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -49,7 +49,7 @@ packages: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "0.1.2" + version: "0.1.3" fake_async: dependency: transitive description: @@ -68,7 +68,7 @@ packages: path: ".." relative: true source: path - version: "1.0.21" + version: "1.1.0" flutter_test: dependency: "direct dev" description: flutter @@ -87,7 +87,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -141,7 +141,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.2" typed_data: dependency: transitive description: @@ -158,3 +158,4 @@ packages: version: "2.1.0" sdks: dart: ">=2.12.0 <3.0.0" + flutter: ">=1.10.0" diff --git a/pubspec.lock b/pubspec.lock index ad6d1df..6dc48a2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -144,3 +144,4 @@ packages: version: "2.1.0" sdks: dart: ">=2.12.0 <3.0.0" + flutter: ">=1.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index 290ddc0..510496b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_custom_dialog description: Semantic dialog | Made In YY.inc | Welcome to contribute -version: 1.1.0 +version: 1.1.1 homepage: https://github.com/YYFlutter/flutter-custom-dialog.git publish_to: 'https://pub.dev' From 48c201b8d8f014ed05c71cc0c5f5ea36308aeaa6 Mon Sep 17 00:00:00 2001 From: AndroidHensen Date: Fri, 22 Oct 2021 15:52:38 +0800 Subject: [PATCH 22/26] try to fix Android V2 embedding --- .idea/workspace.xml | 56 +++++++++---------- .../MainActivity.java | 7 +++ 2 files changed, 35 insertions(+), 28 deletions(-) create mode 100644 example/android/app/src/main/java/yy/inc/flutter_custom_dialog_example/MainActivity.java diff --git a/.idea/workspace.xml b/.idea/workspace.xml index d51621e..ea14de0 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -22,17 +22,9 @@ - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - + \ No newline at end of file diff --git a/README.md b/README.md index b7a612b..ea40c23 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Global dialog function encapsulation, with a semantic way to fill the content in ```yaml dependencies: - flutter_custom_dialog: ^1.2.0 + flutter_custom_dialog: ^1.3.0 ``` **2、import** diff --git a/README_CN.md b/README_CN.md index a9aae1e..f502f6c 100644 --- a/README_CN.md +++ b/README_CN.md @@ -15,7 +15,7 @@ ```yaml dependencies: - flutter_custom_dialog: ^1.2.0 + flutter_custom_dialog: ^1.3.0 ``` **2、import** diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index b2b04d4..b4f3407 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"android":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_custom_dialog","dependencies":[]}],"date_created":"2021-10-22 16:32:26.122793","version":"2.5.3"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"android":[{"name":"flutter_custom_dialog","path":"C:\\\\YYLive4-OpenSource\\\\flutter-custom-dialog\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_custom_dialog","dependencies":[]}],"date_created":"2022-09-08 10:51:06.169356","version":"2.5.3"} \ No newline at end of file diff --git a/lib/flutter_custom_dialog.dart b/lib/flutter_custom_dialog.dart index 863e613..63686ca 100644 --- a/lib/flutter_custom_dialog.dart +++ b/lib/flutter_custom_dialog.dart @@ -125,10 +125,10 @@ class YYDialog { } }, style: TextButton.styleFrom( + primary: color1 ?? Colors.black, padding: buttonPadding1, textStyle: TextStyle( - color: color1 ?? null, - fontSize: fontSize1 ?? null, + fontSize: fontSize1 ?? 18.0, fontWeight: fontWeight1, fontFamily: fontFamily1, ) @@ -149,9 +149,9 @@ class YYDialog { } }, style: TextButton.styleFrom( + primary: color2 ?? Colors.black, padding: buttonPadding2, textStyle: TextStyle( - color: color2 ?? Colors.black, fontSize: fontSize2 ?? 14.0, fontWeight: fontWeight2, fontFamily: fontFamily2, diff --git a/pubspec.yaml b/pubspec.yaml index c4e3267..0f7102b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,7 @@ name: flutter_custom_dialog description: Semantic dialog | Made In YY.inc | Welcome to contribute -version: 1.2.0 +version: 1.3.0 homepage: https://github.com/YYFlutter/flutter-custom-dialog.git -publish_to: 'https://pub.dev' environment: sdk: ">=2.12.0 <3.0.0"