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: 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( .simpleCurrencySymbol(_fiats[index]
_fiats[index]
.ticker .ticker
.toUpperCase()) .toUpperCase())
.length * // Couldn't get pow() working here .length * // Couldn't get pow() working here
format format
.simpleCurrencySymbol( .simpleCurrencySymbol(_fiats[index]
_fiats[index]
.ticker .ticker
.toUpperCase()) .toUpperCase())
.length)), .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,
);
}
} }