diff --git a/README.md b/README.md index 7d27915..baafee0 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,13 @@ import 'package:flutter_custom_dialog/flutter_custom_dialog.dart';
✅ + + +
+ notice +
+ ✅ +
diff --git a/README_CN.md b/README_CN.md index 1b77f88..7676f27 100644 --- a/README_CN.md +++ b/README_CN.md @@ -84,6 +84,13 @@ import 'package:flutter_custom_dialog/flutter_custom_dialog.dart';
+ notice +
+ ✅ + + + +
bottom sheet
✅ diff --git a/example/images/success.png b/example/images/success.png new file mode 100644 index 0000000..c4444ca Binary files /dev/null and b/example/images/success.png differ diff --git a/lib/components/example/alert_dialog.dart b/example/lib/dialog/alert_dialog.dart similarity index 100% rename from lib/components/example/alert_dialog.dart rename to example/lib/dialog/alert_dialog.dart diff --git a/lib/components/example/bottom_sheet_dialog.dart b/example/lib/dialog/bottom_sheet_dialog.dart similarity index 100% rename from lib/components/example/bottom_sheet_dialog.dart rename to example/lib/dialog/bottom_sheet_dialog.dart diff --git a/lib/components/example/listview_dialog.dart b/example/lib/dialog/listview_dialog.dart similarity index 100% rename from lib/components/example/listview_dialog.dart rename to example/lib/dialog/listview_dialog.dart diff --git a/example/lib/dialog/notice_dialog.dart b/example/lib/dialog/notice_dialog.dart new file mode 100644 index 0000000..b34104c --- /dev/null +++ b/example/lib/dialog/notice_dialog.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_custom_dialog/flutter_custom_dialog.dart'; + +YYDialog YYNoticeDialog() { + return YYDialog().build() + ..width = 120 + ..height = 110 + ..backgroundColor = Colors.black.withOpacity(0.8) + ..borderRadius = 10.0 + ..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, + ), + ), + )) + ..show(); +} diff --git a/lib/components/example/progress_dialog.dart b/example/lib/dialog/progress_dialog.dart similarity index 100% rename from lib/components/example/progress_dialog.dart rename to example/lib/dialog/progress_dialog.dart diff --git a/example/lib/main.dart b/example/lib/main.dart index c0497a4..c1ced12 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,10 +1,11 @@ library flutter_custom_dialog; import 'package:flutter/material.dart'; -import 'package:flutter_custom_dialog/components/example/alert_dialog.dart'; -import 'package:flutter_custom_dialog/components/example/bottom_sheet_dialog.dart'; -import 'package:flutter_custom_dialog/components/example/listview_dialog.dart'; -import 'package:flutter_custom_dialog/components/example/progress_dialog.dart'; +import 'package:flutter_custom_dialog_example/dialog/alert_dialog.dart'; +import 'package:flutter_custom_dialog_example/dialog/bottom_sheet_dialog.dart'; +import 'package:flutter_custom_dialog_example/dialog/listview_dialog.dart'; +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'; void main() => runApp(MyApp()); @@ -88,6 +89,13 @@ showAlertDialog(BuildContext context) { }), ], ), + Row( + children: [ + makeTextButton("notice", () { + YYNoticeDialog(); + }), + ], + ), Text("2、dialog property"), Row( children: [ diff --git a/example/pubspec.lock b/example/pubspec.lock index 94fee03..1778581 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -47,7 +47,7 @@ packages: path: ".." relative: true source: path - version: "1.0.7" + version: "1.0.8" flutter_test: dependency: "direct dev" description: flutter diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 31efff7..8618e98 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -31,10 +31,9 @@ flutter: # the material Icons class. uses-material-design: true - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + # To add assets to your application, add an assets section, like this: + assets: + - images/ # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware. diff --git a/image/png/10.png b/image/png/10.png new file mode 100644 index 0000000..de57894 Binary files /dev/null and b/image/png/10.png differ