mirrored_repositories/freebox
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: prefer_final_fields, public_member_api_docs, prefer_single_quotes, omit_local_variable_types, unnecessary_this

import 'dart:async';

import 'package:flutter/material.dart';

/// A  class generated by flappy_translator package containing localized strings
class AppLocalizations {
  static String get appTitle => _getText('appTitle');

  static String get onboardingWelcomeHeadline =>
      _getText('onboardingWelcomeHeadline');

  static String get onboardingPageOneDescription =>
      _getText('onboardingPageOneDescription');

  static String get onboardingPageTwoDescription =>
      _getText('onboardingPageTwoDescription');

  static String get onboardingPageTwoButtonLabel =>
      _getText('onboardingPageTwoButtonLabel');

  static String get bottomNavigationBarFreeboxes =>
      _getText('bottomNavigationBarFreeboxes');

  static String get bottomNavigationBarMap =>
      _getText('bottomNavigationBarMap');

  static Map<String, String> _localizedValues;

  static Map<String, String> _enValues = {
    'appTitle': 'My awesome application',
    'onboardingWelcomeHeadline': 'Welcome to Freebox',
    'onboardingPageOneDescription':
        'In this app you can upload the content of your freebox and share it with others.',
    'onboardingPageTwoDescription':
        'You can also search for freebox locations close to where you currently are.',
    'onboardingPageTwoButtonLabel': 'Get Started!',
    'bottomNavigationBarFreeboxes': 'Freeboxes',
    'bottomNavigationBarMap': 'Map',
  };

  static Map<String, String> _deValues = {
    'appTitle': 'Meine tolle App',
    'onboardingWelcomeHeadline': 'Welcome to Freebox',
    'onboardingPageOneDescription':
        'In this app you can upload the content of your freebox for free ans share it with others.',
    'onboardingPageTwoDescription':
        'You can also search for freebox locations close to where you currently are. ',
    'onboardingPageTwoButtonLabel': 'Los geht\'s!',
    'bottomNavigationBarFreeboxes': 'Freeboxes',
    'bottomNavigationBarMap': 'Karte',
  };

  static Map<String, Map<String, String>> _allValues = {
    'en': _enValues,
    'de': _deValues,
  };

  AppLocalizations(Locale locale) {
    _locale = locale;
    _localizedValues = null;
  }

  static Locale _locale;

  static String _getText(String key) {
    return _localizedValues[key] ?? '** $key not found';
  }

  static Locale get currentLocale => _locale;

  static String get currentLanguage => _locale.languageCode;

  static Future<AppLocalizations> load(Locale locale) async {
    final translations = AppLocalizations(locale);
    _localizedValues = _allValues[locale.toString()];
    return translations;
  }
}

class AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
  const AppLocalizationsDelegate();

  static final Set<Locale> supportedLocals = {
    Locale('en'),
    Locale('de'),
  };

  @override
  bool isSupported(Locale locale) => supportedLocals.contains(locale);

  @override
  Future<AppLocalizations> load(Locale locale) => AppLocalizations.load(locale);

  @override
  bool shouldReload(AppLocalizationsDelegate old) => false;
}
