Skip to content

Instantly share code, notes, and snippets.

@AbedElazizShe
Last active July 14, 2022 18:20
Show Gist options
  • Save AbedElazizShe/851aaa80d5d1a7edeed3dd53b7a65c1e to your computer and use it in GitHub Desktop.
Save AbedElazizShe/851aaa80d5d1a7edeed3dd53b7a65c1e to your computer and use it in GitHub Desktop.
General configuration
import 'package:flutter/material.dart';
import 'package:get_localization/get_localization.dart';
import 'base_localisation.dart';
/// General Configurations
abstract class AppConfiguration {
String endpoint();
ThemeData theme();
Route<dynamic> routeFactory(RouteSettings settings,
BaseLocalisation localisation);
Widget widgetProvider(String identifier, BaseLocalisation localisation,
{BuildContext? context, Function? onEvent, Map<String,
dynamic>? arguments,});
List<Localization> supportedLocalizations();
List<Locale> supportedLanguages();
List<dynamic> blocs();
}
/// Localisation and internationalisation
abstract class BaseLocalisation extends Localization {
BaseLocalisation({
required super.code,
required super.name,
super.country,
});
String get labelAppName;
String get labelMostEmailedArticles;
String get labelMostSharedArticles;
String get labelMostViewedArticles;
String get infoFABMessage;
String get labelFAB;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment