35 questions
0
votes
2
answers
81
views
How to integrate custom ThemeData for Flutter package without conflicting with Flutter's core ThemeData to implement Material3 Expressive?
I'm working on a new Flutter package to implement 𝗠𝗮𝘁𝗲𝗿𝗶𝗮𝗹 𝟯 𝗘𝘅𝗽𝗿𝗲𝘀𝘀𝗶𝘃𝗲 𝗱𝗲𝘀𝗶𝗴𝗻 𝗰𝗼𝗻𝗰𝗲𝗽𝘁𝘀.
Currently stuck on integrating ThemeData.
Here's details on what approach I am ...
1
vote
1
answer
80
views
How to fix this lerp method override in creating a customized ThemeData of my own?
I am trying to write a custom ThemeData which I can pass to the extensions property of the ThemeData and be able to access them easily in my project. I have attached below the minimal code of what I ...
0
votes
1
answer
125
views
Why does my Flutter app hang at the splash screen when using ThemeDecoder in package:json_theme_plus to import a JSON theme generated by Appainter?
I am trying to implement a global theme in a Flutter app that has been generated by Appainter as a JSON file. I have followed the instructions to implement the JSON file here. When I start debugging,...
0
votes
2
answers
193
views
Access ThemeData property inside ThemeData definition
In my Flutter app I declare ThemeData with a colorSchemeSeed:
return MaterialApp(
...
theme: ThemeData(
useMaterial3: true,
visualDensity: VisualDensity.adaptivePlatformDensity,
...
1
vote
0
answers
68
views
flutter how to change copy/pause menu theme in common ThemeData(darktheme & lighttheme)
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:test/config/app_theme.dart';
class ...
0
votes
1
answer
361
views
How to apply different style to ElevatedButton with or without icons
In my application I have many ElevatedButtons, which I style in the main theme. I need to style the ones with icon differently than the ones without icon.
Here is the code with only one property, ...
1
vote
2
answers
1k
views
How to use Theme.of(context) to add color to labelTextStyle
In the general ThemeData of my flutter app, I have the following code to give a general style to the NavigationBar.
This is the way to style the label under the icon within NavigationBarTheme, based ...
2
votes
1
answer
739
views
Why is my Flutter ThemeData not getting applied to my app?
I am just starting to learn Flutter and am following a Youtube tutorial. As far as I can tell I've copied the code exactly, however, my ThemeData is not getting applied to my app. I've also noticed ...
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: "...
0
votes
2
answers
75
views
Flutter: How to get a value inside ThemeData?
I'm trying to style my app globally and I have some questions about hot the properly retrieve the value like this!
This code it's not working because there is no context at this point, but is there ...
1
vote
2
answers
137
views
What is the name of the widget inside DatePicker? How can I customize it from ThemeData?
I'm customizing the DatePicker I'm using, and I'm stuck at the widget in the highlighted area. I can't figure out which widget it is, and therefore, I'm unable to change the text to white color from ...
0
votes
1
answer
233
views
Flutter using Themedata Dark and Lightmode but in first place it should use the Device Setting
theme.dart
import 'package:flutter/material.dart';
final systemTheme = ThemeMode.system;
ThemeData lightMode = ThemeData(
brightness: Brightness.light,
colorScheme: ColorScheme.light(
...
0
votes
0
answers
82
views
ListView ThemeData after Flutter update
After the Flutter upgrade to Flutter Version 3.17, many controls have a new look. I managed to make most of the adjustments to get the old design back.
But I have a ListView in a Tab of a TabBar. The ...
0
votes
1
answer
61
views
How to overwrite ElevatedButtonThemeData's foregroundColor in the widget
I am looking for a way to change elevatedButton's foreground, and background color declared in main.dart.
What I tried to do is I want to receive foregroundcolor as an optional from the child widget, ...
1
vote
3
answers
546
views
How to prevent riverpod's ConsumerWidget rebuilds managing ThemeMode
I'm managing the ThemeMode of my flutter application with Riverpod state Provider that works as expected up until I try to read Theme.of(context) to get ThemeData's current values which causes ...
0
votes
1
answer
440
views
Change button color on showDatePicker
I want to achieve the above design for my showDatePicker.
Right now the button color is white and I want it to be pink.
Is it possible?
Here is what I'm looking for:
Here is my code:
showDatePicker(
...
2
votes
2
answers
954
views
Why doesn't ThemeData's fontFamily apply to all text like AppBar, Tab, etc
I finally found out.
I set the fontFamily as follows.
@override
Widget build(BuildContext context) {
return GetMaterialApp(
theme: ThemeData(
fontFamily: 'YourAwesomeFontFamily',
),
...
2
votes
1
answer
1k
views
Flutter ColorScheme CopyWith brightness not working
In my Flutter project app_theme.dart file I have this code:
class AppTheme {
static const primaryColor = Color.fromARGB(255, 106, 49, 185);
static ThemeData lightTheme() {
return ThemeData(
...
3
votes
1
answer
10k
views
How can I upgrade "accentColor" in "ThemeData" in Flutter?
I got the following code:
theme: ThemeData(
primarySwatch: Colors.purple,
accentColor: Colors.deepOrange,
fontFamily: 'Lato',
pageTransitionsTheme: PageTransitionsTheme(
...
0
votes
1
answer
471
views
how to customise the toolbar for a flutter SelectableRegion
When text in a SelectableRegion widget is selected, the toolbar generated by materialTextSelectionControls has options for 'Copy' and 'SelectAll'. What is the best way to disable 'SelectAll' and how ...
0
votes
2
answers
992
views
How do I set multiple color in theme data flutter?
Here is my code:
static final darkTheme = ThemeData(
textTheme: GoogleFonts.rubikTextTheme()
.apply(bodyColor: Color(0xFFf2f2f2), displayColor: Color(0xFFf2f2f2))
....
1
vote
1
answer
150
views
Flutter - How to change the color of the text being selected by the cursor?
I need to change the color of the text being highlighted by the cursor. I am able to chagne the color of cursor, its selction and handler using textSelectionTheme. But, how can I change the color of ...
0
votes
0
answers
194
views
The named parameter 'pageTransitionsTheme' isn't defined
How to update the following code to the last Flutter version?
theme: ThemeData(
primarySwatch: Colors.purple,
accentColor: Colors.deepOrange,
fontFamily: 'Lato',
...
1
vote
1
answer
623
views
Primary custom color not working in flutter
I have a problem here I want to change color of textbutton from themedata but its not working. Here is my code :
darkTheme: ThemeData(
primaryColor:Colors.white,
textButtonTheme: ...
0
votes
1
answer
456
views
Bottom Navigation Bar gradient icon in theme data
I want to use Linear Gradient icon in my bottom navigation bar for selected icon property can anybody tell me how to do it !
Thank You.
-1
votes
1
answer
864
views
Flutter-Scaffold giving Black background instead of my custom color
I made an AppTheme class as follows :
class AppTheme {
static const Color white = Colors.white,
white2 = Color(0x00fefefe),
grey1 = Color(0x00e5e5e5),
grey2 = Color(0x006b718b),
...
0
votes
2
answers
2k
views
Flutter upgrade to 2.5.3 causing deprecated issue
I have been been able to upgrade my code from flutter 1.2.0 to 2.5.3. Still I am getting some deprecated warnings as mentioned below:
info • 'buttonColor' is deprecated and shouldn't be used. No ...
0
votes
1
answer
221
views
Can I use two ThemeData types?
I am trying to use these two ThemeData types in my MaterialApp. Check it out:
return GetMaterialApp(
debugShowCheckedModeBanner: false,
title: 'DISH Connect',
home: SiteLayout(),
theme: ...
1
vote
0
answers
58
views
Flutter - Context is passed to only one of BottomNavigationBarItem
My app has a BottomNavigationBar with two BottomNavigationBarItem: HomePage() and UserPage().
main() runs App() and App() returns FutureBuilder to handle flutter initialization error and loading gif. ...
0
votes
0
answers
328
views
Setting theme data for flutter app seems broken
I've tried everything I can think of to change the background color of my flutter app, but every time I run the app, the background is black.
This is main.dart
import 'package:firebase_core/...
1
vote
1
answer
2k
views
Accessing colorScheme in Widgets in Flutter
Wanted to use accent color for Card and since accentColor is deprecated I used colorScheme instead .Described colorScheme in themeData of MaterialApp. But in the end couldnt use that for card.
Showing ...
0
votes
3
answers
2k
views
Flutter ThemeData
I want to set a ThemeData in my project but I can't set the correct background color. I think that the problem is about brightness....
theme: ThemeData(
colorScheme: ColorScheme(
...
1
vote
1
answer
977
views
Flutter Extend ThemeData, add colours etc
I am trying to extend the color scheme used by my first app. I created a separate file that contains the following:
import 'package:flutter/cupertino.dart';
class Testy extends CupertinoThemeData {
...
0
votes
0
answers
207
views
How to save ThemeData in flutter
In my Flutter app the user can define a custom Theme by picking the colors from color pickers. After that they can save the ThemeData to a list and use it. The problem is that after the app restarts ...
0
votes
1
answer
612
views
App's global ThemeData not working properly in flutter?
I want to use ThemeData's textTheme for global using in my app , And the textTheme is only change the font and color.
But As you can see in the picture , there will be a obvious difference between the ...