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
0
votes
1 answer
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 Color secondaryColor;
}
In dark mode colors
class…

dinesh balan
- 318
- 1
- 14
0
votes
3 answers
How to Modify FlutterFire UI Accent Colour
I've been struggling with attempting to modify the accent colour in FlutterFire UI.
Namely, I'd like to change the blue accent colour here to a different material colour, such as purple. I've messed around with the app theming to no avail, as none…

Garv Shah
- 1
- 3
0
votes
1 answer
The method 'dark' isn't defined for the type 'ThemeData'
I'm getting this errror while following a lecture. ThemeData.dark() is not working properly.
import 'package:zoom_clone/screens/login_screen.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key?…

Arjit Bhamu
- 63
- 9
0
votes
0 answers
Change contrast with slider in flutter
I want centralise contrast theme with change according to slider value.
I want do as like

Harsh Sureja
- 1,052
- 1
- 9
- 22
0
votes
1 answer
How to apply default text style in a custom layout in flutter?
I try to build a custom layout that is a Card() with 2 properties : Widget title, and Widget content.
I would like to apply a default text style on the title widget, if it is a Text widget, ie. like flutter does in AppBar. It is easy if the title…

Galactose
- 175
- 3
- 8
0
votes
1 answer
Having issue adding theme data to flutter project
Hi I was trying to add my custom theme data to flutter code but it shows this error
I am using flutter_screenutil: ^5.3.1 for responsive UI. kindly help
#39 CustomTheme.lightTheme
package:hms/util/theme.dart:8
#40 …

Muhammad Haad Bin Zahid
- 21
- 1
- 8
0
votes
2 answers
How to change the icon according to the theme in flutter
I'm using provider for managing the dark and light mode along with shared preferences to save it. I have successfully managed to save the selected theme but I'm unable to change the icons and the text in ListTile of my drawer according to the…

Ali Akbar
- 121
- 12
0
votes
1 answer
Flutter GetX Custom Theme for Button
I have written my custom theme like this and stored it in Get storage.
class Themes {
static final lightTheme = ThemeData(
brightness: Brightness.light,
colorScheme: const ColorScheme.light(),
outlinedButtonTheme:…

Nazmul Hasan
- 175
- 2
- 12
0
votes
1 answer
Flutter TabBar wrong labelColor when use ThemeData
I try to change labelColor value for TabBar via ThemeData.
child: MaterialApp(
theme: ThemeData.light().copyWith(
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.deepPurple,
).copyWith(
…

luigibros
- 69
- 5
0
votes
2 answers
Globally remove all drop shadows in Flutter app?
Is there a way to globally remove all drop shadows in Flutter app?
I would like to do that in single place instead of setting elevation: 0 for all MaterialButtons, ElevatedButtons, etc.
I would like set theme, or do it another way, but globally in…

jakub
- 3,576
- 3
- 29
- 55
0
votes
2 answers
How to access ThemeData from imported widgets
I can not use the ThemeData from the imported custom Widgets that I have imported from other files, I dont know if the BuildContext is changing or what. To all the widgets that are used in the main.dart file they can easily use…
0
votes
1 answer
Getting error while applying color to Flutter widget
I'm new to Flutter and Dart. I'm not sure why I'm getting this syntax error while applying color to the Text widget using ThemeData.
Below are the details of my Flutter and Dart:
Flutter 2.2.1 • channel stable •…

xpetta
- 607
- 12
- 28
0
votes
1 answer
Change colors of TextFormField using ThemeData
I would like to change the color of the PrefixIcon and suffixIcon as well as the color of the cursor using ThemeData when the TextFormField gets the focus to match with the color of the TextFormField's border color.
Also I would like to understand…

xpetta
- 607
- 12
- 28
0
votes
2 answers
Using dividerColor in Theme does not result in coloured Dividers
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)
/* ... */
);
And yet…

shennan
- 10,798
- 5
- 44
- 79
0
votes
0 answers
How to set the SliverAppBar's Title style from the MaterialApp's theme parameter?
If I would like to set the style of a regular appbar title from the MaterialApp theme parameter, I would do the following:
ThemeData(appBarTheme: const AppBarTheme(
textTheme: TextTheme(
headline6: TextStyle(
color: Colors.red,
…

Ittai Barkai
- 120
- 1
- 9