-
Notifications
You must be signed in to change notification settings - Fork 259
/
tile_loading.dart
49 lines (46 loc) · 1.37 KB
/
tile_loading.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
import 'package:flutter/material.dart';
import 'package:smart_select/smart_select.dart';
import '../choices.dart' as choices;
class FeaturesTileLoading extends StatefulWidget {
@override
_FeaturesTileLoadingState createState() => _FeaturesTileLoadingState();
}
class _FeaturesTileLoadingState extends State<FeaturesTileLoading> {
String _day = 'fri';
List<String> _month = ['apr'];
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
const SizedBox(height: 7),
SmartSelect<String>.single(
title: 'Days',
selectedValue: _day,
choiceItems: choices.days,
onChange: (selected) => setState(() => _day = selected.value),
tileBuilder: (context, state) {
return S2Tile.fromState(
state,
isLoading: true,
);
},
),
const Divider(indent: 20),
SmartSelect<String>.multiple(
title: 'Month',
selectedValue: _month,
choiceItems: choices.months,
onChange: (selected) => setState(() => _month = selected.value),
tileBuilder: (context, state) {
return S2Tile.fromState(
state,
isLoading: true,
isTwoLine: true,
);
},
),
const SizedBox(height: 7),
],
);
}
}