use container with boxdecoration instead of stroked textstyle

This commit is contained in:
sneurlax 2023-01-24 13:48:57 -06:00
parent c0836f9c67
commit 8552fbac68
2 changed files with 20 additions and 32 deletions

View file

@ -202,27 +202,29 @@ class _FiatSelectionViewState extends State<FiatSelectionView> {
child: RoundedWhiteContainer( child: RoundedWhiteContainer(
child: Row( child: Row(
children: [ children: [
SizedBox( Container(
width: 48, padding: const EdgeInsets.all(7.5),
height: 24, decoration: BoxDecoration(
color: Theme.of(context)
.extension<StackColors>()!
.highlight,
borderRadius: BorderRadius.circular(4),
),
child: Text( child: Text(
format.simpleCurrencySymbol( format.simpleCurrencySymbol(
_fiats[index].ticker.toUpperCase()), _fiats[index].ticker.toUpperCase()),
style: STextStyles.currencyTicker(context) style: STextStyles.subtitle(context).apply(
.apply( fontSizeFactor: (1 /
fontSizeFactor: (1 / format
format .simpleCurrencySymbol(_fiats[index]
.simpleCurrencySymbol( .ticker
_fiats[index] .toUpperCase())
.ticker .length * // Couldn't get pow() working here
.toUpperCase()) format
.length * // Couldn't get pow() working here .simpleCurrencySymbol(_fiats[index]
format .ticker
.simpleCurrencySymbol( .toUpperCase())
_fiats[index] .length)),
.ticker
.toUpperCase())
.length)),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),

View file

@ -2178,18 +2178,4 @@ class STextStyles {
); );
} }
} }
static TextStyle currencyTicker(BuildContext context) {
return GoogleFonts.inter(
color: _theme(context).textDark,
fontWeight: FontWeight.w500,
fontSize: 16,
background: Paint()
..color = Theme.of(context).extension<StackColors>()!.highlight
..strokeWidth = 8
..strokeJoin = StrokeJoin.round
..strokeCap = StrokeCap.round
..style = PaintingStyle.stroke,
);
}
} }