-
Notifications
You must be signed in to change notification settings - Fork 3
/
slider_example.dart
56 lines (55 loc) · 1.62 KB
/
slider_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
53
54
55
56
import 'package:flutter/material.dart';
import 'package:flutter_weui/flutter_weui.dart';
class SliderExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Slider、Switch、Toast、Touchable"),
),
body: Center(
child: Column(
children: <Widget>[
WSlider(
onChanged: (value) {},
),
WSlider(
showValue: true,
onChanged: (value) {},
),
WSwitch(
onChanged: (value) {},
),
FlatButton(
onPressed: () {
Toast.success(context, "success");
},
child: Text("Toast_success")),
FlatButton(
onPressed: () {
Toast.loading(context, "loading");
Future.delayed(const Duration(seconds: 1), () {
Toast.close(context);
});
},
child: Text("Toast_loading")),
TouchableHighlight(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 15,horizontal: 10),
child: Text("TouchableHightlight"),
),
onPressed: () {},
),
TouchableOpacity(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 15,horizontal: 10),
child: Text("TouchableOpacity"),
),
onPressed: () {},
)
],
),
),
);
}
}