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/material.dart'; | |
void main() { | |
runApp( | |
MaterialApp( | |
home: Stack( | |
children: [ | |
PanableWidget(), | |
], | |
), |
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/material.dart'; | |
class GoogleMapsClonePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Stack( | |
children: <Widget>[ | |
CustomGoogleMap(), | |
CustomHeader(), |
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
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: "Flutter Ecommerce App", | |
debugShowCheckedModeBanner: false, | |
home: new SplashScreen(), | |
routes: widget.routes, | |
localizationsDelegates: [ | |
_localeOverrideDelegate, | |
const AppTranslationsDelegate(), |
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
@override | |
bool isSupported(Locale locale) { | |
return application.supportedLanguagesCodes.contains(locale.languageCode); | |
} |
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:your_app_package/application.dart'; | |
import 'package:your_app_package/services/localization/app_translations.dart'; | |
import 'package:flutter/material.dart'; | |
class LanguageSelectorPage extends StatefulWidget { | |
@override | |
_LanguageSelectorPageState createState() => _LanguageSelectorPageState(); | |
} | |
class _LanguageSelectorPageState extends State<LanguageSelectorPage> { |
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/material.dart'; | |
import 'package:flutter_localizations/flutter_localizations.dart'; | |
import 'package:your_app_package/services/localization/app_translations_delegate.dart'; | |
import 'package:your_app_package/screens/home_page.dart'; | |
import 'application.dart'; | |
void main() { | |
runApp(MyApp()); | |
} |
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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:your_app_package/services/localization/app_translations.dart'; | |
class SpecificTranslationsDelegate extends LocalizationsDelegate<AppTranslations> { | |
final Locale overriddenLocale; | |
const SpecificTranslationsDelegate(this.overriddenLocale); |
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 'dart:ui'; | |
class Application { | |
static final Application _application = Application._internal(); | |
factory Application() { | |
return _application; | |
} |
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/material.dart'; | |
import 'package:flutter_localizations/flutter_localizations.dart'; | |
import 'package:your_app_package/services/localization/app_translations_delegate.dart'; | |
import 'package:your_app_package/screens/home_page.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatefulWidget { |
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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import '../localization/app_translations.dart'; | |
class AppTranslationsDelegate extends LocalizationsDelegate<AppTranslations> { | |
final Locale newLocale; | |
const AppTranslationsDelegate({this.newLocale}); |