Skip to content

Commit 8253b7e

Browse files
author
xuyingjun
committed
add notice dialog
1 parent 3024cf3 commit 8253b7e

12 files changed

+59
-9
lines changed

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ import 'package:flutter_custom_dialog/flutter_custom_dialog.dart';
9090
<br />
9191
9292
</td>
93+
<td align="center">
94+
<img src="https://github.com/YYFlutter/flutter-custom-dialog/raw/master/image/png/10.png" width="150px">
95+
<br />
96+
notice
97+
<br />
98+
99+
</td>
93100
<td align="center">
94101
<img src="https://github.com/YYFlutter/flutter-custom-dialog/raw/master/image/png/8.png" width="150px">
95102
<br />

README_CN.md

+7
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ import 'package:flutter_custom_dialog/flutter_custom_dialog.dart';
8484
<td align="center">
8585
<img src="https://github.com/YYFlutter/flutter-custom-dialog/raw/master/image/png/9.png" width="150px">
8686
<br />
87+
notice
88+
<br />
89+
90+
</td>
91+
<td align="center">
92+
<img src="https://github.com/YYFlutter/flutter-custom-dialog/raw/master/image/png/10.png" width="150px">
93+
<br />
8794
bottom sheet
8895
<br />
8996

example/images/success.png

1.96 KB
Loading

example/lib/dialog/notice_dialog.dart

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_custom_dialog/flutter_custom_dialog.dart';
3+
4+
YYDialog YYNoticeDialog() {
5+
return YYDialog().build()
6+
..width = 120
7+
..height = 110
8+
..backgroundColor = Colors.black.withOpacity(0.8)
9+
..borderRadius = 10.0
10+
..widget(Padding(
11+
padding: EdgeInsets.only(top: 21),
12+
child: Image.asset(
13+
'images/success.png',
14+
width: 38,
15+
height: 38,
16+
),
17+
))
18+
..widget(Padding(
19+
padding: EdgeInsets.only(top: 10),
20+
child: Text(
21+
"Success",
22+
style: TextStyle(
23+
fontSize: 15,
24+
color: Colors.white,
25+
),
26+
),
27+
))
28+
..show();
29+
}

example/lib/main.dart

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
library flutter_custom_dialog;
22

33
import 'package:flutter/material.dart';
4-
import 'package:flutter_custom_dialog/components/example/alert_dialog.dart';
5-
import 'package:flutter_custom_dialog/components/example/bottom_sheet_dialog.dart';
6-
import 'package:flutter_custom_dialog/components/example/listview_dialog.dart';
7-
import 'package:flutter_custom_dialog/components/example/progress_dialog.dart';
4+
import 'package:flutter_custom_dialog_example/dialog/alert_dialog.dart';
5+
import 'package:flutter_custom_dialog_example/dialog/bottom_sheet_dialog.dart';
6+
import 'package:flutter_custom_dialog_example/dialog/listview_dialog.dart';
7+
import 'package:flutter_custom_dialog_example/dialog/progress_dialog.dart';
8+
import 'package:flutter_custom_dialog_example/dialog/notice_dialog.dart';
89
import 'package:flutter_custom_dialog/flutter_custom_dialog.dart';
910

1011
void main() => runApp(MyApp());
@@ -88,6 +89,13 @@ showAlertDialog(BuildContext context) {
8889
}),
8990
],
9091
),
92+
Row(
93+
children: <Widget>[
94+
makeTextButton("notice", () {
95+
YYNoticeDialog();
96+
}),
97+
],
98+
),
9199
Text("2、dialog property"),
92100
Row(
93101
children: <Widget>[

example/pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ packages:
4747
path: ".."
4848
relative: true
4949
source: path
50-
version: "1.0.7"
50+
version: "1.0.8"
5151
flutter_test:
5252
dependency: "direct dev"
5353
description: flutter

example/pubspec.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ flutter:
3131
# the material Icons class.
3232
uses-material-design: true
3333

34-
# To add assets to your application, add an assets section, like this:
35-
# assets:
36-
# - images/a_dot_burr.jpeg
37-
# - images/a_dot_ham.jpeg
34+
# To add assets to your application, add an assets section, like this:
35+
assets:
36+
- images/
3837

3938
# An image asset can refer to one or more resolution-specific "variants", see
4039
# https://flutter.dev/assets-and-images/#resolution-aware.

image/png/10.png

15.9 KB
Loading

0 commit comments

Comments
 (0)