translation_service.dart 384 B

12345678910111213141516
  1. import 'package:flutter/material.dart';
  2. import 'package:get/get.dart';
  3. import 'en_US.dart';
  4. import 'zh_CN.dart';
  5. class TranslationService extends Translations {
  6. static Locale? get locale => Get.deviceLocale;
  7. static const fallbackLocale = Locale('zh', 'CN');
  8. @override
  9. Map<String, Map<String, String>> get keys => {
  10. 'zh_CN': zh_CN,
  11. 'en_US': en_US,
  12. };
  13. }