133 questions
0
votes
1
answer
118
views
changing text color in flutter
So I am completely new to flutter, and want create an app.
I found that you can define a theme for the entire app, so I want to give it a go.
Unfortunately though I don't seem to have any real control ...
2
votes
0
answers
145
views
High Contrast theme in Flutter
Theming is defined in the MaterialApp widget in Flutter. For example:
MaterialApp(
// ...
theme: AppTheme(...),
highContrastTheme: AppTheme(...),
darkTheme: AppTheme(...),
...
-1
votes
2
answers
57
views
textTheme will not apply for all Text widget
i wanna use custom textTheme inside the ThemeData but this custom text will not be apply to all Text widget for instance : Text inside the ListTile will get style from inherit Widget which is not what ...
0
votes
0
answers
68
views
TextStyle color does not effect on chips in flutter
The color of choice chips have a blury effect and does not show real color. Why this happen?
Choice chips :
if (index == 0) {
return ChoiceChip(
...
0
votes
0
answers
27
views
Is there a simple way in Flutter to get the style details that a Widget WOULD have if built
I find I often have the same problem. I am making a widget, and I want it to look "normal", which requires some manual tweak for some reason. In that case, I want to find out, "If I ...
0
votes
1
answer
143
views
Flutter platform brightness irregularities
In my flutter app, I allow user to change the theme of the app using either Follow System, Light or Dark theme.
But the status bar color doesn't change appropriately. My status bar icon color always ...
1
vote
1
answer
166
views
Changing app theme in flutter resets the whole app state
I have in my settings page the ability for the user to change the app theme at runtime, but I am running into some problems.
The problem that I am using shared preferences with Riverpod to store the ...
0
votes
1
answer
200
views
remove ripple splash effect on tabbing tabbar flutter
I try Remove ripple effect on tab bar when tab or click on TabBar
this answer :
https://stackoverflow.com/questions/52914982/remove-highlight-when-flutters-tabbar-is-tapped#:~:text=That's%20the%...
1
vote
1
answer
65
views
Flutter: App initializes with incorrect cursor color and requires hot reload after login
I'm experiencing an issue in my Flutter app where the app launches with an incorrect cursor color (e.g., purple instead of the expected color). This issue persists through the login process, and only ...
0
votes
1
answer
65
views
Can I change default hover color for only one widget in Flutter?
I'm trying to change or quit the default color when hovering a widget in Flutter web, in specific with showMenu function like this: `
items: items.map(
(item) {
return PopupMenuItem<String>...
0
votes
2
answers
413
views
How to get primary color from the theme of a flutter app
I have a problem with theming a flutter app. I cannot get the primary color from of the theme. Here is the example code
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}...
0
votes
2
answers
90
views
changes in the settings theme are not immediately reflected in the current UI
I use the following code to implement multi them in my app, when I changed the them and select a new one, the whole app is changed correctly, except the current view which not changed, what the ...
0
votes
1
answer
108
views
Custom ColorScheme.primary color doesn't show up in Flutter app
I'm learning Flutter, and I'm trying to define a custom color scheme for my app. I'm using ColorScheme.light().copyWith(), since I only want to override a few colors. I've defined a new primary color ...
0
votes
2
answers
556
views
Adding a modifiable property to TextTheme in Flutter
I'm trying to add a property to TextTheme that I can modify in my ThemeData. I've declared the following extension
extension CustomStyles on TextTheme{
TextStyle get disabledText => const ...
0
votes
2
answers
196
views
Flutter custom ThemeData Not Working in Release Mode
I am currently working on a Flutter project and I have defined a light theme in my app_theme.dart file as follows:
final ThemeData lightTheme = ThemeData(
useMaterial3: true,
fontFamily: "...
-1
votes
2
answers
101
views
remove default backbutton background color
I would like to remove the background color of the default backbutton. I have below configurations but it still appears like in the photo. TIA for all inputs.
hightlightColor: Colors.transparent,
...
0
votes
1
answer
108
views
why custom theme properties not working [dart]?
This is a custom theme code that I created in the main page.
It didnt work, but when I use it indivually with a specific widget it works
import 'package:flutter/material.dart';
import 'package:theme/...
1
vote
1
answer
127
views
Flutter, Theme is ignored when i imported from files
i'm new to flutter, i learn from this tutorial to setup a theme
i successfully to create a light and dark theme when i code the theme directly inside the main.dart, but when i code the theme inside ...
0
votes
1
answer
75
views
Can't use a custom class/color to set the color value of scaffoldBackgroundColor
I've created a custom set of colors to reuse in a Flutter app, but I'm getting an error when I try to use the colors to set the scaffoldBackgroundColor color value.
The argument type 'UIColor' can't ...
1
vote
1
answer
1k
views
How do I change the status bar and Navigation bar themes to match the current theme of a flutter app?
I am building a flutter mobile app and I would like the status bar and navigation bar themes to match the current theme of the app. The app theme can be changed by the user. Examples in the ...
54
votes
6
answers
28k
views
After upgrading to Flutter 3.16, the app bar, background color, button size, and spaces change
I upgraded my Flutter version to 3.16. When I run my app, I notice a lot of changes in the UI.
The app bar doesn't have shadows anymore. When I scroll, the app bar is now tinted with a color and ...
1
vote
1
answer
73
views
why the appbar do not take the default colour in flutter
import 'package:businesscard/cubits/get_weather_cubits/get_weather_cubit.dart';
import 'package:businesscard/cubits/get_weather_cubits/get_weather_states.dart';
import 'package:businesscard/screens/...
1
vote
1
answer
1k
views
What is the difference between ColorScheme and ColorSchemeSeed in Flutter?
In Flutter, one can apply a theme to the app using ThemeData class. But there two propeties of this class that confuses me: ColorScheme and ColorSchemeseed. What's the difference between these two ...
1
vote
2
answers
4k
views
How to apply Theming to CircularProgressIndicator.adaptive() in Flutter for both Android and iOS?
I'm currently working on a Flutter project and trying to incorporate Theming into my app. Specifically, I want to apply Theming to the CircularProgressIndicator.adaptive() widget. While I've ...
0
votes
1
answer
94
views
OutlinedButton BorderSide is ignored in OutlinedButtonThemeData => Borderside.color and BorderSide.width is always default
I am trying to apply a custom buttonStyle inside of ThemeData for my Flutter App.
Everything works fine, but the BorderSide is ignored and is always the default (BorderSide.color = Colors.black and ...
0
votes
2
answers
151
views
DropdownButton text style doesn't change
I'm trying to use Montserrat with a custom color on my DropdownButton but for some reason, the TextStyle is not being applied.
Here is my code:
DropdownButton(
value: value,
dropdownColor: ...
0
votes
1
answer
2k
views
Change text color in dark theme in flutter
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 ...
0
votes
1
answer
743
views
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 ...
0
votes
0
answers
169
views
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 ...
0
votes
1
answer
103
views
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: ...
0
votes
1
answer
319
views
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 ...
1
vote
0
answers
884
views
Implemention of Dark/light theme mode in flutter
i am trying to create a way to start my app with system theme and then giving user a switch to choose between light mode and dark mode
in my main.dart file
import 'package:edubro/pages/Attendance/...
1
vote
1
answer
2k
views
Flutter: How can I use different colors for IconButtons in the AppBar versus everywhere else
Im applying a global theme to the IconButtons within a MaterialApp, so I set up an iconButtonTheme. This theme handles color changes to the IconButtons when the IconButton is disabled. This appears ...
0
votes
0
answers
267
views
MaterialState in NavigationBarThemeData is not working
I'm tring to change labels color depends on if it selected or not, but flutter sets 1 color for all
NavigationBarTheme(
data: NavigationBarThemeData(
backgroundColor: Theme....
2
votes
2
answers
2k
views
Flutter ColorScheme not applying colors
I'm trying to use a dark theme in a Flutter app but everything seems wrong. I'm using dark theme like this.
ThemeData darkTheme = ThemeData.from(
useMaterial3: true,
colorScheme: ColorScheme.dark(
...
0
votes
1
answer
953
views
What are differences between text theme of material specification 2014 and text theme of material specification 2018 and 2021?
What are differences between text theme of material specification 2014 and text theme of material specification 2018 and 2021?
If you update flutter SDK to latest version, you will receive several ...
0
votes
1
answer
986
views
Flutter Theme Dark/Lights Theme toggle doesn't work
there is a dark/light theme toggle function in this snap of code. There is no error when I compile, debuging this code. But It doesn't work.
For example, I never define scaffoldbackgroundColor(...
0
votes
1
answer
98
views
is there an advantage of using TextTheme in Flutter?
themeData.copyWith(
colorScheme: //...
scaffoldBackgroundColor: //...
textTheme: const TextTheme(
headline1: TextStyle(/*...*/),
subtitle1: TextStyle(/*...*/),
...
1
vote
1
answer
195
views
I'm getting this error when I add theme data in flutter
import 'package:flutter/material.dart';
import 'package:my_application_1/pages/home_page.dart';
void main() {
runApp(my_application_1());
}
class my_application_1 extends StatelessWidget {
@...
0
votes
0
answers
167
views
I need my toggle switch in the appBar to be visible
I have created a toggle switch in the appBar but its not visible because of the code.
It changes themes between light to dark when clicked
main.dart
class MyApp extends StatelessWidget {
static ...
2
votes
1
answer
626
views
Changing the themeColor of CheckBoxListTile globally using material3
In Flutter documentation, it's given
The Material widgets Switch, SwitchListTile, Checkbox, CheckboxListTile, Radio, RadioListTile now use ColorScheme.secondary color for their toggleable widget.
...
-1
votes
1
answer
2k
views
Forcing child widget to inherit its parent's style in flutter
Many flutter widgets forces their child to inherit their style, like:
ElevatedButton(
child: Text("Click Me."),
onPressed: (){},
);
this ElevatedButton() will force its Text() child ...
2
votes
1
answer
343
views
Flutter iOS Brightness undefined name
I'm building an App for iOS on Flutter. in the ColorScheme there's the brightness property and on Windows there's no error and it works, but when i open the code on the mac OS it says "undefined ...
0
votes
2
answers
1k
views
How to change the keyboard color to dark on Android in Flutter?
My app uses dark theme as
ThemeData.dark().copyWith( ... ),
that defined for theme property of MaterialApp.
Since the keyboardAppearance property only works on iOS, it doesn't seem to be possible to ...
2
votes
1
answer
1k
views
Better approach to set font size in flutter
I've seen some posts recommending to set fontSize or TextStyle for Text widget using Theme
// textStyle
Theme.of(context).textTheme.bodySmall
OR
// fontSize
Theme.of(context).textTheme.bodySmall....
0
votes
2
answers
740
views
Advatanges and disadvantages of using theme extensions for storing colors instead of class
What are the advantages of using theme extension for storing custom colors instead of class containing static consts?
class AppColors {
static const Color brandColor = Color(0xFF1E88E5);
...
13
votes
3
answers
3k
views
Flutter/Material 3: AppBar ignores icon themes
In my AppBar the title is displayed with white text, but the icons are a dark grey or something.
I Would like to have the icons white, too.
But the colors in the icon themes have no effect!
Not when ...
3
votes
1
answer
969
views
Toggle theme mode using bloc in flutter
I'm new to flutter, I'm building an app using bloc for state management.
I'm trying to toggle theme mode using IconButton on the appBar but the theme won't change when I press the button.
how can I ...
2
votes
2
answers
1k
views
Flutter, the textTheme property of the AppBarTheme class is deprecated, what should I use instead?
I am curently learning Flutter on the Maximilian Udemy Course, and when I reached the section when I have to use the textTheme property of the AppBarTheme class, it's telling me that it's deprecated. ...
0
votes
1
answer
41
views
Flutter change extends
I want to change the color based on the theme mode. In AppTheme I mention var
class AppTheme {
static AppTheme of(BuildContext context) => DarkModeTheme();
late Color primaryColor;
late ...