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('en', 'US');
  8. @override
  9. Map<String, Map<String, String>> get keys => {
  10. 'en_US': en_US,
  11. 'zh_CN': zh_CN,
  12. };
  13. }