mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 15:49:49 +00:00
14 lines
317 B
Dart
14 lines
317 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
Locale toLocale(String key) {
|
|
final arr = key.split('_');
|
|
return Locale(arr[0], arr[1]);
|
|
}
|
|
|
|
String getLocaleKey(Locale locale) {
|
|
return '${locale.languageCode}_${locale.countryCode}';
|
|
}
|
|
|
|
const debugLocale = Locale('zh', 'CN');
|
|
const fallbackLocale = Locale('en', 'US');
|