Questions tagged [themedata]

24 questions
3
votes
1 answer

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( builders: { TargetPlatform.android:…
best_of_man
  • 643
  • 2
  • 15
2
votes
2 answers

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', ), ..., ); } And I wanted to change the…
debug_ing
  • 476
  • 3
  • 13
1
vote
3 answers

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 rebuilding of the widget in excess (13~14 times in a…
Rinaldi Segecin
  • 449
  • 8
  • 23
1
vote
1 answer

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: TextButtonThemeData( style:…
1
vote
0 answers

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. Then it returns MaterialApp with first page being…
Younghak Jang
  • 449
  • 3
  • 8
  • 22
1
vote
1 answer

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 error: "The argument type 'ColorScheme' can't be…
Shanu
  • 311
  • 2
  • 16
1
vote
1 answer

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 { final Color bgws = Color.fromRGBO(120, 120, 120,…
Walrus
  • 19,801
  • 35
  • 121
  • 199
0
votes
1 answer

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( context: context, builder: (context,…
genericUser
  • 4,417
  • 1
  • 28
  • 73
0
votes
0 answers

FormBuilderDateTimePicker: how to customize colors?

I use the formbuilder package and I have troubles to customize the colors of the pop up to select a time of FormBuilderDateTimePicker since FormBuilderCupertinoDateTimePicker is depreceted. With the FormBuilderCupertinoDateTimePicker I could set the…
Isabelle
  • 1
  • 1
0
votes
0 answers

Flutter TextTheme assign Device Pixel Ratio (Clean Architecture)

I'm trying to add clean architecture to my Flutter windows application and added some ThemeData to my project. I created a TextTheme and implemented all default sizes to it. Now I want to know if there is a clean way to always assign the default…
Thoxh
  • 149
  • 9
0
votes
1 answer

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( useMaterial3: true, colorScheme:…
user892028
  • 175
  • 1
  • 10
0
votes
0 answers

inputDecorationTheme comming error with me

The function 'InputDecorationTheme' isn't defined. Try importing the library that defines 'InputDecorationTheme', correcting the name to the name of an existing function, or defining a function named 'InputDecorationTheme' inputDecorationTheme:…
0
votes
1 answer

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 can the styling (in particular, text color) of the…
Frank H
  • 13
  • 4
0
votes
2 answers

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)) .copyWith(bodyText1: TextStyle(color:…
0
votes
1 answer

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 the highlighted text? ThemeData so far. get…
Ariel
  • 2,471
  • 1
  • 26
  • 43
1
2