Flutter inappwebview not using system theme - flutter

I'm using inappwebview to show my webpage in-app (currently using google to test), however it seems to not use my system theme. ie. when I toggle my emulator device from light to dark mode, google stays in light mode.

It's an obvious thing that the Webview part will not use your theme as it has its separate from Flutter App.
We are just showing the webpage in Webview so indirectly it is not a part of our app.
Even if you want to achieve this kind of thing, you can reload the URL when you change the theme in the app.
Edited:
I think you can do something like this when you change the theme: https://stackoverflow.com/a/70195085/1318946

Related

Assigning CanvasKit / Skia in Flutter Web causes my Googlemap's plugin to request 2 fingered use on mobile

I have mad jank when scrolling a ListView. Its scrolling a column of Text widgets interspersed with ElevatedButton Widgets, each time the user Scrolls and an ElevatedButton scrolls into view there's a bunch of jank, horrible.
On Flutter web desktop this doesn't happen, so I forced Flutter web mobile to use Skia rendering, by inserting this into my index.html file:
<script>
// This sets the Flutter web renderer in auto detect mode.
// See https://stackoverflow.com/a/64583462/6509751.
window.flutterWebRenderer = 'canvaskit';
</script>
But this seemingly causes the Googlemap's plugin to believe that it is being used on a desktop not mobile, and it requests 2 fingered use.
This is not the paradigm for Googlemaps on mobile and I vaguely believe jank is better.
I would like it to work well on both desktop & mobile, is there a way to correct the google map plugin to use the mobile / desktop paradigms?

want to change the splash screen by app theme, not device theme

in Flutter I want to change the splash screen of the app according to the theme set by the app, but I can't find a way.
Instead of changing it according to the theme of the device itself, I would like to use the theme set by the app

Changing transition of screen using Auto Route flutter

I am using auto route in my flutter app. I need different page transitions for single page, for example if you are opening screen A from screen B it should open from rightside(Screen A should have transition Transitions.slideRight) and if you are opening screen A from Screen C it should open from left side. This mean that I have to change that transition programmatically in runtime, but don't know how to do that because flutter autoroute works with generated routes, and I am not sure that I can write some conditions for that.
Please give me some solutions to fix this if it is possible.
in your router file, you can use CustomRoute instead of AutoRoute:
CustomRoute(
page: HomePage,
transitionsBuilder: TransitionsBuilders.slideRight),
you can see more info here:
https://pub.dev/documentation/auto_route/latest/#custom-route-transitions

circular reveal theme switcher like telegram in flutter

I am using DayNight theme in my application. And I have a button that changes the theme. In Telegram app there is a beautiful reveal animation that changes the theme without restarting activity or something like that. How to achieve this in flutter? and also the theme change should be persistent using shared preference and provider.
i want to achieve something like this:-
Here is what you are looking for

Change Background Image in Flutter according to theme

I have different pages, and one FloatingActionBar, whensoever I am clicking on it, the theme of the application is getting changed. But I also want to change the background image of the app. How can I do that?