ticketer_shift_logic.dart
2.1 KB
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
import 'package:cp_offline_manage/router/route_config.dart';
import 'package:get/get.dart';
import 'package:flutter/material.dart';
import 'package:cp_offline_manage/common/colors.dart';
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
import '../../../../utils/log.dart';
class Ticketer_shiftLogic extends GetxController {
void jumpToJiaoJiePage(int type) {
Get.toNamed(RouteConfig.ticketer_shift_deal_key, arguments: {"type": type});
}
void selectDate() {
Get.bottomSheet(Container(
height: 350,
color: Colors.white,
child: Column(
children: [
Container(
height: 40,
alignment: Alignment.centerLeft,
padding: const EdgeInsets.symmetric(horizontal: 12),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
'选择日期',
style: TextStyle(
fontSize: 18,
color: ColorConfig.color33,
fontWeight: FontWeight.bold),
),
InkWell(
child: Container(
width: 60,
height: 26,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(4)),
color: ColorConfig.themeColor),
child: Text(
'确定',
style: TextStyle(color: ColorConfig.white, fontSize: 15),
),
),
onTap: () {
Get.back();
},
)
],
),
),
SfDateRangePicker(
onSelectionChanged: _onSelectionChanged,
selectionMode: DateRangePickerSelectionMode.single,
)
],
),
));
}
void _onSelectionChanged(DateRangePickerSelectionChangedArgs args) {
LogUtils.e('选中日期: ${args.value}');
}
}