-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcell_example.dart
52 lines (52 loc) · 1.33 KB
/
cell_example.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import 'package:flutter/material.dart';
import 'package:flutter_weui/flutter_weui.dart';
class CellExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Cell"),),
body: Cells(
children: <Widget>[
CellInput(
keyBoardType: KeyBoardType.number,
label: "number",
),
CellInput(
keyBoardType: KeyBoardType.text,
label: "text",
),
CellInput(
keyBoardType: KeyBoardType.password,
label: "password",
),
CellSelect(
options: ["1", "2", "3"],
initialIndex: 2,
onChanged: (value) {
print(value);
},
),
Cell(
title: "Cell",
banner: Icon(
Icons.arrow_back,
size: 20,
),
access: true,
secondaryText: "说明文字",
onPressed: () {
ActionSheet.show(
context,
data: ["1", "3", "sdfs"],
onPress: (details) {
print(details.toString());
});
},
radio: true,
checkBox: true,
),
],
),
);
}
}