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);
|
DateFormat format = DateFormat(null, language);
|
||||||
|
|
||||||
switch (dateStyle) {
|
switch (dateStyle) {
|
||||||
case PassTextDateStyle.None:
|
case PassTextDateStyle.none:
|
||||||
break;
|
break;
|
||||||
case PassTextDateStyle.Short:
|
case PassTextDateStyle.short:
|
||||||
format = DateFormat.yMd(language);
|
format = DateFormat.yMd(language);
|
||||||
break;
|
break;
|
||||||
case PassTextDateStyle.Medium:
|
case PassTextDateStyle.medium:
|
||||||
format = DateFormat.yMMMd(language);
|
format = DateFormat.yMMMd(language);
|
||||||
break;
|
break;
|
||||||
case PassTextDateStyle.Long:
|
case PassTextDateStyle.long:
|
||||||
format = DateFormat.yMMMMd(language);
|
format = DateFormat.yMMMMd(language);
|
||||||
break;
|
break;
|
||||||
case PassTextDateStyle.Full:
|
case PassTextDateStyle.full:
|
||||||
default:
|
default:
|
||||||
format = DateFormat.yMMMMEEEEd(language);
|
format = DateFormat.yMMMMEEEEd(language);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (timeStyle) {
|
switch (timeStyle) {
|
||||||
case PassTextDateStyle.None:
|
case PassTextDateStyle.none:
|
||||||
break;
|
break;
|
||||||
case PassTextDateStyle.Short:
|
case PassTextDateStyle.short:
|
||||||
format.add_jm();
|
format.add_jm();
|
||||||
break;
|
break;
|
||||||
case PassTextDateStyle.Medium:
|
case PassTextDateStyle.medium:
|
||||||
case PassTextDateStyle.Long:
|
case PassTextDateStyle.long:
|
||||||
case PassTextDateStyle.Full:
|
case PassTextDateStyle.full:
|
||||||
default:
|
default:
|
||||||
format.add_jms();
|
format.add_jms();
|
||||||
break;
|
break;
|
||||||
|
@ -198,9 +198,9 @@ class DictionaryField {
|
||||||
if (currencyCode != null) {
|
if (currencyCode != null) {
|
||||||
return NumberFormat.simpleCurrency(locale: language, name: currencyCode)
|
return NumberFormat.simpleCurrency(locale: language, name: currencyCode)
|
||||||
.format(number);
|
.format(number);
|
||||||
} else if (numberStyle == PassTextNumberStyle.Percent) {
|
} else if (numberStyle == PassTextNumberStyle.percent) {
|
||||||
return NumberFormat.percentPattern(language).format(number);
|
return NumberFormat.percentPattern(language).format(number);
|
||||||
} else if (numberStyle == PassTextNumberStyle.Scientific) {
|
} else if (numberStyle == PassTextNumberStyle.scientific) {
|
||||||
return NumberFormat.scientificPattern(language).format(number);
|
return NumberFormat.scientificPattern(language).format(number);
|
||||||
} else {
|
} else {
|
||||||
/// PassTextNumberStyle.SpellOut not implemented
|
/// PassTextNumberStyle.SpellOut not implemented
|
||||||
|
@ -292,34 +292,34 @@ enum PassTextAlign {
|
||||||
/// Possible types of [DictionaryField.dateStyle] and [DictionaryField.timeStyle].
|
/// Possible types of [DictionaryField.dateStyle] and [DictionaryField.timeStyle].
|
||||||
enum PassTextDateStyle {
|
enum PassTextDateStyle {
|
||||||
/// PKDateStyleNone
|
/// PKDateStyleNone
|
||||||
None,
|
none,
|
||||||
|
|
||||||
/// PKDateStyleShort
|
/// PKDateStyleShort
|
||||||
Short,
|
short,
|
||||||
|
|
||||||
/// PKDateStyleMedium
|
/// PKDateStyleMedium
|
||||||
Medium,
|
medium,
|
||||||
|
|
||||||
/// PKDateStyleLong
|
/// PKDateStyleLong
|
||||||
Long,
|
long,
|
||||||
|
|
||||||
/// PKDateStyleFull
|
/// PKDateStyleFull
|
||||||
Full,
|
full,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Possible types of [DictionaryField.numberStyle].
|
/// Possible types of [DictionaryField.numberStyle].
|
||||||
enum PassTextNumberStyle {
|
enum PassTextNumberStyle {
|
||||||
/// PKNumberStyleDecimal
|
/// PKNumberStyleDecimal
|
||||||
Decimal,
|
decimal,
|
||||||
|
|
||||||
/// PKNumberStylePercent
|
/// PKNumberStylePercent
|
||||||
Percent,
|
percent,
|
||||||
|
|
||||||
/// PKNumberStyleScientific
|
/// PKNumberStyleScientific
|
||||||
Scientific,
|
scientific,
|
||||||
|
|
||||||
/// PKNumberStyleSpellOut
|
/// PKNumberStyleSpellOut
|
||||||
SpellOut,
|
spellOut,
|
||||||
}
|
}
|
||||||
|
|
||||||
extension _TarnsitType on TransitType {
|
extension _TarnsitType on TransitType {
|
||||||
|
|
|
@ -30,15 +30,15 @@ abstract class MaybeDecode {
|
||||||
static PassTextDateStyle? maybeDateStyle(String? style) {
|
static PassTextDateStyle? maybeDateStyle(String? style) {
|
||||||
switch (style) {
|
switch (style) {
|
||||||
case 'PKDateStyleNone':
|
case 'PKDateStyleNone':
|
||||||
return PassTextDateStyle.None;
|
return PassTextDateStyle.none;
|
||||||
case 'PKDateStyleShort':
|
case 'PKDateStyleShort':
|
||||||
return PassTextDateStyle.Short;
|
return PassTextDateStyle.short;
|
||||||
case 'PKDateStyleMedium':
|
case 'PKDateStyleMedium':
|
||||||
return PassTextDateStyle.Medium;
|
return PassTextDateStyle.medium;
|
||||||
case 'PKDateStyleLong':
|
case 'PKDateStyleLong':
|
||||||
return PassTextDateStyle.Long;
|
return PassTextDateStyle.long;
|
||||||
case 'PKDateStyleFull':
|
case 'PKDateStyleFull':
|
||||||
return PassTextDateStyle.Full;
|
return PassTextDateStyle.full;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -47,13 +47,13 @@ abstract class MaybeDecode {
|
||||||
static PassTextNumberStyle? maybeNumberStyle(String? style) {
|
static PassTextNumberStyle? maybeNumberStyle(String? style) {
|
||||||
switch (style) {
|
switch (style) {
|
||||||
case 'PKNumberStyleDecimal':
|
case 'PKNumberStyleDecimal':
|
||||||
return PassTextNumberStyle.Decimal;
|
return PassTextNumberStyle.decimal;
|
||||||
case 'PKNumberStylePercent':
|
case 'PKNumberStylePercent':
|
||||||
return PassTextNumberStyle.Percent;
|
return PassTextNumberStyle.percent;
|
||||||
case 'PKNumberStyleScientific':
|
case 'PKNumberStyleScientific':
|
||||||
return PassTextNumberStyle.Scientific;
|
return PassTextNumberStyle.scientific;
|
||||||
case 'PKNumberStyleSpellOut':
|
case 'PKNumberStyleSpellOut':
|
||||||
return PassTextNumberStyle.SpellOut;
|
return PassTextNumberStyle.spellOut;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue