Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8bfc81e

Browse files
author
xuyingjun
committed
add textfield demo
1 parent 6656700 commit 8bfc81e

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

‎example/lib/dialog/develop_dialog.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_custom_dialog/flutter_custom_dialog.dart';
3+
4+
YYDialog YYFixTextFieldDialog() {
5+
return YYDialog().build()
6+
..width = 120
7+
..height = 110
8+
..backgroundColor = Colors.white
9+
..borderRadius = 10.0
10+
..gravity = Gravity.bottom
11+
..widget(
12+
Padding(
13+
padding: EdgeInsets.all(24),
14+
child: TextField(),
15+
),
16+
)
17+
..show();
18+
}

‎example/lib/main.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import 'package:flutter_custom_dialog_example/dialog/progress_dialog.dart';
88
import 'package:flutter_custom_dialog_example/dialog/notice_dialog.dart';
99
import 'package:flutter_custom_dialog/flutter_custom_dialog.dart';
1010

11+
import 'dialog/develop_dialog.dart';
12+
1113
void main() => runApp(MyApp());
1214

1315
var titleTextStyle = TextStyle(fontSize: 22, color: Colors.black);
@@ -258,6 +260,9 @@ showDevelopDialog(BuildContext context) {
258260
)),
259261
);
260262
}),
263+
makeTextButton("fix textfield", () {
264+
YYFixTextFieldDialog();
265+
}),
261266
],
262267
),
263268
],

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /