Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] android – How to implement a text widget with my own flutter scaling factor

Posted on November 11, 2022 By

Solution 1 :

You can change the text scale factor by changing the textScaleFactor argument.

Text(
  "your text here",
  textScaleFactor: 1.0,
);

Change 1.0 to whatever you want the scale factor to be.

Solution 2 :

Thanking Levi Stepanek for the answer, I found the way to apply the text scale factor in all parts of the app with the following code:

    MaterialApp(
          builder: (BuildContext context, Widget child) {
             return MediaQuery(
             data: MediaQuery.of(context).copyWith(textScaleFactor: 1.2),
             child: child,);},
          ..
        ),

Problem :

I am implementing an application in flutter. And as the title says, I want to set my own textScaleFactor on all widgets of this type. Is there any way to overwrite this value in the main.dart? Or how could I set it in a custom class that inherits the type text?

Comments

Comment posted by Saul Rmz

Thank you. Is there any way to put this value in main.dart so that all text widgets have this value?

READ  [FIXED] flutter - Login Screen won't connect to Firebase Authentication
Powered by Inline Related Posts
Android Tags:android, dart, flutter, ios

Post navigation

Previous Post: [FIXED] java – MVVM with Room and LiveData – How to get List from LiveData
Next Post: [FIXED] android – Xamarin.Forms.Droid Resource, Ambiguous Terms/ Build Action’s Randomly Changing Missing Resources

Related Posts

[FIXED] android – I am getting Git error while pushing the code Android
[FIXED] java – error: package com.google.android.gms.drive does not exist Android
[FIXED] android – problem of Error inflating class EditText Android
[FIXED] java – I dont know how to fix these Warnings Android
[FIXED] c# – Xamarin Forms Bind Image from Resources/Drawable folder Android
[FIXED] android – Filter in listview did not filter from the full list, but from already filtered list Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • Can VPN be traced by police?
  • Where were Kaiser-Frazer cars built?
  • How do you make gold rose gold paint?
  • What are the newest type of dentures?
  • Can you wear joggers as dress pants?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme