Questions tagged [flutter-theme]

The flutter theme widget can be used to define application wide colors, fonts and text styles in a flutter app.

https://flutter.dev/docs/cookbook/design/themes

118 questions
0
votes
1 answer

How to set onChanged value of Switch

I have a switch which toggle the app theme but there is some errors on the code Switch(value: AppStyleMode.isSwitched, onChanged: (value)=> AppStyleMode.switchMode()) My Theme file import 'package:flutter/material.dart'; class AppStyleMode…
Priscilla
  • 53
  • 9
0
votes
1 answer

Why changing Theme isn't applied in full screen in a Chewie Video in Flutter?

I have applied Custom theme data to a Chewie video it works fine but it doesn't work when playing the video in full screen it just returns to the default theme @override Widget build(BuildContext context) { return Column( children:…
0
votes
1 answer

Resizing Text by Theme in Flutter

I'm trying to use a GestureDetector to allow the user to change the font size by pinching: class _PinchToScaleFontState extends State { double _baseFontScale = 1; double _fontScale = 1; ThemeData _themeData; @override …
Nicholas Albion
  • 3,096
  • 7
  • 33
  • 56
0
votes
1 answer

Flutter theme version solving failed

I am trying to run a flutter theme code in visual studio code and facing this issue after running command (flutter run) Because every version of flutter_test from sdk depends on vector_math 2.1.0-nullsafety.5 and fstore depends on vector_math 2.0.8,…
0
votes
2 answers

How to change font family of app bar universally in flutter?

I want to change app bar font in my application universally but I did not find any appropriate answer I was looking for. Is there any way to apply theme globally using ThemeData and theme in MaterialApp? I don't want to apply TextStyle property like…
0
votes
1 answer

MaterialApp ThemeData iconTheme

I have some ListTile widgets around my app, and all of them have an icon. From here I see that I need to override my ListTile with ListTileTheme( iconColor: Colors.blue, child: .. ) since the ListTile.iconColor is gray by default and doesn't…
Fernando Santos
  • 392
  • 4
  • 19
0
votes
1 answer

google_fonts in a ThemeData - fonts not being applied

I'm trying to add a couple of google_fonts to a ThemeData. All of my theme is being applied, except that the google fonts are not. Why is this? Here is my project setup: The theme: import 'package:flutter/material.dart'; import…
BeniaminoBaggins
  • 11,202
  • 41
  • 152
  • 287
0
votes
1 answer

Setting TextStyle in flutter

How do I set the text style to headline1 or body1 like it is described in the "Material Text Scale: Modernizing Flutter Text Theming" section of the Flutter 1.17 Announcement article final TextStyle TEXT_STYLE = GoogleFonts.lato(textStyle:…
DrkStr
  • 1,752
  • 5
  • 38
  • 90
0
votes
1 answer

Create a dark theme without using ThemeData

I've created a dart file called theme.dart wherein I put there all my colors and also my font sizes and text styles. my theme.dart looks like this : import 'package:flutter/material.dart'; import…
0
votes
3 answers

Status bar and navigation bar color is not switching when using Sliver App Bar in Flutter App

This is the code I used to switch between dark mode and light mode. Everything works fine but the color of navigation bar and status bar doesn't change automatically when my widget subtree contains "Sliver App Bar." Here's the preview PS: As soon as…
0
votes
1 answer

Change color of Theme

I wanted to change the color of the counter in my app. I want to do that: change the color of the counter to blue when counter bigger than 0. if counter smaller than 0 change the color of the counter to red.if counter equal to 0 change the color of…
Cihat Şaman
  • 3,674
  • 4
  • 14
  • 24
0
votes
3 answers

How to set TextFormField to use primary color(on focus) in Flutter

I need to change label and border's default color to use the primary color on focus, and i've already tried InputDecorationTheme, but it doesn't work well with the label. I realize that the TextField uses accent color. The screen; and theme: final…
-2
votes
1 answer

My theme is not working properly can anyone find me a solution?

import 'package:flutter/material.dart'; import 'first_page.dart'; import 'second_page.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget…
1 2 3 4 5 6 7
8