tryParse static method
- String? code
Parses vi / en, returning null for anything else.
Implementation
static HatangLocale? tryParse(String? code) => switch (code) {
'vi' => HatangLocale.vi,
'en' => HatangLocale.en,
_ => null,
};
Parses vi / en, returning null for anything else.
static HatangLocale? tryParse(String? code) => switch (code) {
'vi' => HatangLocale.vi,
'en' => HatangLocale.en,
_ => null,
};