Created
April 19, 2022 12:24
-
-
Save FlutterWiz/2249d1704e6df9297d400a1d673dc207 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:piva/infrastructure/localization/piva_localization.dart'; | |
class PivaLocalizationsDelegate extends LocalizationsDelegate<PivaLocalizations> { | |
const PivaLocalizationsDelegate(); | |
@override | |
bool isSupported(Locale locale) => true; | |
@override | |
Future<PivaLocalizations> load(Locale locale) { | |
return SynchronousFuture<PivaLocalizations>(PivaLocalizations(locale)); | |
} | |
@override | |
bool shouldReload(PivaLocalizationsDelegate old) => false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment