The flutter theme widget can be used to define application wide colors, fonts and text styles in a flutter app.
Questions tagged [flutter-theme]
118 questions
1
vote
2 answers
How to dynamically theme BoxDecoration in Flutter / GetX
I am using GetX with Flutter and dynamically change Application theme via standard ThemeData. All is working great for properties within ThemeData.
However, I just implemented Drawer widget and wanted to also theme the 'decoration' property within…

mmerlin10
- 31
- 5
1
vote
2 answers
how can i change the TextStyle of showDateRangePicker() or showDateRangePicker() in flutter
Want to change the TextStyle of helpText in showDateRangePicker() in Flutter.
Can anybody Help.
buildMaterialDatePicker({BuildContext context, SearchVM model})
async {
final DateTimeRange picked = await showDateRangePicker(
…

DIVYANSHU SAHU
- 1,035
- 11
- 24
1
vote
0 answers
Flutter - why is overridden theme not applied to some widgets while it is to others?
I noticed that overriding the theme by Theme(data: Theme.of(context).copyWith(xxx: ...), child: ...) does not affect some widgets.
I came across similar phenomena several times while I was developing an app, but the below is the only instance I…

kaboc
- 814
- 1
- 6
- 23
1
vote
2 answers
How to create custom theme file for Flutter app
I am looking for a custom color theme pattern in Flutter. Something like following written in Swift.
struct Colors {
struct Text {
static var success: UIColor {
return UIColor.green
}
static var error: UIColor…

Tapas Pal
- 7,073
- 8
- 39
- 86
1
vote
1 answer
Dynamic Theme Change Based On System's Dark & Light Mode
I have been working on dynamic dark and light mode feature in flutter.
I want to change the app's theme as dark theme or light theme when i am changing the mobile system's dark/light mode from system settings.
But, I'm not able to change the app's…

Jay Mungara
- 6,663
- 2
- 27
- 49
0
votes
1 answer
change text color in dark theme in lfutter
I have defined a separate class for TextTheme and defined the desired textStyle, assigning it to the ThemeData for both light and dark themes, as shown in the image. However, the textColor is not being applied in the dark mode.
When I use two…

Hossein Saeedi
- 1
- 1
0
votes
1 answer
How to give text color black in Flutter web app when device display mode is dark?
I have created a web application in Flutter and it is working as expected but I am facing issue on some mobile devices (especially on default browser on Samsung devices, it works well on Chrome). On login page my page background color is white and…

user14805610
- 79
- 2
- 13
0
votes
1 answer
Flutter date range picker's in between color won't change
I have a Flutter app that uses showDateRangePicker to pick a date range. When I pick a range, though, the color in between the picked dates is somehow cyan. I'm assuming it's one of the standard application colors since I haven't selected cyan…
0
votes
0 answers
Flutter: Change color of every modalBottomSheet within the darkTheme ThemeData options?
I have this code for my dark mode color theme. And I want to changed the color of all modalBottomSheets globally using this code. However I can't figure out what I use to change that part of the theme.
var kDarkColorScheme =…

nh44
- 1
- 1
0
votes
0 answers
Flutter GetX Get.changeTheme() not working after installing release APK and desktop software, but works in debug mode on Android emulator
I am having an issue with Flutter's GetX package when using the Get.changeTheme() method. The method works perfectly fine when running the app in debug mode on the Android emulator. However, after I install the release APK on a physical device or…

Abdul moiz
- 1
- 1
0
votes
0 answers
Flutter Dark Mode
I have an old app to update to be Dark Themed, but I have a problem of approaching this task the right way. There is no usage of ThemeData in the MaterialApp prop, just a CustomColorPalette class that is used through the entire app. My question here…

GrandMagus
- 600
- 3
- 12
- 37
0
votes
1 answer
Flutter Apply Color to Text in Custom Theme
I am using Flutter + Dart to make a mobile app. I have defined a CustomTheme class which looks like the following
class CustomTheme {
static ThemeData lightTheme = ThemeData(
primaryColor: Colors.red,
colorScheme:…

Acheese
- 61
- 6
0
votes
1 answer
How can I define a global TextTheme variable in flutter?
I am using ThemeData to implement dart/light theme
I have to write Theme.of(context).textTheme in each place under the build method
to get access to the textTheme.
Is there a way which can solve this problem where I don't need to write this every…

As Kira
- 1
0
votes
0 answers
Flutter Switch Light/Dark Theme MaterialApp bool variable issue
I am writing code to change Dark/Light Theme using SwitchListTile where I need to use bool type variable.
Issue: The MaterialApp has no Dark/Light Theme bool variable parameter.
Using ValueNotifier and ValueListenableBuilder uses non-bool enum type…

DktPhl2018
- 155
- 1
- 1
- 8
0
votes
0 answers
Flutter Shadow does not render correctly, while using darktheme
I got this weird looking shadow (blocky and not smooth), whenever I am using the darktheme. The custom BoxShadow is inside the themedata using themeextensions.
Hope anybody can explain to me, why this happens and how to fix it. If you need more…

Jonny M5
- 1