font fix and box padding

This commit is contained in:
ryleedavis 2022-10-10 10:35:20 -06:00
parent 4339c19631
commit 1ce5740c24

View file

@ -1,16 +1,15 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_svg/svg.dart'; import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/hive/db.dart';
import 'package:stackwallet/pages/pinpad_views/create_pin_view.dart'; import 'package:stackwallet/pages/pinpad_views/create_pin_view.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/rounded_white_container.dart'; import 'package:stackwallet/widgets/rounded_white_container.dart';
import 'package:stackwallet/hive/db.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/util.dart';
class StackPrivacyCalls extends ConsumerStatefulWidget { class StackPrivacyCalls extends ConsumerStatefulWidget {
const StackPrivacyCalls({ const StackPrivacyCalls({
Key? key, Key? key,
@ -56,95 +55,111 @@ class _StackPrivacyCalls extends ConsumerState<StackPrivacyCalls> {
controller: _pageController, controller: _pageController,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
children: [ children: [
Column( Padding(
mainAxisAlignment: MainAxisAlignment.center, padding: const EdgeInsets.fromLTRB(0, 40, 0, 0),
children: [ child: Column(
Text( mainAxisAlignment: MainAxisAlignment.center,
"Choose your Stack experience", children: [
style: STextStyles.pageTitleH1(context), Text(
), "Choose your Stack experience",
const SizedBox( style: STextStyles.pageTitleH1(context),
height: 8, ),
), const SizedBox(
Text( height: 8,
"You can change it later in Settings", ),
style: STextStyles.subtitle(context), Text(
), "You can change it later in Settings",
const SizedBox( style: STextStyles.subtitle(context),
height: 36, ),
), const SizedBox(
Center( height: 36,
child: CustomRadio((bool isEasy) { ),
setState(() { Center(
this.isEasy = isEasy; child: CustomRadio((bool isEasy) {
setState(() {
this.isEasy = isEasy;
DB.instance.put<dynamic>( DB.instance.put<dynamic>(
boxName: DB.boxNamePrefs, boxName: DB.boxNamePrefs,
key: "externalCalls", key: "externalCalls",
value: isEasy); value: isEasy);
}); });
}), }),
), ),
const SizedBox( const SizedBox(
height: 36, height: 36,
), ),
RoundedWhiteContainer( Padding(
child: Center( padding: const EdgeInsets.all(16.0),
child: RichText( child: RoundedWhiteContainer(
textAlign: TextAlign.left, child: Center(
text: TextSpan( child: RichText(
style: textAlign: TextAlign.left,
STextStyles.label(context).copyWith(fontSize: 12.0), text: TextSpan(
children: isEasy style: STextStyles.label(context)
? const [ .copyWith(fontSize: 12.0),
TextSpan( children: isEasy
text: ? [
"Exchange data preloaded for a seamless experience."), const TextSpan(
TextSpan( text:
text: "Exchange data preloaded for a seamless experience."),
"\n\nCoinGecko enabled: (24 hour price change shown in-app, total wallet value shown in USD or other currency)."), const TextSpan(
TextSpan( text:
text: "\n\nCoinGecko enabled: (24 hour price change shown in-app, total wallet value shown in USD or other currency)."),
"\n\nRecommended for most crypto users.", TextSpan(
style: text:
TextStyle(fontWeight: FontWeight.bold)), "\n\nRecommended for most crypto users.",
] style: TextStyle(
: const [ color: Theme.of(context)
TextSpan( .extension<StackColors>()!
text: .textDark,
"Exchange data not preloaded (slower experience)."), fontWeight: FontWeight.w600,
TextSpan( ),
text: ),
"\n\nCoinGecko disabled (price changes not shown, no wallet value shown in other currencies)."), ]
TextSpan( : [
text: const TextSpan(
"\n\nRecommended for the privacy conscious.", text:
style: "Exchange data not preloaded (slower experience)."),
TextStyle(fontWeight: FontWeight.bold)), const TextSpan(
], text:
"\n\nCoinGecko disabled (price changes not shown, no wallet value shown in other currencies)."),
TextSpan(
text:
"\n\nRecommended for the privacy conscious.",
style: TextStyle(
color: Theme.of(context)
.extension<StackColors>()!
.textDark,
fontWeight: FontWeight.w600,
),
),
],
),
),
), ),
), ),
), ),
), const Spacer(
const Spacer( flex: 4,
flex: 4,
),
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 16,
), ),
child: Row( Padding(
children: [ padding: const EdgeInsets.symmetric(
Expanded( horizontal: 16,
child: ContinueButton( vertical: 16,
isDesktop: isDesktop, ),
child: Row(
children: [
Expanded(
child: ContinueButton(
isDesktop: isDesktop,
),
), ),
), ],
], ),
), ),
), ],
], ),
), ),
], ],
), ),
@ -268,8 +283,8 @@ class RadioItem extends StatelessWidget {
SvgPicture.asset( SvgPicture.asset(
_item.svg, _item.svg,
// color: Theme.of(context).extension<StackColors>()!.textWhite, // color: Theme.of(context).extension<StackColors>()!.textWhite,
width: 96, width: 140,
height: 96, height: 140,
), ),
RichText( RichText(
textAlign: TextAlign.center, textAlign: TextAlign.center,
@ -278,7 +293,11 @@ class RadioItem extends StatelessWidget {
children: [ children: [
TextSpan( TextSpan(
text: _item.topText, text: _item.topText,
style: const TextStyle(fontWeight: FontWeight.bold)), style: TextStyle(
color: Theme.of(context)
.extension<StackColors>()!
.textDark,
fontWeight: FontWeight.bold)),
TextSpan(text: "\n${_item.bottomText}"), TextSpan(text: "\n${_item.bottomText}"),
], ],
), ),