CaiJingLong / flutter_load_widget

Apache License 2.0
35 stars 13 forks source link

No MediaQuery widget found error #13

Closed luis-cruzt closed 3 years ago

luis-cruzt commented 4 years ago

Hi, i'm using the example code provided in your package, but when i add a textformfield and double tap it the error: No MediaQuery widget found error appears.

Also, i've been searching and this is what i found: https://stackoverflow.com/questions/62178788/flutter-easyloading-library-no-mediaquery-widget-found-error

That works with that library, but how to fix with yours?

CaiJingLong commented 4 years ago

Use next code to include the library.

MaterialApp(
  builder: (context, widget) {
    return LoadingProvider(
      child: widget,
    );
  },
);
luis-cruzt commented 4 years ago

Didn't work :(

vytautas-pranskunas- commented 4 years ago

Worked for me

harimayco commented 4 years ago

Use next code to include the library.

MaterialApp(
  builder: (context, widget) {
    return LoadingProvider(
      child: widget,
    );
  },
);

worked for me, Thanks mate!

luis-cruzt commented 3 years ago

Well, it doesn't work if you wrap your application like this: LoadingProvider( child: MaterialApp(), );

Using the following code works: void main() { runApp( LoadingProvider( child: MyApp(), ), ); }

I was using the widget MultiProvider maybe that was interfering with this widget.

I'll close this issue now as it seems that no one has this issue now.

GabrielF9 commented 3 years ago

@luis-cruzt i'm having the same issue using the MultiProvider, any update in user? Another lib that makes the same as this?

luis-cruzt commented 3 years ago

@GabrielF9 no sorry, i opted to use this package and is working fine in my app.

GabrielF9 commented 3 years ago

@luis-cruzt man, thanks so much, me and my job friends sends the best love you to you hahaha!! Saved the deploy friday