hungps / flutter_pokedex

Pokedex app built with Flutter (with lots of animations) using Clean Architecture
https://hungps.com
Other
2.36k stars 562 forks source link

added flutter_web_frame. Showcasing #74

Closed Jesse-Lucas1996 closed 1 year ago

Jesse-Lucas1996 commented 1 year ago

image

Wow it's beautiful

Jesse-Lucas1996 commented 1 year ago

@hungps Wow flutter_web_frame works really well and pretty easy? What do you think? This is just a small showcase I can do the rest of the pages if you wish? The only issue I see is that I use an Ultrawide Monitor so my numbers might be slightly skewed

hungps commented 1 year ago

@Jesse-Lucas1996 Could you try to wrap the whole MaterialApp inside lib/app.dart with FlutterWebFrame? Like this:

class PokedexApp  extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
     return FlutterWebFrame(
       maximumSize: Size.fromWidth(1200),
       enabled: !Platform.isAndroid && !Platform.isIOS,
       builder: (_) => MaterialApp(
         ....
       ),
     );
  }
}
Jesse-Lucas1996 commented 1 year ago

@hungps Done!! It looks beautiful now

hungps commented 1 year ago

@Jesse-Lucas1996 Looking good! Please push your newest code and I will merge them into master.

Jesse-Lucas1996 commented 1 year ago

Where else did you want me to add it? @hungps

hungps commented 1 year ago

@Jesse-Lucas1996 Changing the background color based on the current theme is also great. Please change the FlutterWebFrame properties to these:

maximumSize: Size.fromWidth(400),
enabled: !Platform.isAndroid && !Platform.isIOS,
backgroundColor: isDark ? Colors.black12 : Colors.grey[200],
Jesse-Lucas1996 commented 1 year ago

@hungps Done :) I changed from 400 to 600 for from Width, imo it looks better but if you prefer 400 we can go with it :) you're the bossman

hungps commented 1 year ago

@Jesse-Lucas1996 Platform.isAndroid and Platform.isIOS seems to not working on the web. Please change enabled to kIsWeb || !Platform.isAndroid && !Platform.isIOS

Jesse-Lucas1996 commented 1 year ago

Have added @hungps

Jesse-Lucas1996 commented 1 year ago

@hungps just give me a ping if you want anything else done!