Flutter dragging out text
Since you are using a fitted box and not setting an height but only the width, I'm quite sure that your text is able to expand vertical as much as he wants.
Soo I think that the problem is the font itself. The font you are using is not the original "Futura Bold".
You can see it from the letter capital 'J' and from the letter 't'.
Here's how the original "Futura Bold" shoul be:
I took that screenshot from:
https://www.fonts.com/font/urw/futura?QueryFontType=Web&src=GoogleWebFonts
Comments
-
Bennett567 over 1 year
I am building a flutter web app, where I want to have some text in the Futura Bold Font. The Text is in a Column, In a Container and in a Fittedbox, like so:
Container( width: MediaQuery.of(context).size.width * 0.9, child: FittedBox( fit: BoxFit.fitWidth, child: Text( 'Join to closed beta', textAlign: TextAlign.center, style: TextStyle( fontFamily: 'FuturaBold', color: Colors.white, // fontSize: 50 ), ), ), ),
The pubspec.yaml for the font is this:
fonts: - family: FuturaBold fonts: - asset: lib/assets/fonts/Futura Bold font.ttf
However, the text is drawn out vertically, so instead of looking like this: it looks like this: . How could I fix this? Thanks.
-
Kushal Goel about 3 yearsWhy are you using FittedBox ?
-