Skip to content

Commit

Permalink
add notice dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
xuyingjun committed Oct 10, 2019
1 parent 3024cf3 commit 8253b7e
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 9 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ import 'package:flutter_custom_dialog/flutter_custom_dialog.dart';
<br />
</td>
<td align="center">
<img src="https://github.com/YYFlutter/flutter-custom-dialog/raw/master/image/png/10.png" width="150px">
<br />
notice
<br />
</td>
<td align="center">
<img src="https://github.com/YYFlutter/flutter-custom-dialog/raw/master/image/png/8.png" width="150px">
<br />
Expand Down
7 changes: 7 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ import 'package:flutter_custom_dialog/flutter_custom_dialog.dart';
<td align="center">
<img src="https://github.com/YYFlutter/flutter-custom-dialog/raw/master/image/png/9.png" width="150px">
<br />
notice
<br />
</td>
<td align="center">
<img src="https://github.com/YYFlutter/flutter-custom-dialog/raw/master/image/png/10.png" width="150px">
<br />
bottom sheet
<br />
Expand Down
Binary file added example/images/success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions example/lib/dialog/notice_dialog.dart
Original file line number Diff line number Diff line change
@@ -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();
}
File renamed without changes.
16 changes: 12 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -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());
Expand Down Expand Up @@ -88,6 +89,13 @@ showAlertDialog(BuildContext context) {
}),
],
),
Row(
children: <Widget>[
makeTextButton("notice", () {
YYNoticeDialog();
}),
],
),
Text("2、dialog property"),
Row(
children: <Widget>[
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Binary file added image/png/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8253b7e

Please sign in to comment.