48 lines
1.0 KiB
Dart
Executable File
48 lines
1.0 KiB
Dart
Executable File
// import 'package:flutter_pickers/time_picker/model/date_type.dart';
|
|
|
|
import 'package:get/get.dart';
|
|
import 'package:star_lock/tools/pickers/time_picker/model/date_type.dart';
|
|
|
|
/// 后缀标签
|
|
class Suffix {
|
|
Suffix(
|
|
{this.years = '',
|
|
this.month = '',
|
|
this.days = '',
|
|
this.hours = '',
|
|
this.minutes = '',
|
|
this.seconds = ''});
|
|
|
|
Suffix.normal() {
|
|
years = '年简称'.tr;
|
|
month = '月简称'.tr;
|
|
days = '日简称'.tr;
|
|
hours = '时简称'.tr;
|
|
minutes = '分简称'.tr;
|
|
seconds = '秒简称'.tr;
|
|
}
|
|
late String years;
|
|
late String month;
|
|
late String days;
|
|
late String hours;
|
|
late String minutes;
|
|
late String seconds;
|
|
|
|
String getSingle(DateType dateType) {
|
|
switch (dateType) {
|
|
case DateType.Year:
|
|
return years;
|
|
case DateType.Month:
|
|
return month;
|
|
case DateType.Day:
|
|
return days;
|
|
case DateType.Hour:
|
|
return hours;
|
|
case DateType.Minute:
|
|
return minutes;
|
|
case DateType.Second:
|
|
return seconds;
|
|
}
|
|
}
|
|
}
|