Issue When I set the background color in the layout everything works perfectly. However, when I try to set the it from a theme it won’t work. It seems I’m doing something wrong. Here is the code. Manifest: <activity android:name=”com.example.somma.MainActivity”
Continue readingTag: themes
Null check operator errors
Issue I could swear that when I ran this program it was fine until I hot reload and restart and now, I get the error: "Null check operator used on a null value", but I cannot remove anything now because
Continue readingFlutter combining text theme and direct styles
Issue I’m writing a Material app and want to use the predefined text theme styles as much as possible rather than re-inventing typical theme elements from scratch. So to set the text a little bigger I do this Text(‘foo’, style:
Continue readingFlutter: ElevatedButton has different theme on Linux
Issue Problem I have a Flutter application that uses an ElevatedButton widget. When I run the application on Windows the button colors are fine, but when I run it on Linux, they are different. Here’s my code : ElevatedButton( onPressed:
Continue readingFull Screen Activity for App in Android Studio
Issue I came across this app (I attach a screen), where you can see that the background of the app also seems to extend into the bar where there is the time, the network status, etc etc, I wanted to
Continue readingIs there an API to detect which theme the OS is using – dark or light (or other)?
Issue Background On recent Android versions, ever since Android 8.1, the OS got more and more support for themes. More specifically dark theme. The problem Even though there is a lot of talk about dark mode in the point-of-view for
Continue readingMaterialApp.router is not getting rebuilt when using Riverpod StateNotifier to change theme in Flutter, what am I missing?
Issue The MaterialApp.Router widget is supposed to rebuild whenever the theme is changed but it is not. When I do a manual hot reload after tapping a color the theme changes. Any ideas? I’m using the following package versions: dependencies:
Continue readingUsing dividerColor in Theme does not result in coloured Dividers
Issue I’m expecting that widgets in the display tree would be effected by a dividerColor having been set on my Theme in Flutter. High up in my widget tree is: MaterialApp( /* … */ theme: ThemeData(dividerColor: Colors.green) /* … */
Continue readingFlutter GetX Theme Mode Issue
Issue I am currently working on an application where I have implemented the dark mode. It’s all working good when I switch it from light mode to dark mode. The problem starts when I switch back from dark mode to
Continue readingHow can I set primaryContainer color with ColorScheme.fromSwatch() in Material Theme
Issue colorScheme offers in general the primaryContainer parameter. However, when I use `colorScheme.fromSwatch’ this is no longer available such as many other parameters. My understanding of fromSwatch is, I create a standard theme based on the key colors that I
Continue reading