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

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,
);
}
}