mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-22 19:39:22 +00:00
use container with boxdecoration instead of stroked textstyle
This commit is contained in:
parent
c0836f9c67
commit
8552fbac68
2 changed files with 20 additions and 32 deletions
|
@ -202,27 +202,29 @@ 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(
|
||||
fontSizeFactor: (1 /
|
||||
format
|
||||
.simpleCurrencySymbol(
|
||||
_fiats[index]
|
||||
.ticker
|
||||
.toUpperCase())
|
||||
.length * // Couldn't get pow() working here
|
||||
format
|
||||
.simpleCurrencySymbol(
|
||||
_fiats[index]
|
||||
.ticker
|
||||
.toUpperCase())
|
||||
.length)),
|
||||
style: STextStyles.subtitle(context).apply(
|
||||
fontSizeFactor: (1 /
|
||||
format
|
||||
.simpleCurrencySymbol(_fiats[index]
|
||||
.ticker
|
||||
.toUpperCase())
|
||||
.length * // Couldn't get pow() working here
|
||||
format
|
||||
.simpleCurrencySymbol(_fiats[index]
|
||||
.ticker
|
||||
.toUpperCase())
|
||||
.length)),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue