mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-18 02:07:43 +00:00
commit
622fac687a
17 changed files with 460 additions and 459 deletions
|
@ -654,10 +654,14 @@ class _RestoreFromFileViewState extends State<CreateBackupView> {
|
|||
},
|
||||
),
|
||||
);
|
||||
// make sure the dialog is able to be displayed for at least 1 second
|
||||
|
||||
await Future<void>.delayed(
|
||||
const Duration(seconds: 1));
|
||||
|
||||
// make sure the dialog is able to be displayed for at least 1 second
|
||||
final fut = Future<void>.delayed(
|
||||
const Duration(seconds: 1));
|
||||
|
||||
final DateTime now = DateTime.now();
|
||||
final String fileToSave =
|
||||
"$pathToSave/stackbackup_${now.year}_${now.month}_${now.day}_${now.hour}_${now.minute}_${now.second}.swb";
|
||||
|
@ -674,81 +678,86 @@ class _RestoreFromFileViewState extends State<CreateBackupView> {
|
|||
jsonEncode(backup),
|
||||
);
|
||||
|
||||
await Future.wait([fut]);
|
||||
|
||||
if (mounted) {
|
||||
// pop encryption progress dialog
|
||||
if (!isDesktop) Navigator.of(context).pop();
|
||||
|
||||
if (result) {
|
||||
await showDialog<dynamic>(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (_) => Platform.isAndroid
|
||||
? StackOkDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) {
|
||||
if (Platform.isAndroid) {
|
||||
return StackOkDialog(
|
||||
title: "Backup saved to:",
|
||||
message: fileToSave,
|
||||
)
|
||||
: !isDesktop
|
||||
? const StackOkDialog(
|
||||
title:
|
||||
"Backup creation succeeded")
|
||||
: DesktopDialog(
|
||||
maxHeight: double.infinity,
|
||||
maxWidth: 500,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(
|
||||
left: 32,
|
||||
right: 32,
|
||||
bottom: 32,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize:
|
||||
MainAxisSize.min,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 26),
|
||||
Text(
|
||||
"Stack backup saved to: \n",
|
||||
style: STextStyles
|
||||
.desktopH3(
|
||||
context),
|
||||
),
|
||||
Text(
|
||||
fileToSave,
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 40,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
// const Spacer(),
|
||||
Expanded(
|
||||
child:
|
||||
PrimaryButton(
|
||||
label: "Ok",
|
||||
desktopMed:
|
||||
true,
|
||||
onPressed:
|
||||
() {
|
||||
// Navigator.of(
|
||||
// context)
|
||||
// .pop();
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
} else if (isDesktop) {
|
||||
return DesktopDialog(
|
||||
maxHeight: double.infinity,
|
||||
maxWidth: 500,
|
||||
child: Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(
|
||||
left: 32,
|
||||
right: 32,
|
||||
bottom: 32,
|
||||
),
|
||||
);
|
||||
child: Column(
|
||||
mainAxisSize:
|
||||
MainAxisSize.min,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
const SizedBox(
|
||||
height: 26),
|
||||
Text(
|
||||
"Stack backup saved to: \n",
|
||||
style: STextStyles
|
||||
.desktopH3(context),
|
||||
),
|
||||
Text(
|
||||
fileToSave,
|
||||
style: STextStyles
|
||||
.desktopTextExtraExtraSmall(
|
||||
context),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 40,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
// const Spacer(),
|
||||
Expanded(
|
||||
child:
|
||||
PrimaryButton(
|
||||
label: "Ok",
|
||||
desktopMed: true,
|
||||
onPressed: () {
|
||||
int count = 0;
|
||||
Navigator.of(
|
||||
context)
|
||||
.popUntil((_) =>
|
||||
count++ >=
|
||||
2);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return const StackOkDialog(
|
||||
title:
|
||||
"Backup creation succeeded");
|
||||
}
|
||||
});
|
||||
passwordController.text = "";
|
||||
passwordRepeatController.text = "";
|
||||
setState(() {});
|
||||
|
|
|
@ -7,7 +7,6 @@ import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
|||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart';
|
||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
|
@ -74,7 +73,7 @@ class SupportView extends StatelessWidget {
|
|||
height: 8,
|
||||
),
|
||||
AboutItem(
|
||||
linkUrl: "https://discord.gg/RZMG3yUm",
|
||||
linkUrl: "https://discord.com/invite/mRPZuXx3At",
|
||||
label: "Discord",
|
||||
buttonText: "Stack Wallet",
|
||||
iconAsset: Assets.socials.discord,
|
||||
|
@ -138,30 +137,20 @@ class AboutItem extends StatelessWidget {
|
|||
|
||||
return RoundedWhiteContainer(
|
||||
padding: const EdgeInsets.all(0),
|
||||
child: ConditionalParent(
|
||||
condition: !isDesktop,
|
||||
builder: (child) => RawMaterialButton(
|
||||
// splashColor: Theme.of(context).extension<StackColors>()!.highlight,
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
launchUrl(
|
||||
Uri.parse(linkUrl),
|
||||
mode: LaunchMode.externalApplication,
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
vertical: 20,
|
||||
),
|
||||
child: child,
|
||||
child: RawMaterialButton(
|
||||
// splashColor: Theme.of(context).extension<StackColors>()!.highlight,
|
||||
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
launchUrl(
|
||||
Uri.parse(linkUrl),
|
||||
mode: LaunchMode.externalApplication,
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: isDesktop
|
||||
? const EdgeInsets.symmetric(
|
||||
|
@ -212,15 +201,19 @@ class AboutItem extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
if (isDesktop)
|
||||
BlueTextButton(
|
||||
text: buttonText,
|
||||
onTap: () {
|
||||
launchUrl(
|
||||
Uri.parse(linkUrl),
|
||||
mode: LaunchMode.externalApplication,
|
||||
);
|
||||
},
|
||||
),
|
||||
Text(
|
||||
buttonText,
|
||||
style: STextStyles.desktopTextExtraExtraSmall(context),
|
||||
)
|
||||
// BlueTextButton(
|
||||
// text: buttonText,
|
||||
// onTap: () {
|
||||
// launchUrl(
|
||||
// Uri.parse(linkUrl),
|
||||
// mode: LaunchMode.externalApplication,
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -13,6 +13,7 @@ import 'package:stackwallet/utilities/format.dart';
|
|||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
class FavoriteCard extends ConsumerStatefulWidget {
|
||||
|
@ -54,190 +55,198 @@ class _FavoriteCardState extends ConsumerState<FavoriteCard> {
|
|||
final externalCalls = ref.watch(
|
||||
prefsChangeNotifierProvider.select((value) => value.externalCalls));
|
||||
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
if (Util.isDesktop) {
|
||||
Navigator.of(context).pushNamed(
|
||||
DesktopWalletView.routeName,
|
||||
arguments: walletId,
|
||||
);
|
||||
} else {
|
||||
Navigator.of(context).pushNamed(
|
||||
WalletView.routeName,
|
||||
arguments: Tuple2(
|
||||
walletId,
|
||||
managerProvider,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
child: SizedBox(
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
child: CardOverlayStack(
|
||||
background: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.colorForCoin(coin),
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
),
|
||||
return ConditionalParent(
|
||||
condition: Util.isDesktop,
|
||||
builder: (child) => MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: child,
|
||||
),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
if (Util.isDesktop) {
|
||||
Navigator.of(context).pushNamed(
|
||||
DesktopWalletView.routeName,
|
||||
arguments: walletId,
|
||||
);
|
||||
} else {
|
||||
Navigator.of(context).pushNamed(
|
||||
WalletView.routeName,
|
||||
arguments: Tuple2(
|
||||
walletId,
|
||||
managerProvider,
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
const Spacer(),
|
||||
SizedBox(
|
||||
height: widget.width * 0.3,
|
||||
child: Row(
|
||||
children: [
|
||||
const Spacer(
|
||||
flex: 9,
|
||||
),
|
||||
SvgPicture.asset(
|
||||
Assets.svg.ellipse2,
|
||||
height: widget.width * 0.3,
|
||||
),
|
||||
// ),
|
||||
const Spacer(
|
||||
flex: 2,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
const Spacer(
|
||||
flex: 5,
|
||||
),
|
||||
SizedBox(
|
||||
width: widget.width * 0.45,
|
||||
child: Column(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
Assets.svg.ellipse1,
|
||||
width: widget.width * 0.45,
|
||||
),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Spacer(
|
||||
flex: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
);
|
||||
}
|
||||
},
|
||||
child: SizedBox(
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
child: CardOverlayStack(
|
||||
background: Stack(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
ref.watch(managerProvider
|
||||
.select((value) => value.walletName)),
|
||||
style: STextStyles.itemSubtitle12(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textFavoriteCard,
|
||||
),
|
||||
overflow: TextOverflow.fade,
|
||||
),
|
||||
),
|
||||
SvgPicture.asset(
|
||||
Assets.svg.iconFor(coin: coin),
|
||||
width: 24,
|
||||
height: 24,
|
||||
),
|
||||
],
|
||||
Container(
|
||||
width: widget.width,
|
||||
height: widget.height,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.colorForCoin(coin),
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
),
|
||||
),
|
||||
FutureBuilder(
|
||||
future: ref.watch(
|
||||
managerProvider.select((value) => value.totalBalance)),
|
||||
builder: (builderContext, AsyncSnapshot<Decimal> snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
if (snapshot.data != null) {
|
||||
_cachedBalance = snapshot.data!;
|
||||
if (externalCalls) {
|
||||
_cachedFiatValue = _cachedBalance *
|
||||
ref
|
||||
.watch(
|
||||
priceAnd24hChangeNotifierProvider.select(
|
||||
(value) => value.getPrice(coin),
|
||||
),
|
||||
)
|
||||
.item1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
"${Format.localizedStringAsFixed(
|
||||
decimalPlaces: 8,
|
||||
value: _cachedBalance,
|
||||
locale: ref.watch(
|
||||
localeServiceChangeNotifierProvider
|
||||
.select((value) => value.locale),
|
||||
),
|
||||
)} ${coin.ticker}",
|
||||
style: STextStyles.titleBold12(context).copyWith(
|
||||
fontSize: 16,
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textFavoriteCard,
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
const Spacer(),
|
||||
SizedBox(
|
||||
height: widget.width * 0.3,
|
||||
child: Row(
|
||||
children: [
|
||||
const Spacer(
|
||||
flex: 9,
|
||||
),
|
||||
),
|
||||
if (externalCalls)
|
||||
const SizedBox(
|
||||
height: 4,
|
||||
SvgPicture.asset(
|
||||
Assets.svg.ellipse2,
|
||||
height: widget.width * 0.3,
|
||||
),
|
||||
if (externalCalls)
|
||||
Text(
|
||||
"${Format.localizedStringAsFixed(
|
||||
decimalPlaces: 2,
|
||||
value: _cachedFiatValue,
|
||||
locale: ref.watch(
|
||||
localeServiceChangeNotifierProvider
|
||||
.select((value) => value.locale),
|
||||
),
|
||||
)} ${ref.watch(
|
||||
prefsChangeNotifierProvider
|
||||
.select((value) => value.currency),
|
||||
)}",
|
||||
style: STextStyles.itemSubtitle12(context).copyWith(
|
||||
fontSize: 10,
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textFavoriteCard,
|
||||
),
|
||||
// ),
|
||||
const Spacer(
|
||||
flex: 2,
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
const Spacer(
|
||||
flex: 5,
|
||||
),
|
||||
SizedBox(
|
||||
width: widget.width * 0.45,
|
||||
child: Column(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
Assets.svg.ellipse1,
|
||||
width: widget.width * 0.45,
|
||||
),
|
||||
const Spacer(),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Spacer(
|
||||
flex: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
ref.watch(managerProvider
|
||||
.select((value) => value.walletName)),
|
||||
style: STextStyles.itemSubtitle12(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textFavoriteCard,
|
||||
),
|
||||
overflow: TextOverflow.fade,
|
||||
),
|
||||
),
|
||||
SvgPicture.asset(
|
||||
Assets.svg.iconFor(coin: coin),
|
||||
width: 24,
|
||||
height: 24,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
FutureBuilder(
|
||||
future: ref.watch(
|
||||
managerProvider.select((value) => value.totalBalance)),
|
||||
builder: (builderContext, AsyncSnapshot<Decimal> snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
if (snapshot.data != null) {
|
||||
_cachedBalance = snapshot.data!;
|
||||
if (externalCalls) {
|
||||
_cachedFiatValue = _cachedBalance *
|
||||
ref
|
||||
.watch(
|
||||
priceAnd24hChangeNotifierProvider.select(
|
||||
(value) => value.getPrice(coin),
|
||||
),
|
||||
)
|
||||
.item1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
"${Format.localizedStringAsFixed(
|
||||
decimalPlaces: 8,
|
||||
value: _cachedBalance,
|
||||
locale: ref.watch(
|
||||
localeServiceChangeNotifierProvider
|
||||
.select((value) => value.locale),
|
||||
),
|
||||
)} ${coin.ticker}",
|
||||
style: STextStyles.titleBold12(context).copyWith(
|
||||
fontSize: 16,
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textFavoriteCard,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (externalCalls)
|
||||
const SizedBox(
|
||||
height: 4,
|
||||
),
|
||||
if (externalCalls)
|
||||
Text(
|
||||
"${Format.localizedStringAsFixed(
|
||||
decimalPlaces: 2,
|
||||
value: _cachedFiatValue,
|
||||
locale: ref.watch(
|
||||
localeServiceChangeNotifierProvider
|
||||
.select((value) => value.locale),
|
||||
),
|
||||
)} ${ref.watch(
|
||||
prefsChangeNotifierProvider
|
||||
.select((value) => value.currency),
|
||||
)}",
|
||||
style:
|
||||
STextStyles.itemSubtitle12(context).copyWith(
|
||||
fontSize: 10,
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textFavoriteCard,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -55,6 +55,8 @@ class _DesktopLoginViewState extends ConsumerState<DesktopLoginView> {
|
|||
),
|
||||
);
|
||||
|
||||
await Future<void>.delayed(const Duration(seconds: 1));
|
||||
|
||||
await ref
|
||||
.read(storageCryptoHandlerProvider)
|
||||
.initFromExisting(passwordController.text);
|
||||
|
@ -79,6 +81,8 @@ class _DesktopLoginViewState extends ConsumerState<DesktopLoginView> {
|
|||
// pop loading indicator
|
||||
Navigator.of(context).pop();
|
||||
|
||||
await Future<void>.delayed(const Duration(seconds: 1));
|
||||
|
||||
await showFloatingFlushBar(
|
||||
type: FlushBarType.warning,
|
||||
message: e.toString(),
|
||||
|
|
|
@ -13,8 +13,10 @@ import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
|||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
||||
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
||||
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
||||
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
|
||||
import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
||||
import 'package:stackwallet/widgets/rounded_container.dart';
|
||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||
|
||||
|
@ -89,37 +91,31 @@ class _DesktopAddressBook extends ConsumerState<DesktopAddressBook> {
|
|||
Widget build(BuildContext context) {
|
||||
debugPrint("BUILD: $runtimeType");
|
||||
final hasWallets = ref.watch(walletsChangeNotifierProvider).hasWallets;
|
||||
final size = MediaQuery.of(context).size;
|
||||
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
DesktopAppBar(
|
||||
isCompactHeight: true,
|
||||
leading: Row(
|
||||
children: [
|
||||
const SizedBox(
|
||||
width: 24,
|
||||
),
|
||||
Text(
|
||||
"Address Book",
|
||||
style: STextStyles.desktopH3(context),
|
||||
)
|
||||
],
|
||||
),
|
||||
return DesktopScaffold(
|
||||
appBar: DesktopAppBar(
|
||||
isCompactHeight: true,
|
||||
leading: Row(
|
||||
children: [
|
||||
const SizedBox(
|
||||
width: 24,
|
||||
),
|
||||
Text(
|
||||
"Address Book",
|
||||
style: STextStyles.desktopH3(context),
|
||||
)
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 53),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: RoundedContainer(
|
||||
color: Theme.of(context).extension<StackColors>()!.background,
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 60,
|
||||
width: size.width - 800,
|
||||
child: ClipRRect(
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(24),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Column(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
|
@ -172,81 +168,57 @@ class _DesktopAddressBook extends ConsumerState<DesktopAddressBook> {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getDesktopMenuButtonColorSelected(context),
|
||||
onPressed: () {
|
||||
selectCryptocurrency();
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 200,
|
||||
height: 56,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: SvgPicture.asset(Assets.svg.filter),
|
||||
),
|
||||
Text(
|
||||
"Filter",
|
||||
style: STextStyles.desktopTextExtraExtraSmall(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textDark,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
TextButton(
|
||||
style: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.getPrimaryEnabledButtonColor(context),
|
||||
onPressed: () {
|
||||
newContact();
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 200,
|
||||
height: 56,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: SvgPicture.asset(Assets.svg.circlePlus),
|
||||
),
|
||||
Text(
|
||||
"Add new",
|
||||
style: STextStyles.desktopTextExtraExtraSmall(context)
|
||||
.copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.popupBG,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
const AddressBookView(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Expanded(
|
||||
flex: 5,
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
SecondaryButton(
|
||||
width: 184,
|
||||
label: "Filter",
|
||||
desktopMed: true,
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.filter,
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.buttonTextSecondary,
|
||||
),
|
||||
onPressed: selectCryptocurrency,
|
||||
),
|
||||
const SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
PrimaryButton(
|
||||
width: 184,
|
||||
label: "Add new",
|
||||
desktopMed: true,
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.circlePlus,
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.buttonTextPrimary,
|
||||
),
|
||||
onPressed: newContact,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 24, vertical: 26),
|
||||
child: SizedBox(
|
||||
width: 489,
|
||||
child: AddressBookView(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
|||
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
|
||||
import 'package:stackwallet/widgets/icon_widgets/addressbook_icon.dart';
|
||||
import 'package:stackwallet/widgets/icon_widgets/clipboard_icon.dart';
|
||||
import 'package:stackwallet/widgets/icon_widgets/qrcode_icon.dart';
|
||||
import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||
|
@ -249,6 +248,13 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
|||
label: "Yes",
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop(true);
|
||||
|
||||
setState(() {
|
||||
sendToController.text = "";
|
||||
cryptoAmountController.text = "";
|
||||
baseAmountController.text = "";
|
||||
noteController.text = "";
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
|
@ -1247,12 +1253,12 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
|||
},
|
||||
child: const AddressBookIcon(),
|
||||
),
|
||||
if (sendToController.text.isEmpty)
|
||||
TextFieldIconButton(
|
||||
key: const Key("sendViewScanQrButtonKey"),
|
||||
onTap: scanQr,
|
||||
child: const QrCodeIcon(),
|
||||
)
|
||||
// if (sendToController.text.isEmpty)
|
||||
// TextFieldIconButton(
|
||||
// key: const Key("sendViewScanQrButtonKey"),
|
||||
// onTap: scanQr,
|
||||
// child: const QrCodeIcon(),
|
||||
// )
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -39,13 +39,20 @@ class _DesktopNotificationsViewState
|
|||
),
|
||||
),
|
||||
body: notifications.isEmpty
|
||||
? RoundedWhiteContainer(
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Notifications will appear here",
|
||||
style: STextStyles.desktopTextExtraExtraSmall(context),
|
||||
? Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(24),
|
||||
child: RoundedWhiteContainer(
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Notifications will appear here",
|
||||
style: STextStyles.desktopTextExtraExtraSmall(context),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: ListView.builder(
|
||||
primary: false,
|
||||
|
|
|
@ -32,6 +32,7 @@ class _AdvancedSettings extends ConsumerState<AdvancedSettings> {
|
|||
right: 30,
|
||||
),
|
||||
child: RoundedWhiteContainer(
|
||||
radiusMultiplier: 2,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
|
|
@ -108,10 +108,65 @@ class _DebugInfoDialog extends ConsumerState<DebugInfoDialog> {
|
|||
const DesktopDialogCloseButton(),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
child: TextField(
|
||||
autocorrect: Util.isDesktop ? false : true,
|
||||
enableSuggestions: Util.isDesktop ? false : true,
|
||||
controller: searchDebugController,
|
||||
focusNode: searchDebugFocusNode,
|
||||
onChanged: (newString) {
|
||||
setState(() => _searchTerm = newString);
|
||||
},
|
||||
style: STextStyles.field(context),
|
||||
decoration: standardInputDecoration(
|
||||
"Search",
|
||||
searchDebugFocusNode,
|
||||
context,
|
||||
).copyWith(
|
||||
prefixIcon: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 16,
|
||||
),
|
||||
child: SvgPicture.asset(
|
||||
Assets.svg.search,
|
||||
width: 16,
|
||||
height: 16,
|
||||
),
|
||||
),
|
||||
suffixIcon: searchDebugController.text.isNotEmpty
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(right: 0),
|
||||
child: UnconstrainedBox(
|
||||
child: Row(
|
||||
children: [
|
||||
TextFieldIconButton(
|
||||
child: const XIcon(),
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
searchDebugController.text = "";
|
||||
_searchTerm = "";
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
// flex: 24,
|
||||
child: NestedScrollView(
|
||||
floatHeaderSlivers: true,
|
||||
// floatHeaderSlivers: true,
|
||||
headerSliverBuilder: (context, innerBoxIsScrolled) {
|
||||
return [
|
||||
SliverOverlapAbsorber(
|
||||
|
@ -122,70 +177,7 @@ class _DebugInfoDialog extends ConsumerState<DebugInfoDialog> {
|
|||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 16, horizontal: 32),
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 16),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
child: TextField(
|
||||
autocorrect: Util.isDesktop ? false : true,
|
||||
enableSuggestions:
|
||||
Util.isDesktop ? false : true,
|
||||
controller: searchDebugController,
|
||||
focusNode: searchDebugFocusNode,
|
||||
onChanged: (newString) {
|
||||
setState(() => _searchTerm = newString);
|
||||
},
|
||||
style: STextStyles.field(context),
|
||||
decoration: standardInputDecoration(
|
||||
"Search",
|
||||
searchDebugFocusNode,
|
||||
context,
|
||||
).copyWith(
|
||||
prefixIcon: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 16,
|
||||
),
|
||||
child: SvgPicture.asset(
|
||||
Assets.svg.search,
|
||||
width: 16,
|
||||
height: 16,
|
||||
),
|
||||
),
|
||||
suffixIcon: searchDebugController
|
||||
.text.isNotEmpty
|
||||
? Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(right: 0),
|
||||
child: UnconstrainedBox(
|
||||
child: Row(
|
||||
children: [
|
||||
TextFieldIconButton(
|
||||
child: const XIcon(),
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
searchDebugController
|
||||
.text = "";
|
||||
_searchTerm = "";
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
],
|
||||
children: const [],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -49,6 +49,7 @@ class _AppearanceOptionSettings
|
|||
right: 30,
|
||||
),
|
||||
child: RoundedWhiteContainer(
|
||||
radiusMultiplier: 2,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
|
|
@ -338,6 +338,7 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
|||
right: 30,
|
||||
),
|
||||
child: RoundedWhiteContainer(
|
||||
radiusMultiplier: 2,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
@ -501,6 +502,7 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
|||
right: 30,
|
||||
),
|
||||
child: RoundedWhiteContainer(
|
||||
radiusMultiplier: 2,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
@ -583,6 +585,7 @@ class _BackupRestoreSettings extends ConsumerState<BackupRestoreSettings> {
|
|||
bottom: 40,
|
||||
),
|
||||
child: RoundedWhiteContainer(
|
||||
radiusMultiplier: 2,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
|
|
@ -64,6 +64,7 @@ class _CurrencySettings extends ConsumerState<CurrencySettings> {
|
|||
right: 30,
|
||||
),
|
||||
child: RoundedWhiteContainer(
|
||||
radiusMultiplier: 2,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
|
|
@ -39,6 +39,7 @@ class _LanguageOptionSettings extends ConsumerState<LanguageOptionSettings> {
|
|||
right: 30,
|
||||
),
|
||||
child: RoundedWhiteContainer(
|
||||
radiusMultiplier: 2,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
|
|
@ -88,12 +88,12 @@ class _NodesSettings extends ConsumerState<NodesSettings> {
|
|||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
right: 32,
|
||||
bottom: 32,
|
||||
right: 30,
|
||||
// bottom: 32,
|
||||
),
|
||||
child: RoundedWhiteContainer(
|
||||
radiusMultiplier: 2,
|
||||
padding: const EdgeInsets.all(24),
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
|
@ -114,7 +114,7 @@ class _NodesSettings extends ConsumerState<NodesSettings> {
|
|||
style: STextStyles.desktopTextSmall(context),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 8,
|
||||
height: 16,
|
||||
),
|
||||
Text(
|
||||
"Select a coin to see nodes",
|
||||
|
|
|
@ -144,7 +144,7 @@ class _SecuritySettings extends ConsumerState<SecuritySettings> {
|
|||
right: 30,
|
||||
),
|
||||
child: RoundedWhiteContainer(
|
||||
// radiusMultiplier: 2,
|
||||
radiusMultiplier: 2,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
|
|
@ -30,6 +30,7 @@ class _SyncingPreferencesSettings
|
|||
right: 30,
|
||||
),
|
||||
child: RoundedWhiteContainer(
|
||||
radiusMultiplier: 2,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
|
|
@ -25,6 +25,7 @@ class DesktopDialog extends StatelessWidget {
|
|||
maxHeight: maxHeight,
|
||||
),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(
|
||||
20,
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue