Hamza Ait Mezoaur's Projects
Just A little test to AviationStack Api to show Real time flights
A real time chat App using flutter and Firebase
An App where you can Authenticate and buy products with Paypal
Flutter makes it easy and fast to build beautiful apps for mobile and beyond
a widget provided to the flutter scroll component drop-down refresh and pull up load.translation to arabic
Config files for my GitHub profile.
A flutter application where you can reserve a football stadium in your area choose if you are alone and want to play with strangers our you are a team searching for competition . while you can also pay the fees the stadium requires . Since not everyone has the time to organize a game you can now dress up and go enjoy your favourite hobby of all time
A flutter movie app using Tmdb Api
Playing Music from Shazam Api
Privacy Policy Template for website or app
import 'dart:async'; import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; class AppLocalizations { final Locale locale; AppLocalizations(this.locale); // Helper method to keep the code in the widgets concise // Localizations are accessed using an InheritedWidget "of" syntax static AppLocalizations of(BuildContext context) { return Localizations.of<AppLocalizations>(context, AppLocalizations); } Map<String, String> _localizedStrings; static const LocalizationsDelegate<AppLocalizations> delegate = _AppLocalizationsDelegate(); Future<bool> load() async { // Load the language JSON file from the "lang" folder String jsonString = await rootBundle.loadString('lang/${locale.languageCode}.json'); Map<String, dynamic> jsonMap = json.decode(jsonString); _localizedStrings = jsonMap.map((key, value) { return MapEntry(key, value.toString()); }); return true; } // This method will be called from every widget which needs a localized text String translate(String key) { return _localizedStrings[key]; } } class _AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> { // This delegate instance will never change (it doesn't even have fields!) // It can provide a constant constructor. const _AppLocalizationsDelegate(); @override bool isSupported(Locale locale) { // Include all of your supported language codes here return ['en', 'fr','ar'].contains(locale.languageCode); } @override Future<AppLocalizations> load(Locale locale) async { // AppLocalizations class is where the JSON loading actually runs AppLocalizations localizations = new AppLocalizations(locale); await localizations.load(); return localizations; } @override bool shouldReload(_AppLocalizationsDelegate old) => false; }
If you want to visit a beautiful place in Morroco here you will have some Of the best Destinations