OpenFlutter / flutter_screenutil

Flutter screen adaptation, font adaptation, get screen information
https://pub.dartlang.org/packages/flutter_screenutil
Apache License 2.0
3.87k stars 493 forks source link

In different android device this package doesnt work properly, example samsung A51 #443

Closed lala-naibova closed 1 year ago

lala-naibova commented 1 year ago
ScreenUtilInit(
      designSize: const Size(375, 812),
      minTextAdapt: true,
      builder: (context, child) {
        return MaterialApp(
          locale: const Locale('en'),
          debugShowCheckedModeBanner: false,
          localizationsDelegates: const [
            AppLocalizationsDelegate(),
            GlobalMaterialLocalizations.delegate,
            GlobalWidgetsLocalizations.delegate,
            GlobalCupertinoLocalizations.delegate,
          ],
          supportedLocales: const [
            //Locale('en', ''),
            //Locale('ru', ''),
          ],
          builder: EasyLoading.init(),
          localeResolutionCallback:
              (Locale? locale, Iterable<Locale> supportedLocales) {
            var locale1 = supportedLocales.firstWhere(
                (element) => element.languageCode == locale!.languageCode,
                orElse: () => supportedLocales.first);
            return locale1;
          },
          onGenerateRoute: AppRouter.onGenerateRoute,
          home: child,
        );
      },
      child: const SplashScreen(),
    )
robertapache commented 1 year ago

Hi Lala, I hope you are well. My two cents: Could you please specify what does not work?

lala-naibova commented 1 year ago

It was my mistake, everything works fine