FlutterMinimalWebsite icon indicating copy to clipboard operation
FlutterMinimalWebsite copied to clipboard

Integration with GetX !!

Open a7mdragab opened this issue 2 years ago • 2 comments

How to use the update version with GetX.

I used this as doc.

builder: (context, child) => ResponsiveBreakpoints.builder(
        child: child!,
        breakpoints: [
          const Breakpoint(start: 0, end: 450, name: MOBILE),
          const Breakpoint(start: 451, end: 800, name: TABLET),
          const Breakpoint(start: 801, end: 1920, name: DESKTOP),
          const Breakpoint(start: 1921, end: double.infinity, name: '4K'),
        ],
      )

But it doesn't scale properly.

The old code was working

ResponsiveWrapper.builder(
    ClampingScrollWrapper(child: child),
    minWidth: 480,
    maxWidth: 1980,
    mediaQueryData: MediaQuery.of(context).copyWith(textScaleFactor: 1),
    defaultScale: true,
    breakpoints: const [
      ResponsiveBreakpoint.resize(480, name: MOBILE),
      ResponsiveBreakpoint.resize(700, name: TABLET),
      ResponsiveBreakpoint.resize(1000, name: DESKTOP),
    ],
  )

I checked the onGenerateRoute but stuck with GetX in this line

  child: BouncingScrollWrapper.builder(context, settings.name, dragWithMouse: true),
```
settings.name not widget

What to do?

a7mdragab avatar Jun 15 '23 14:06 a7mdragab

Facing Same issue. Why using onGenerateRoute for responsiveness ? A Detailed Documentation or Video will help.

rishi058 avatar Dec 14 '23 07:12 rishi058