-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdemos.dart
112 lines (105 loc) · 3.14 KB
/
demos.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import 'package:example/src/wired_card_example.dart';
import 'package:example/src/wired_checkbox_example.dart';
import 'package:example/src/wired_combo_example.dart';
import 'package:example/src/wired_dialog_example.dart';
import 'package:example/src/wired_divider_example.dart';
import 'package:flutter/material.dart';
import 'src/wired_button_example.dart';
import 'src/wired_calendar_example.dart';
import 'src/wired_input_example.dart';
import 'src/wired_progress_example.dart';
import 'src/wired_radio_example.dart';
import 'src/wired_slider_example.dart';
import 'src/wired_toggle_example.dart';
final String handWriting1 = 'Shadows Into Light';
final String handWriting2 = 'Architects Daughter';
final List<Demo> demos = [
NormalDemo(
'Wired button example',
'Wired button',
(_) => WiredButtonExample(title: 'Wired button example'),
const Icon(Icons.touch_app, size: 36),
),
NormalDemo(
'Wired card example',
'Wired card',
(_) => WiredCardExample(title: 'Wired card'),
const Icon(Icons.dashboard, size: 36),
),
NormalDemo(
'Wired checkbox example',
'Wired checkbox',
(_) => WiredCheckboxExample(title: 'Wired checkbox'),
const Icon(Icons.check_box, size: 36),
),
NormalDemo(
'Wired combo example',
'Wired combo',
(_) => WiredComboExample(title: 'Wired combo'),
const Icon(Icons.arrow_drop_down, size: 36),
),
NormalDemo(
'Wired dialog example',
'Wired dialog',
(_) => WiredDialogExample(title: 'Wired dialog'),
const Icon(Icons.open_in_new, size: 36),
),
NormalDemo(
'Wired divider example',
'Wired divider',
(_) => WiredDividerExample(title: 'Wired divider'),
const Icon(Icons.horizontal_split, size: 36),
),
NormalDemo(
'Wired input example',
'Wired input',
(_) => WiredInputExample(title: 'Wired input'),
const Icon(Icons.keyboard, size: 36),
),
NormalDemo(
'Wired radio example',
'Wired radio',
(_) => WiredRadioExample(title: 'Wired radio'),
const Icon(Icons.radio_button_checked, size: 36),
),
NormalDemo(
'Wired slider example',
'Wired slider',
(_) => WiredSliderExample(title: 'Wired slider'),
const Icon(Icons.linear_scale, size: 36),
),
NormalDemo(
'Wired toggle example',
'Wired toggle',
(_) => WiredToggleExample(title: 'Wired toggle'),
const Icon(Icons.toggle_on, size: 36),
),
NormalDemo(
'Wired progress example',
'Wired progress',
(_) => WiredProgressExample(title: 'Wired progress'),
const Icon(Icons.portrait, size: 36),
),
NormalDemo(
'Wired calendar example',
'Wired calendar',
(_) => WiredCalendarExample(title: 'Wired calendar'),
const Icon(Icons.calendar_today, size: 36),
),
];
abstract class Demo {
final String name;
final String description;
final Widget icon;
Demo(this.name, this.description, this.icon, {Key? key});
Widget buildPage(BuildContext context);
}
class NormalDemo extends Demo {
final WidgetBuilder builder;
NormalDemo(String name, String description, this.builder, Widget icon)
: super(name, description, icon);
@override
Widget buildPage(BuildContext context) {
return builder(context);
}
}