GithubHelp home page GithubHelp logo

Comments (4)

ferraridamiano avatar ferraridamiano commented on May 23, 2024

Hi @grow-withcode, could you please elaborate the issue? This project doesn't use any app_localization package

from converternow.

 avatar commented on May 23, 2024

please check line no 4, issue is resolve but app_localization is used but you said doesn't use

1. import 'pages/ConversionPage.dart';
2. import 'package:converterpro/pages/SettingsPage.dart';
3. import 'package:flutter/material.dart';
4. import 'package:flutter_gen/gen_l10n/app_localizations.dart';
5. import 'package:provider/provider.dart';
6. import 'models/AppModel.dart';
7. import 'models/Conversions.dart';
8. 
9. void main() async {
10.   WidgetsFlutterBinding.ensureInitialized();
11.   runApp(new MyApp());
12. }
13. 
14. class MyApp extends StatefulWidget {
15.   @override
16.   _MyApp createState() => _MyApp();
17. }
18. 
19. class _MyApp extends State<MyApp> {
20.   @override
21.   Widget build(BuildContext context) {
22.     return MultiProvider(
23.       providers: [
24.         ChangeNotifierProvider(
25.           create: (_) => AppModel(),
26.         ),
27.         ChangeNotifierProxyProvider<AppModel, Conversions>(
28.           create: (context) => Conversions(),
29.           update: (context, appModel, conversions) {
30.             conversions?.currentPage = appModel.currentPage;
31.             return conversions!;
32.           },
33.         ),
34.       ],
35.       child: Builder(builder: (BuildContext context) {
36.         bool isDarkAmoled = context.select<AppModel, bool>((appModel) => appModel.isDarkAmoled);
37.         return MaterialApp(
38.           debugShowCheckedModeBanner: false,
39.           title: 'Converter NOW',
40.           initialRoute: '/',
41.           routes: {
42.             '/': (context) => ConversionPage(),
43.             '/settings': (context) => SettingsPage(),
44.           },
45.           themeMode: context.select<AppModel, ThemeMode>((appModel) => appModel.currentThemeMode),
46.           theme: ThemeData(primaryColor: Color(0xFFF2542D), accentColor: Color(0xFF0E9594), brightness: Brightness.light),
47.           darkTheme: ThemeData(
48.             primaryColor: const Color(0xFFF2542D),
49.             accentColor: const Color(0xFF0E9594),
50.             brightness: Brightness.dark,
51.             scaffoldBackgroundColor: isDarkAmoled ? Colors.black : Colors.grey[850],
52.             canvasColor: isDarkAmoled ? Colors.black : Colors.grey[850], // for drawer background
53.             cardColor: isDarkAmoled ? Colors.grey[900] : Colors.grey[800],
54.           ),
55.           supportedLocales: [Locale('en'), Locale('de'), Locale('fr'), Locale('it'), Locale('nb'), Locale('pt'), Locale('ru'), Locale('tr'), Locale('es')],
56.           localizationsDelegates: AppLocalizations.localizationsDelegates,
57.           localeResolutionCallback: (Locale? locale, Iterable<Locale> supportedLocales) {
58.             for (Locale supportedLocale in supportedLocales) {
59.               if (supportedLocale.languageCode == locale?.languageCode || supportedLocale.countryCode == locale?.countryCode) {
60.                 return supportedLocale;
61.               }
62.             }
63.             return supportedLocales.first;
64.           },
65.         );
66.       }),
67.     );
68.   }
69. }

from converternow.

ferraridamiano avatar ferraridamiano commented on May 23, 2024

Converter NOW use a package called intl. This package generates a file called app_localizations. It is not a package, is a file generated by a package.
Anyway, what is the issue?

from converternow.

ferraridamiano avatar ferraridamiano commented on May 23, 2024

I'm closing this issue since it seems not related to a bug/request of the app. If you want to know how the app works please feel free to open a discussion in the dedicated tab

from converternow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.