mirror of
https://gitlab.com/TheOneWithTheBraid/dart_pkpass.git
synced 2025-07-05 12:58:47 +00:00
chore: apply code style
Signed-off-by: The one with the braid <info@braid.business>
This commit is contained in:
parent
b702cc940d
commit
a8e912327b
2 changed files with 30 additions and 30 deletions
|
@ -156,32 +156,32 @@ class DictionaryField {
|
|||
DateFormat format = DateFormat(null, language);
|
||||
|
||||
switch (dateStyle) {
|
||||
case PassTextDateStyle.None:
|
||||
case PassTextDateStyle.none:
|
||||
break;
|
||||
case PassTextDateStyle.Short:
|
||||
case PassTextDateStyle.short:
|
||||
format = DateFormat.yMd(language);
|
||||
break;
|
||||
case PassTextDateStyle.Medium:
|
||||
case PassTextDateStyle.medium:
|
||||
format = DateFormat.yMMMd(language);
|
||||
break;
|
||||
case PassTextDateStyle.Long:
|
||||
case PassTextDateStyle.long:
|
||||
format = DateFormat.yMMMMd(language);
|
||||
break;
|
||||
case PassTextDateStyle.Full:
|
||||
case PassTextDateStyle.full:
|
||||
default:
|
||||
format = DateFormat.yMMMMEEEEd(language);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (timeStyle) {
|
||||
case PassTextDateStyle.None:
|
||||
case PassTextDateStyle.none:
|
||||
break;
|
||||
case PassTextDateStyle.Short:
|
||||
case PassTextDateStyle.short:
|
||||
format.add_jm();
|
||||
break;
|
||||
case PassTextDateStyle.Medium:
|
||||
case PassTextDateStyle.Long:
|
||||
case PassTextDateStyle.Full:
|
||||
case PassTextDateStyle.medium:
|
||||
case PassTextDateStyle.long:
|
||||
case PassTextDateStyle.full:
|
||||
default:
|
||||
format.add_jms();
|
||||
break;
|
||||
|
@ -198,9 +198,9 @@ class DictionaryField {
|
|||
if (currencyCode != null) {
|
||||
return NumberFormat.simpleCurrency(locale: language, name: currencyCode)
|
||||
.format(number);
|
||||
} else if (numberStyle == PassTextNumberStyle.Percent) {
|
||||
} else if (numberStyle == PassTextNumberStyle.percent) {
|
||||
return NumberFormat.percentPattern(language).format(number);
|
||||
} else if (numberStyle == PassTextNumberStyle.Scientific) {
|
||||
} else if (numberStyle == PassTextNumberStyle.scientific) {
|
||||
return NumberFormat.scientificPattern(language).format(number);
|
||||
} else {
|
||||
/// PassTextNumberStyle.SpellOut not implemented
|
||||
|
@ -292,34 +292,34 @@ enum PassTextAlign {
|
|||
/// Possible types of [DictionaryField.dateStyle] and [DictionaryField.timeStyle].
|
||||
enum PassTextDateStyle {
|
||||
/// PKDateStyleNone
|
||||
None,
|
||||
none,
|
||||
|
||||
/// PKDateStyleShort
|
||||
Short,
|
||||
short,
|
||||
|
||||
/// PKDateStyleMedium
|
||||
Medium,
|
||||
medium,
|
||||
|
||||
/// PKDateStyleLong
|
||||
Long,
|
||||
long,
|
||||
|
||||
/// PKDateStyleFull
|
||||
Full,
|
||||
full,
|
||||
}
|
||||
|
||||
/// Possible types of [DictionaryField.numberStyle].
|
||||
enum PassTextNumberStyle {
|
||||
/// PKNumberStyleDecimal
|
||||
Decimal,
|
||||
decimal,
|
||||
|
||||
/// PKNumberStylePercent
|
||||
Percent,
|
||||
percent,
|
||||
|
||||
/// PKNumberStyleScientific
|
||||
Scientific,
|
||||
scientific,
|
||||
|
||||
/// PKNumberStyleSpellOut
|
||||
SpellOut,
|
||||
spellOut,
|
||||
}
|
||||
|
||||
extension _TarnsitType on TransitType {
|
||||
|
|
|
@ -30,15 +30,15 @@ abstract class MaybeDecode {
|
|||
static PassTextDateStyle? maybeDateStyle(String? style) {
|
||||
switch (style) {
|
||||
case 'PKDateStyleNone':
|
||||
return PassTextDateStyle.None;
|
||||
return PassTextDateStyle.none;
|
||||
case 'PKDateStyleShort':
|
||||
return PassTextDateStyle.Short;
|
||||
return PassTextDateStyle.short;
|
||||
case 'PKDateStyleMedium':
|
||||
return PassTextDateStyle.Medium;
|
||||
return PassTextDateStyle.medium;
|
||||
case 'PKDateStyleLong':
|
||||
return PassTextDateStyle.Long;
|
||||
return PassTextDateStyle.long;
|
||||
case 'PKDateStyleFull':
|
||||
return PassTextDateStyle.Full;
|
||||
return PassTextDateStyle.full;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -47,13 +47,13 @@ abstract class MaybeDecode {
|
|||
static PassTextNumberStyle? maybeNumberStyle(String? style) {
|
||||
switch (style) {
|
||||
case 'PKNumberStyleDecimal':
|
||||
return PassTextNumberStyle.Decimal;
|
||||
return PassTextNumberStyle.decimal;
|
||||
case 'PKNumberStylePercent':
|
||||
return PassTextNumberStyle.Percent;
|
||||
return PassTextNumberStyle.percent;
|
||||
case 'PKNumberStyleScientific':
|
||||
return PassTextNumberStyle.Scientific;
|
||||
return PassTextNumberStyle.scientific;
|
||||
case 'PKNumberStyleSpellOut':
|
||||
return PassTextNumberStyle.SpellOut;
|
||||
return PassTextNumberStyle.spellOut;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue