Custom fontweigh otherthan given 9 constants by dart like (550) - Flutter

203 views Asked by At

I want to use custom fontweight in my text style otherthan flutter given 100, 200 ----- 900 font weights, like Fontweight.w550 or (550 as int).

tried to achieve with this but it doesn't worked out

  fontWeight: FontWeight.lerp(FontWeight.w500, FontWeight.w600, 0.5)

Your help is appreciated...

1

There are 1 answers

1
Mohit Ratanpara On

FontWeight is a const parameter which is : [w100, w200, w300, w400, w500, w600, w700, w800, w900]

FontWeight.w500 along with fontStyle:FontStyle.bold work in older version, in new version there is nothing which gives FontWeight 550.