Skip to content

Getx: Responsive is not applied #77

@dalton5

Description

@dalton5

Hi I use getx and I tried a lot of solutions but I do not see any scaling changes.

I tried with an iPad, iPhone. Nothing changes.

What's wrong?

My code:

   `runApp(Wiredash(
    projectId: 'xxxx',
    secret: 'xxxxxxx',
    navigatorKey: navigatorKey,
    child: hideKeyboardWhileTapOnScreen(GetMaterialApp(
        title: L.localize(''),
        debugShowCheckedModeBanner: false,
        navigatorKey: navigatorKey,
        navigatorObservers: [
          AnalyticsService.instance.getAnalyticsObserver()
        ],
        theme: ThemeData(
          primarySwatch:
              PaletteGenerator.generateMaterialColor(MyTheme.PrimaryColor),
          primaryColor: MyTheme.PrimaryColor,
          accentColor: MyTheme.SecondaryColor,
          textTheme: GoogleFonts.ralewayTextTheme(),
          disabledColor: Colors.grey.withOpacity(0.5),
          errorColor: MyTheme.PrimaryColor,
        ),
        home: MyApp(),
         builder: (context, widget) => ResponsiveWrapper.builder(
        BouncingScrollWrapper.builder(context, widget!),
        maxWidth: 1200,
        minWidth: 450,
        defaultScale: true,
        breakpoints: [
          ResponsiveBreakpoint.resize(450, name: MOBILE),
          ResponsiveBreakpoint.autoScale(800, name: TABLET),
          ResponsiveBreakpoint.autoScale(1000, name: TABLET),
          ResponsiveBreakpoint.resize(1200, name: DESKTOP),
          ResponsiveBreakpoint.autoScale(2460, name: '4K'),
        ],
      ),))));

}, (error, stack) => FirebaseCrashlytics.instance.recordError(error, stack));`

The code of MyApp()

   `class MyApp extends GetView<MainController> {
   @override
 Widget build(BuildContext context) {
 // controller.redirect = true;
return GetBuilder<MainController>(
    init: MainController(),
    builder: (controller) {
      return SplashScreen();
    });
}

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions