improve dateFormat a bit, and fix some buttons
This commit is contained in:
@@ -30,6 +30,17 @@ enum AppSettingsDateFormat {
|
||||
}
|
||||
}
|
||||
|
||||
DateFormat dateOnlyFormat() {
|
||||
switch (this) {
|
||||
case AppSettingsDateFormat.ISO:
|
||||
return DateFormat('yyyy-MM-dd');
|
||||
case AppSettingsDateFormat.German:
|
||||
return DateFormat('dd.MM.yyyy');
|
||||
case AppSettingsDateFormat.US:
|
||||
return DateFormat('MM/dd/yyyy');
|
||||
}
|
||||
}
|
||||
|
||||
static AppSettingsDateFormat? parse(String? string) {
|
||||
if (string == null) return null;
|
||||
return values.firstWhere((e) => e.key == string, orElse: null);
|
||||
|
Reference in New Issue
Block a user