mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
Reformat the whole codebase with 100 line width (#3403)
This commit is contained in:
@@ -156,7 +156,6 @@ class _RenderSizingContainer extends RenderProxyBox {
|
||||
final double t = (page - floorPage).clamp(0.0, 1.0);
|
||||
final double height = lerpDouble(a.height, b.height, t) ?? a.height;
|
||||
|
||||
|
||||
child.layout(
|
||||
constraints.copyWith(minHeight: height, maxHeight: height),
|
||||
parentUsesSize: true,
|
||||
@@ -214,4 +213,4 @@ class _RenderSizeAware extends RenderProxyBox {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ class AlertWithPickerOption extends BaseAlertDialog {
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w500,
|
||||
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
decoration: TextDecoration.none,
|
||||
),
|
||||
|
||||
@@ -5,36 +5,30 @@ import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
|
||||
import 'package:cake_wallet/src/widgets/section_divider.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
class AlertButtonStyle {
|
||||
final Color backgroundColor;
|
||||
final Color textColor;
|
||||
final FontWeight fontWeight;
|
||||
|
||||
const AlertButtonStyle({
|
||||
required this.backgroundColor,
|
||||
required this.textColor,
|
||||
this.fontWeight = FontWeight.w400
|
||||
});
|
||||
const AlertButtonStyle(
|
||||
{required this.backgroundColor, required this.textColor, this.fontWeight = FontWeight.w400});
|
||||
|
||||
factory AlertButtonStyle.primary(BuildContext context) => AlertButtonStyle(
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
textColor: Theme.of(context).colorScheme.onPrimary,
|
||||
);
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
textColor: Theme.of(context).colorScheme.onPrimary,
|
||||
);
|
||||
|
||||
factory AlertButtonStyle.secondary(BuildContext context) => AlertButtonStyle(
|
||||
backgroundColor: Theme.of(context).colorScheme.surfaceContainer,
|
||||
textColor: Theme.of(context).colorScheme.primary,
|
||||
);
|
||||
backgroundColor: Theme.of(context).colorScheme.surfaceContainer,
|
||||
textColor: Theme.of(context).colorScheme.primary,
|
||||
);
|
||||
|
||||
factory AlertButtonStyle.error(BuildContext context) => AlertButtonStyle(
|
||||
backgroundColor: Theme.of(context).colorScheme.errorContainer,
|
||||
textColor: Theme.of(context).colorScheme.error,
|
||||
fontWeight: FontWeight.w500
|
||||
);
|
||||
backgroundColor: Theme.of(context).colorScheme.errorContainer,
|
||||
textColor: Theme.of(context).colorScheme.error,
|
||||
fontWeight: FontWeight.w500);
|
||||
}
|
||||
|
||||
|
||||
class BaseAlertDialog extends StatelessWidget {
|
||||
String? get headerText => '';
|
||||
|
||||
@@ -67,7 +61,7 @@ class BaseAlertDialog extends StatelessWidget {
|
||||
Key? rightActionButtonKey;
|
||||
|
||||
Key? dialogKey;
|
||||
|
||||
|
||||
AlertButtonStyle? get leftAlertButtonStyle => null;
|
||||
|
||||
AlertButtonStyle? get rightAlertButtonStyle => null;
|
||||
@@ -129,29 +123,30 @@ class BaseAlertDialog extends StatelessWidget {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
spacing:8,
|
||||
spacing: 8,
|
||||
children: <Widget>[
|
||||
if(showLeftButton)
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
key: leftActionButtonKey,
|
||||
onTap: actionLeft,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(999999),
|
||||
color: leftButtonStyle.backgroundColor
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
|
||||
child: AutoSizeText(
|
||||
maxLines:1,
|
||||
leftActionButtonText,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 16, color: leftButtonStyle.textColor, fontWeight: leftButtonStyle.fontWeight)
|
||||
if (showLeftButton)
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
key: leftActionButtonKey,
|
||||
onTap: actionLeft,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(999999),
|
||||
color: leftButtonStyle.backgroundColor),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
|
||||
child: AutoSizeText(
|
||||
maxLines: 1,
|
||||
leftActionButtonText,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: leftButtonStyle.textColor,
|
||||
fontWeight: leftButtonStyle.fontWeight)),
|
||||
),
|
||||
),
|
||||
)),
|
||||
),
|
||||
)),
|
||||
),
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
key: rightActionButtonKey,
|
||||
@@ -159,16 +154,17 @@ class BaseAlertDialog extends StatelessWidget {
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(999999),
|
||||
color: rightButtonStyle.backgroundColor
|
||||
),
|
||||
color: rightButtonStyle.backgroundColor),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
|
||||
child: AutoSizeText(
|
||||
maxLines: 1,
|
||||
rightActionButtonText,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 16, color: rightButtonStyle.textColor, fontWeight: rightButtonStyle.fontWeight)
|
||||
),
|
||||
maxLines: 1,
|
||||
rightActionButtonText,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: rightButtonStyle.textColor,
|
||||
fontWeight: rightButtonStyle.fontWeight)),
|
||||
),
|
||||
)),
|
||||
),
|
||||
@@ -185,7 +181,7 @@ class BaseAlertDialog extends StatelessWidget {
|
||||
radius: 50,
|
||||
backgroundColor: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
child: ClipOval(
|
||||
child: CakeImageWidget (imageUrl: imageUrl, width: 100, height: 100, fit: BoxFit.cover),
|
||||
child: CakeImageWidget(imageUrl: imageUrl, width: 100, height: 100, fit: BoxFit.cover),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -201,8 +197,7 @@ class BaseAlertDialog extends StatelessWidget {
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 3.0, sigmaY: 3.0),
|
||||
child: Container(
|
||||
decoration:
|
||||
BoxDecoration(color: Theme.of(context).colorScheme.onSurface.withAlpha(25)),
|
||||
decoration: BoxDecoration(color: Theme.of(context).colorScheme.onSurface.withAlpha(25)),
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
@@ -229,9 +224,7 @@ class BaseAlertDialog extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
if (headerText?.isNotEmpty ?? false) headerTitle(context),
|
||||
titleText != null
|
||||
? title(context)
|
||||
: SizedBox(height: 16),
|
||||
titleText != null ? title(context) : SizedBox(height: 16),
|
||||
isDividerExists
|
||||
? Padding(
|
||||
padding: EdgeInsets.only(top: 16, bottom: 8),
|
||||
|
||||
@@ -47,7 +47,8 @@ class BaseTextFormField extends StatelessWidget {
|
||||
this.suffixIconConstraints,
|
||||
super.key,
|
||||
this.suffixText,
|
||||
this.borderRadius = const BorderRadius.all(Radius.circular(18)), this.onEditingComplete,
|
||||
this.borderRadius = const BorderRadius.all(Radius.circular(18)),
|
||||
this.onEditingComplete,
|
||||
});
|
||||
|
||||
final TextEditingController? controller;
|
||||
|
||||
@@ -195,7 +195,7 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
|
||||
height = decred!.heightByDate(date);
|
||||
} else if (widget.walletType == WalletType.monero) {
|
||||
height = monero!.getHeightByDate(date: date);
|
||||
} else if (widget.walletType == WalletType.wownero){
|
||||
} else if (widget.walletType == WalletType.wownero) {
|
||||
height = wownero!.getHeightByDate(date: date);
|
||||
} else if (widget.walletType == WalletType.zcash) {
|
||||
height = await zcash!.getHeightByDate(date);
|
||||
|
||||
@@ -49,8 +49,7 @@ class CakePayTransactionSentBottomSheet extends StatelessWidget {
|
||||
color: Theme.of(ctx).colorScheme.onSurfaceVariant,
|
||||
);
|
||||
|
||||
Widget _buildHeader(BuildContext ctx) =>
|
||||
Column(
|
||||
Widget _buildHeader(BuildContext ctx) => Column(
|
||||
children: [
|
||||
const SizedBox(height: 12),
|
||||
Container(
|
||||
@@ -81,8 +80,7 @@ class CakePayTransactionSentBottomSheet extends StatelessWidget {
|
||||
],
|
||||
);
|
||||
|
||||
Widget _buildBody(BuildContext context) =>
|
||||
Padding(
|
||||
Widget _buildBody(BuildContext context) => Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Column(
|
||||
children: [
|
||||
@@ -123,7 +121,6 @@ class CakePayTransactionSentBottomSheet extends StatelessWidget {
|
||||
copyButtonOnPressed: () async =>
|
||||
await Clipboard.setData(ClipboardData(text: paymentIdValue)),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||
child: Column(
|
||||
@@ -157,10 +154,7 @@ class CakePayTransactionSentBottomSheet extends StatelessWidget {
|
||||
return ClipRRect(
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(30)),
|
||||
child: Material(
|
||||
color: Theme
|
||||
.of(context)
|
||||
.colorScheme
|
||||
.surface,
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(maxHeight: maxHeight),
|
||||
child: SingleChildScrollView(
|
||||
@@ -210,17 +204,14 @@ class _StandardTile extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
color: Theme
|
||||
.of(context)
|
||||
.colorScheme
|
||||
.surfaceContainerLowest
|
||||
.withAlpha(80)),
|
||||
color: Theme.of(context).colorScheme.surfaceContainerLowest.withAlpha(80)),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment: copyButton ? MainAxisAlignment.spaceBetween : MainAxisAlignment.start,
|
||||
mainAxisAlignment:
|
||||
copyButton ? MainAxisAlignment.spaceBetween : MainAxisAlignment.start,
|
||||
children: [
|
||||
if (imagePath != null)
|
||||
Padding(
|
||||
|
||||
@@ -168,7 +168,8 @@ class ConfirmSendingBottomSheet extends BaseBottomSheet {
|
||||
final batchContactTitle =
|
||||
'${index + 1}/${outputs.length} - ${contactName.isEmpty ? 'Address' : contactName}';
|
||||
final _address = item.isParsedAddress ? item.extractedAddress : item.address;
|
||||
final _amount = '${item.cryptoAmount.sanitized()} ${amountParsingProxy?.getCryptoSymbol(currency) ?? currency.title}';
|
||||
final _amount =
|
||||
'${item.cryptoAmount.sanitized()} ${amountParsingProxy?.getCryptoSymbol(currency) ?? currency.title}';
|
||||
return isBatchSending || (contactName.isNotEmpty && !isCakePayName)
|
||||
? ExpansionAddressTile(
|
||||
contactType: isOpenCryptoPay ? 'Open CryptoPay' : S.of(context).contact,
|
||||
|
||||
@@ -100,7 +100,9 @@ class InfoBottomSheet extends BaseBottomSheet {
|
||||
)
|
||||
else
|
||||
Container(),
|
||||
SizedBox(height: 24,),
|
||||
SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
if (content != null)
|
||||
Expanded(
|
||||
flex: 2,
|
||||
|
||||
@@ -34,7 +34,7 @@ class InfoStepsBottomSheet extends BaseBottomSheet {
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 28.0),
|
||||
child: Column(
|
||||
@@ -96,18 +96,18 @@ class InfoStepsBottomSheet extends BaseBottomSheet {
|
||||
))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: PrimaryButton(
|
||||
text: S.of(context).close,
|
||||
color: context.currentTheme.colorScheme.primary,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: PrimaryButton(
|
||||
text: S.of(context).close,
|
||||
color: context.currentTheme.colorScheme.primary,
|
||||
textColor: context.currentTheme.colorScheme.onPrimary,
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -139,8 +139,7 @@ class _PaymentConfirmationContent extends StatelessWidget {
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Image.asset(
|
||||
paymentFlowResult.addressDetectionResult?.detectedCurrency?.iconPath ??
|
||||
'',
|
||||
paymentFlowResult.addressDetectionResult?.detectedCurrency?.iconPath ?? '',
|
||||
width: 70,
|
||||
height: 70,
|
||||
errorBuilder: (context, error, stackTrace) => Icon(
|
||||
|
||||
@@ -288,7 +288,8 @@ class SwapConfirmationContentState extends State<SwapConfirmationContent> {
|
||||
SwapConfirmationTextfield(
|
||||
key: ValueKey('swap_confirmation_bottomsheet_address_textfield_key'),
|
||||
isAddress: true,
|
||||
walletType: cryptoCurrencyOrTokenToWalletType(widget.exchangeViewModel.receiveCurrency),
|
||||
walletType:
|
||||
cryptoCurrencyOrTokenToWalletType(widget.exchangeViewModel.receiveCurrency),
|
||||
hintText: 'Destination Address',
|
||||
focusNode: _addressFocus,
|
||||
controller: _addressController,
|
||||
|
||||
@@ -112,7 +112,7 @@ class _SwapDetailsBottomSheetState extends State<SwapDetailsBottomSheet> {
|
||||
buttonAction: () {
|
||||
_showingFailureDialog = false;
|
||||
Navigator.of(popupContext).pop();
|
||||
if(mounted) {
|
||||
if (mounted) {
|
||||
Navigator.of(context, rootNavigator: true).pop();
|
||||
}
|
||||
},
|
||||
@@ -318,15 +318,13 @@ class _SwapDetailsContent extends StatelessWidget {
|
||||
children: [
|
||||
_SwapDetailsTile(
|
||||
label: 'You Send',
|
||||
value:
|
||||
'${trade.amount} ${trade.from?.title ?? ''}',
|
||||
value: '${trade.amount} ${trade.from?.title ?? ''}',
|
||||
valueFiatFormatted: exchangeTradeViewModel.sendAmountFiatFormatted,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
_SwapDetailsTile(
|
||||
label: 'You Get',
|
||||
value:
|
||||
'${trade.receiveAmount ?? '0'} ${trade.to?.title ?? ''}',
|
||||
value: '${trade.receiveAmount ?? '0'} ${trade.to?.title ?? ''}',
|
||||
valueFiatFormatted: exchangeTradeViewModel
|
||||
.getReceiveAmountFiatFormatted(trade.receiveAmount ?? '0.0'),
|
||||
),
|
||||
@@ -351,7 +349,8 @@ class _SwapDetailsContent extends StatelessWidget {
|
||||
const SizedBox(height: 4),
|
||||
AddressFormatter.buildSegmentedAddress(
|
||||
address: trade.payoutAddress ?? '',
|
||||
walletType: trade.to != null ? cryptoCurrencyOrTokenToWalletType(trade.to!) : null,
|
||||
walletType:
|
||||
trade.to != null ? cryptoCurrencyOrTokenToWalletType(trade.to!) : null,
|
||||
evenTextStyle: Theme.of(context)
|
||||
.textTheme
|
||||
.bodyMedium!
|
||||
|
||||
@@ -78,7 +78,8 @@ class _TokenSelectionContentState extends State<_TokenSelectionContent> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
final baseNetwork = widget.fixedNetwork ?? WalletType.ethereum;
|
||||
selectedNetwork = _resolveGenericETHDetectionResultToSpecificChain(baseNetwork, widget.paymentRequest.scheme.isNotEmpty);
|
||||
selectedNetwork = _resolveGenericETHDetectionResultToSpecificChain(
|
||||
baseNetwork, widget.paymentRequest.scheme.isNotEmpty);
|
||||
_autoSelectToken();
|
||||
}
|
||||
|
||||
@@ -101,9 +102,10 @@ class _TokenSelectionContentState extends State<_TokenSelectionContent> {
|
||||
return null;
|
||||
}
|
||||
|
||||
WalletType _resolveGenericETHDetectionResultToSpecificChain(WalletType network, bool hasURIScheme) {
|
||||
if(hasURIScheme || network != WalletType.ethereum) return network;
|
||||
|
||||
WalletType _resolveGenericETHDetectionResultToSpecificChain(
|
||||
WalletType network, bool hasURIScheme) {
|
||||
if (hasURIScheme || network != WalletType.ethereum) return network;
|
||||
|
||||
final current = widget.paymentViewModel.currentWalletType;
|
||||
if (isEVMCompatibleChain(current)) return current;
|
||||
return network;
|
||||
@@ -113,7 +115,8 @@ class _TokenSelectionContentState extends State<_TokenSelectionContent> {
|
||||
final initialNetwork = selectedNetwork;
|
||||
if (initialNetwork == null || !mounted) return;
|
||||
|
||||
final network = _resolveGenericETHDetectionResultToSpecificChain(initialNetwork, widget.paymentRequest.scheme.isNotEmpty);
|
||||
final network = _resolveGenericETHDetectionResultToSpecificChain(
|
||||
initialNetwork, widget.paymentRequest.scheme.isNotEmpty);
|
||||
|
||||
setState(() {
|
||||
selectedNetwork = network;
|
||||
|
||||
@@ -40,12 +40,11 @@ class CheckBoxPickerState extends State<CheckBoxPicker> {
|
||||
widget.title,
|
||||
textAlign: TextAlign.center,
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
fontSize: 18,
|
||||
|
||||
fontWeight: FontWeight.bold,
|
||||
decoration: TextDecoration.none,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
decoration: TextDecoration.none,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CheckboxWidget extends StatefulWidget {
|
||||
CheckboxWidget({required this.value, required this.caption, required this.onChanged});
|
||||
|
||||
|
||||
@@ -83,8 +83,7 @@ class _EvmSwitcherState extends State<EvmSwitcher> {
|
||||
.toList(growable: false);
|
||||
}
|
||||
|
||||
bool _hiddenSetsEqual(Set<int> a, Set<int> b) =>
|
||||
a.length == b.length && a.containsAll(b);
|
||||
bool _hiddenSetsEqual(Set<int> a, Set<int> b) => a.length == b.length && a.containsAll(b);
|
||||
|
||||
int get _selectedIndex {
|
||||
if (widget.currentChain == null) return -1;
|
||||
|
||||
@@ -36,12 +36,11 @@ class HavenWalletRemovalPopup extends StatelessWidget {
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
decoration: TextDecoration.none,
|
||||
fontSize: 24.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
decoration: TextDecoration.none,
|
||||
fontSize: 24.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
child: Text("Emergency Notice"),
|
||||
),
|
||||
),
|
||||
@@ -61,11 +60,10 @@ class HavenWalletRemovalPopup extends StatelessWidget {
|
||||
child: Text(
|
||||
"It looks like you have Haven wallets in your list. Haven is getting removed in next release of Cake Wallet, and you currently have Haven in the following wallets:\n\n[${affectedWalletNames.join(", ")}]\n\nPlease move your funds to other wallet, as you will lose access to your Haven funds in next update.\n\nFor assistance, please use the in-app support or email support@cakewallet.com",
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
decoration: TextDecoration.none,
|
||||
fontSize: 16.0,
|
||||
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
decoration: TextDecoration.none,
|
||||
fontSize: 16.0,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
|
||||
@@ -45,26 +45,28 @@ class ListItemStyleWrapper extends StatelessWidget {
|
||||
bottom: Radius.circular(isLastInSection ? 18 : 0),
|
||||
);
|
||||
|
||||
return ClipRSuperellipse(
|
||||
borderRadius: radius,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
height: height,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedSuperellipseBorder(
|
||||
borderRadius: radius,
|
||||
),
|
||||
color: backgroundColor ?? theme.colorScheme.surfaceContainer,
|
||||
return ClipRSuperellipse(
|
||||
borderRadius: radius,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
height: height,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedSuperellipseBorder(
|
||||
borderRadius: radius,
|
||||
),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12, vertical: height == null ? 11 : 0),
|
||||
child: builder(context, textStyle, labelStyle))))),
|
||||
if(iconPath != null && isLastInSection == false) Container(
|
||||
color: backgroundColor ?? theme.colorScheme.surfaceContainer,
|
||||
),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 12, vertical: height == null ? 11 : 0),
|
||||
child: builder(context, textStyle, labelStyle))))),
|
||||
if (iconPath != null && isLastInSection == false)
|
||||
Container(
|
||||
color: theme.colorScheme.surfaceContainer,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 50, right: 13),
|
||||
|
||||
@@ -14,7 +14,10 @@ class ListItemCheckboxWidget extends StatefulWidget {
|
||||
this.subtitleColor,
|
||||
this.onTap,
|
||||
this.isFirstInSection = false,
|
||||
this.isLastInSection = false, this.subtitle, this.iconPath, this.showArrow = false,
|
||||
this.isLastInSection = false,
|
||||
this.subtitle,
|
||||
this.iconPath,
|
||||
this.showArrow = false,
|
||||
});
|
||||
|
||||
final String keyValue;
|
||||
@@ -34,15 +37,14 @@ class ListItemCheckboxWidget extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _ListItemCheckboxWidgetState extends State<ListItemCheckboxWidget> {
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListItemStyleWrapper(
|
||||
iconPath: widget.iconPath,
|
||||
onTap: widget.onTap ?? () {
|
||||
widget.onChanged(!widget.value);
|
||||
},
|
||||
onTap: widget.onTap ??
|
||||
() {
|
||||
widget.onChanged(!widget.value);
|
||||
},
|
||||
isFirstInSection: widget.isFirstInSection,
|
||||
height: widget.subtitle != null ? 64 : 50,
|
||||
isLastInSection: widget.isLastInSection,
|
||||
@@ -56,7 +58,7 @@ class _ListItemCheckboxWidgetState extends State<ListItemCheckboxWidget> {
|
||||
children: [
|
||||
if (widget.iconPath != null)
|
||||
widget.iconPath!.toLowerCase().endsWith("svg")
|
||||
? CakeImageWidget(imageUrl:widget.iconPath!, height: 26, width: 26)
|
||||
? CakeImageWidget(imageUrl: widget.iconPath!, height: 26, width: 26)
|
||||
: Image.asset(
|
||||
widget.iconPath!,
|
||||
width: 26,
|
||||
@@ -64,29 +66,31 @@ class _ListItemCheckboxWidgetState extends State<ListItemCheckboxWidget> {
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Flexible(child: Text(widget.label)),
|
||||
if (widget.showArrow)
|
||||
Icon(
|
||||
Icons.chevron_right,
|
||||
size: 18,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
)
|
||||
],
|
||||
),
|
||||
if (widget.subtitle != null)
|
||||
Text(
|
||||
widget.subtitle!,
|
||||
style: TextStyle(
|
||||
fontSize: 12, color: widget.subtitleColor ?? Theme.of(context).colorScheme.onSurfaceVariant),
|
||||
)
|
||||
],
|
||||
),
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Flexible(child: Text(widget.label)),
|
||||
if (widget.showArrow)
|
||||
Icon(
|
||||
Icons.chevron_right,
|
||||
size: 18,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
)
|
||||
],
|
||||
),
|
||||
if (widget.subtitle != null)
|
||||
Text(
|
||||
widget.subtitle!,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: widget.subtitleColor ??
|
||||
Theme.of(context).colorScheme.onSurfaceVariant),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -85,7 +85,7 @@ class ListItemRegularRowWidget extends StatelessWidget {
|
||||
|
||||
final imageWidget = badgeIconPath != null
|
||||
? Stack(
|
||||
clipBehavior: Clip.none,
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
leadingIcon!,
|
||||
Positioned(
|
||||
|
||||
@@ -12,7 +12,8 @@ class ListItemSelectorWidget extends StatelessWidget {
|
||||
required this.selectedIndex,
|
||||
required this.onChanged,
|
||||
this.isFirstInSection = false,
|
||||
this.isLastInSection = false, this.onTap,
|
||||
this.isLastInSection = false,
|
||||
this.onTap,
|
||||
});
|
||||
|
||||
final String keyValue;
|
||||
@@ -45,16 +46,16 @@ class ListItemSelectorWidget extends StatelessWidget {
|
||||
options[selectedIndex],
|
||||
style: labelStyle,
|
||||
),
|
||||
CakeImageWidget(imageUrl:
|
||||
"assets/new-ui/chooser.svg",
|
||||
CakeImageWidget(
|
||||
imageUrl: "assets/new-ui/chooser.svg",
|
||||
colorFilter:
|
||||
ColorFilter.mode(theme.colorScheme.onSurfaceVariant, BlendMode.srcIn),
|
||||
ColorFilter.mode(theme.colorScheme.onSurfaceVariant, BlendMode.srcIn),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,7 @@ class ListItemTextFieldWidget extends StatefulWidget {
|
||||
final bool isLastInSection;
|
||||
|
||||
@override
|
||||
State<ListItemTextFieldWidget> createState() =>
|
||||
_ListItemTextFieldWidgetState();
|
||||
State<ListItemTextFieldWidget> createState() => _ListItemTextFieldWidgetState();
|
||||
}
|
||||
|
||||
class _ListItemTextFieldWidgetState extends State<ListItemTextFieldWidget> {
|
||||
@@ -36,7 +35,7 @@ class _ListItemTextFieldWidgetState extends State<ListItemTextFieldWidget> {
|
||||
return ListItemStyleWrapper(
|
||||
isFirstInSection: widget.isFirstInSection,
|
||||
isLastInSection: widget.isLastInSection,
|
||||
height:50,
|
||||
height: 50,
|
||||
builder: (context, textStyle, labelStyle) {
|
||||
return Row(
|
||||
children: [
|
||||
|
||||
@@ -27,7 +27,6 @@ class ListItemToggleWidget extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _ListItemToggleWidgetState extends State<ListItemToggleWidget> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -52,7 +51,7 @@ class _ListItemToggleWidgetState extends State<ListItemToggleWidget> {
|
||||
Flexible(
|
||||
child: Text(widget.label, style: textStyle, softWrap: true),
|
||||
),
|
||||
if(widget.leadingEndWidget != null) widget.leadingEndWidget!
|
||||
if (widget.leadingEndWidget != null) widget.leadingEndWidget!
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -14,15 +14,14 @@ import 'package:cake_wallet/src/widgets/new_list_row/list_item_toggle_widget.dar
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class NewListSections extends StatelessWidget {
|
||||
const NewListSections({
|
||||
super.key,
|
||||
required this.sections,
|
||||
this.controllers = const {},
|
||||
this.tapHandlers = const {},
|
||||
this.getCheckboxValue,
|
||||
this.updateCheckboxValue,
|
||||
this.showHeader = false
|
||||
});
|
||||
const NewListSections(
|
||||
{super.key,
|
||||
required this.sections,
|
||||
this.controllers = const {},
|
||||
this.tapHandlers = const {},
|
||||
this.getCheckboxValue,
|
||||
this.updateCheckboxValue,
|
||||
this.showHeader = false});
|
||||
|
||||
final Map<String, List<ListItem>> sections;
|
||||
final Map<String, TextEditingController> controllers;
|
||||
|
||||
@@ -56,7 +56,7 @@ class _NumberTextFieldState extends State<NumberTextField> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => TextField(
|
||||
style: Theme.of(context).textTheme.titleMedium!,
|
||||
style: Theme.of(context).textTheme.titleMedium!,
|
||||
enableInteractiveSelection: false,
|
||||
textAlign: TextAlign.center,
|
||||
textAlignVertical: TextAlignVertical.bottom,
|
||||
@@ -78,16 +78,16 @@ class _NumberTextFieldState extends State<NumberTextField> {
|
||||
type: MaterialType.transparency,
|
||||
child: InkWell(
|
||||
child: Container(
|
||||
width: widget.arrowsWidth,
|
||||
width: widget.arrowsWidth,
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Icon(Icons.keyboard_arrow_left_outlined ,size: widget.arrowsWidth)),
|
||||
child: Icon(Icons.keyboard_arrow_left_outlined, size: widget.arrowsWidth)),
|
||||
onTap: _canGoDown ? () => _update(false) : null)),
|
||||
suffixIcon: Material(
|
||||
type: MaterialType.transparency,
|
||||
child: InkWell(
|
||||
child: Container(
|
||||
width: widget.arrowsWidth,
|
||||
alignment: Alignment.bottomCenter,
|
||||
width: widget.arrowsWidth,
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Icon(Icons.keyboard_arrow_right_outlined, size: widget.arrowsWidth)),
|
||||
onTap: _canGoUp ? () => _update(true) : null))),
|
||||
maxLines: 1,
|
||||
|
||||
@@ -345,7 +345,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
|
||||
Flexible(
|
||||
child: Text(
|
||||
key: ValueKey('picker_items_index_${itemName}_text_key'),
|
||||
widget.displayItem?.call(item) ?? (item == CryptoCurrency.btcln ? "BTC (LN)" : item.toString()),
|
||||
widget.displayItem?.call(item) ??
|
||||
(item == CryptoCurrency.btcln ? "BTC (LN)" : item.toString()),
|
||||
softWrap: true,
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
|
||||
@@ -3,8 +3,7 @@ import 'package:cake_wallet/src/widgets/picker_wrapper_widget.dart';
|
||||
import 'package:cake_wallet/utils/responsive_layout_util.dart';
|
||||
|
||||
class PickerInnerWrapperWidget extends StatelessWidget {
|
||||
PickerInnerWrapperWidget(
|
||||
{required this.children, this.title, this.itemsHeight});
|
||||
PickerInnerWrapperWidget({required this.children, this.title, this.itemsHeight});
|
||||
|
||||
final List<Widget> children;
|
||||
final String? title;
|
||||
@@ -48,10 +47,9 @@ class PickerInnerWrapperWidget extends StatelessWidget {
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHighest,
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
maxHeight:
|
||||
itemsHeight != null && itemsHeight! <= containerHeight
|
||||
? itemsHeight!
|
||||
: containerHeight,
|
||||
maxHeight: itemsHeight != null && itemsHeight! <= containerHeight
|
||||
? itemsHeight!
|
||||
: containerHeight,
|
||||
maxWidth: ResponsiveLayoutUtilBase.kPopupWidth,
|
||||
),
|
||||
child: Column(
|
||||
|
||||
@@ -105,8 +105,8 @@ class ProviderOptionTile extends StatelessWidget {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
ImageUtil.getImageFromPath(imagePath:imagePath,
|
||||
height: imageHeight, width: imageWidth),
|
||||
ImageUtil.getImageFromPath(
|
||||
imagePath: imagePath, height: imageHeight, width: imageWidth),
|
||||
SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Container(
|
||||
|
||||
@@ -9,19 +9,19 @@ class RoundedCheckbox extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return value
|
||||
? Container(
|
||||
height: 20.0,
|
||||
width: 20.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(50.0)),
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.check,
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
size: 14.0,
|
||||
))
|
||||
: Offstage();
|
||||
return value
|
||||
? Container(
|
||||
height: 20.0,
|
||||
width: 20.0,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(50.0)),
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
child: Icon(
|
||||
Icons.check,
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
size: 14.0,
|
||||
))
|
||||
: Offstage();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class RoundedIconButton extends StatelessWidget {
|
||||
onPressed: onPressed,
|
||||
fillColor: fillColor ?? colorScheme.surfaceContainerHighest,
|
||||
elevation: 0,
|
||||
constraints: BoxConstraints.tightFor(width: width ?? 30, height: height ?? 30),
|
||||
constraints: BoxConstraints.tightFor(width: width ?? 30, height: height ?? 30),
|
||||
padding: EdgeInsets.zero,
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
shape: shape ?? const CircleBorder(),
|
||||
|
||||
@@ -52,4 +52,4 @@ class ScrollableWithBottomSectionState extends State<ScrollableWithBottomSection
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,11 +105,11 @@ class SeedWidgetState extends State<SeedWidget> {
|
||||
cursorColor: Theme.of(context).colorScheme.primary,
|
||||
backgroundCursorColor: Theme.of(context).colorScheme.primary,
|
||||
validStyle: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
backgroundColor: Colors.transparent,
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 16,
|
||||
),
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
backgroundColor: Colors.transparent,
|
||||
fontWeight: FontWeight.normal,
|
||||
fontSize: 16,
|
||||
),
|
||||
invalidStyle: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
color: Theme.of(context).colorScheme.errorContainer,
|
||||
backgroundColor: Colors.transparent,
|
||||
@@ -157,7 +157,8 @@ class SeedWidgetState extends State<SeedWidget> {
|
||||
padding: EdgeInsets.all(6),
|
||||
decoration: ShapeDecoration(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
shape: RoundedSuperellipseBorder(borderRadius: BorderRadius.circular(18)),
|
||||
shape: RoundedSuperellipseBorder(
|
||||
borderRadius: BorderRadius.circular(18)),
|
||||
),
|
||||
child: Image.asset(
|
||||
'assets/images/paste_ios.png',
|
||||
|
||||
@@ -9,8 +9,6 @@ class SeedPhraseGridWidget extends StatelessWidget {
|
||||
|
||||
final List<String> list;
|
||||
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
int minTiles = 1;
|
||||
@@ -23,7 +21,6 @@ class SeedPhraseGridWidget extends StatelessWidget {
|
||||
int crossAxisCount =
|
||||
((screenWidth + spacing - (2 * padding)) / (desiredTileWidth + spacing)).floor();
|
||||
|
||||
|
||||
if (crossAxisCount > maxTiles) crossAxisCount = maxTiles;
|
||||
if (crossAxisCount < minTiles) crossAxisCount = minTiles;
|
||||
|
||||
@@ -44,9 +41,8 @@ class SeedPhraseGridWidget extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHigh
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHigh),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
|
||||
@@ -26,9 +26,9 @@ class _SimpleCheckboxState extends State<SimpleCheckbox> {
|
||||
checkColor: Theme.of(context).textTheme.titleLarge!.color,
|
||||
activeColor: Colors.transparent,
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
side: WidgetStateBorderSide.resolveWith((states) => BorderSide(
|
||||
color: Theme.of(context).textTheme.titleLarge!.color!, width: 1.0)),
|
||||
side: WidgetStateBorderSide.resolveWith((states) =>
|
||||
BorderSide(color: Theme.of(context).textTheme.titleLarge!.color!, width: 1.0)),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,12 +66,11 @@ class StandardCheckbox extends StatelessWidget {
|
||||
caption,
|
||||
softWrap: true,
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
fontSize: 16.0,
|
||||
|
||||
fontWeight: FontWeight.normal,
|
||||
color: captionColor ?? Theme.of(context).colorScheme.onSurface,
|
||||
decoration: TextDecoration.none,
|
||||
),
|
||||
fontSize: 16.0,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: captionColor ?? Theme.of(context).colorScheme.onSurface,
|
||||
decoration: TextDecoration.none,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
@@ -50,7 +50,6 @@ class StandardListRow extends StatelessWidget {
|
||||
Widget? buildLeading(BuildContext context) => null;
|
||||
|
||||
Widget buildCenter(BuildContext context, {required bool hasLeftOffset}) {
|
||||
|
||||
return Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
@@ -84,17 +83,17 @@ class StandardListRow extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
)
|
||||
else
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
title,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: titleColor(context),
|
||||
fontWeight: isSelected ? FontWeight.w800 : FontWeight.w400,
|
||||
else
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
title,
|
||||
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: titleColor(context),
|
||||
fontWeight: isSelected ? FontWeight.w800 : FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -47,9 +47,9 @@ class StandardListStatusRow extends StatelessWidget {
|
||||
Text(
|
||||
value,
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@@ -113,7 +113,9 @@ class StandardSlideButtonState extends State<StandardSlideButton> {
|
||||
child: Icon(
|
||||
key: ValueKey('standard_slide_button_widget_slider_icon_key'),
|
||||
Icons.arrow_forward,
|
||||
color: widget.isDisabled ? Theme.of(context).colorScheme.onSurface.withOpacity(0.2) : Theme.of(context).colorScheme.onSurface,
|
||||
color: widget.isDisabled
|
||||
? Theme.of(context).colorScheme.onSurface.withOpacity(0.2)
|
||||
: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -65,7 +65,6 @@ class ValidatableAnnotatedEditableText extends EditableText {
|
||||
backgroundCursorColor: backgroundCursorColor,
|
||||
onChanged: onChanged,
|
||||
onSubmitted: onSubmitted,
|
||||
|
||||
toolbarOptions: const ToolbarOptions(
|
||||
copy: true,
|
||||
cut: true,
|
||||
@@ -120,17 +119,17 @@ class ValidatableAnnotatedEditableTextState extends EditableTextState {
|
||||
annotation = Annotation(
|
||||
range: TextRange(start: 0, end: item.range.start),
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
backgroundColor: Colors.transparent,
|
||||
),
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
backgroundColor: Colors.transparent,
|
||||
),
|
||||
);
|
||||
} else if (prev.range.end < item.range.start) {
|
||||
annotation = Annotation(
|
||||
range: TextRange(start: prev.range.end, end: item.range.start),
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
color: Theme.of(context).colorScheme.onError,
|
||||
backgroundColor: Colors.transparent,
|
||||
),
|
||||
color: Theme.of(context).colorScheme.onError,
|
||||
backgroundColor: Colors.transparent,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -146,9 +145,9 @@ class ValidatableAnnotatedEditableTextState extends EditableTextState {
|
||||
Annotation(
|
||||
range: TextRange(start: result.last.range.end, end: text.length),
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
backgroundColor: Colors.transparent,
|
||||
),
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
backgroundColor: Colors.transparent,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -36,12 +36,11 @@ class VulnerableSeedsPopup extends StatelessWidget {
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: DefaultTextStyle(
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
decoration: TextDecoration.none,
|
||||
fontSize: 24.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
decoration: TextDecoration.none,
|
||||
fontSize: 24.0,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
child: Text("Emergency Notice"),
|
||||
),
|
||||
),
|
||||
@@ -61,12 +60,10 @@ class VulnerableSeedsPopup extends StatelessWidget {
|
||||
child: Text(
|
||||
"Your Bitcoin wallet(s) below use a legacy seed format that is vulnerable, which MAY result in you losing money from these wallet(s) if no action is taken.\nWe recommend that you IMMEDIATELY create wallet(s) in Cake Wallet and immediately transfer the funds to these wallet(s).\nVulnerable wallet name(s):\n\n[${affectedWalletNames.join(", ")}]\n\nFor assistance, please use the in-app support or email support@cakewallet.com",
|
||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||
decoration: TextDecoration.none,
|
||||
fontSize: 16.0,
|
||||
|
||||
color: Theme.of(context)
|
||||
.colorScheme.onSurface,
|
||||
),
|
||||
decoration: TextDecoration.none,
|
||||
fontSize: 16.0,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user