You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.4 KiB
Dart
46 lines
1.4 KiB
Dart
///todo deleted
|
|
// import 'dart:convert';
|
|
//
|
|
// import 'package:flutter/material.dart';
|
|
// import 'package:flutter/services.dart';
|
|
// import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
|
//
|
|
// class AppLocalization {
|
|
// AppLocalization(this.locale);
|
|
//
|
|
// final Locale locale;
|
|
// static AppLocalization of(BuildContext context) {
|
|
// return Localizations.of<AppLocalization>(context, AppLocalization);
|
|
// }
|
|
//
|
|
// AppLocalizations _subtitle;
|
|
// Subtitle get subtitle => _subtitle;
|
|
//
|
|
// Future<void> load() async {
|
|
// String jsonStringValues = await rootBundle.loadString('assets/subtitles/${locale.languageCode}_subtitle.json');
|
|
// _subtitle = Subtitle.fromJson(json.decode(jsonStringValues));
|
|
// }
|
|
//
|
|
// // static member to have simple access to the delegate from Material App
|
|
// static const LocalizationsDelegate<AppLocalization> delegate = _DemoLocalizationsDelegate();
|
|
// }
|
|
//
|
|
// class _DemoLocalizationsDelegate extends LocalizationsDelegate<AppLocalization> {
|
|
// const _DemoLocalizationsDelegate();
|
|
//
|
|
// @override
|
|
// bool isSupported(Locale locale) {
|
|
// return ['en', 'ar'].contains(locale.languageCode);
|
|
// }
|
|
//
|
|
// @override
|
|
// Future<AppLocalization> load(Locale locale) async {
|
|
// AppLocalization localization = new AppLocalization(locale);
|
|
// await localization.load();
|
|
// return localization;
|
|
// }
|
|
//
|
|
// @override
|
|
// bool shouldReload(LocalizationsDelegate<AppLocalization> old) => false;
|
|
// }
|