2022-08-26 08:11:35 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_svg/svg.dart';
|
|
|
|
import 'package:stackwallet/pages/add_wallet_views/add_wallet_view/add_wallet_view.dart';
|
|
|
|
import 'package:stackwallet/utilities/assets.dart';
|
2022-09-21 22:49:48 +00:00
|
|
|
|
2022-08-26 08:11:35 +00:00
|
|
|
import 'package:stackwallet/utilities/text_styles.dart';
|
2022-09-21 00:46:07 +00:00
|
|
|
import 'package:stackwallet/utilities/theme/stack_theme.dart';
|
2022-09-19 20:18:31 +00:00
|
|
|
import 'package:stackwallet/utilities/util.dart';
|
2022-08-26 08:11:35 +00:00
|
|
|
|
|
|
|
class EmptyWallets extends StatelessWidget {
|
|
|
|
const EmptyWallets({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
debugPrint("BUILD: $runtimeType");
|
2022-09-16 16:23:42 +00:00
|
|
|
|
2022-09-19 20:18:31 +00:00
|
|
|
final isDesktop = Util.isDesktop;
|
2022-09-16 16:23:42 +00:00
|
|
|
|
2022-08-26 08:11:35 +00:00
|
|
|
return SafeArea(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.symmetric(
|
|
|
|
horizontal: 43,
|
|
|
|
),
|
2022-09-16 16:23:42 +00:00
|
|
|
child: ConstrainedBox(
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
maxWidth: isDesktop ? 330 : double.infinity,
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
const Spacer(
|
|
|
|
flex: 2,
|
2022-08-26 08:11:35 +00:00
|
|
|
),
|
2022-09-16 16:23:42 +00:00
|
|
|
Image(
|
|
|
|
image: AssetImage(
|
|
|
|
Assets.png.stack,
|
|
|
|
),
|
|
|
|
width: isDesktop ? 324 : MediaQuery.of(context).size.width / 3,
|
2022-08-26 08:11:35 +00:00
|
|
|
),
|
2022-09-16 16:23:42 +00:00
|
|
|
SizedBox(
|
|
|
|
height: isDesktop ? 30 : 16,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"You do not have any wallets yet. Start building your crypto Stack!",
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: isDesktop
|
|
|
|
? STextStyles.desktopSubtitleH2.copyWith(
|
2022-09-21 21:59:52 +00:00
|
|
|
color: StackTheme.instance.color.textSubtitle1,
|
2022-09-16 16:23:42 +00:00
|
|
|
)
|
|
|
|
: STextStyles.subtitle.copyWith(
|
2022-09-21 21:59:52 +00:00
|
|
|
color: StackTheme.instance.color.textSubtitle1,
|
2022-08-26 08:11:35 +00:00
|
|
|
),
|
2022-09-16 16:23:42 +00:00
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: isDesktop ? 30 : 16,
|
|
|
|
),
|
|
|
|
if (isDesktop)
|
|
|
|
const SizedBox(
|
|
|
|
width: 328,
|
|
|
|
height: 70,
|
|
|
|
child: AddWalletButton(
|
|
|
|
isDesktop: true,
|
2022-08-26 08:11:35 +00:00
|
|
|
),
|
|
|
|
),
|
2022-09-16 16:23:42 +00:00
|
|
|
if (!isDesktop)
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: const [
|
|
|
|
AddWalletButton(
|
|
|
|
isDesktop: false,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
const Spacer(
|
|
|
|
flex: 5,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class AddWalletButton extends StatelessWidget {
|
|
|
|
const AddWalletButton({Key? key, required this.isDesktop}) : super(key: key);
|
|
|
|
|
|
|
|
final bool isDesktop;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return TextButton(
|
2022-09-21 00:46:07 +00:00
|
|
|
style: StackTheme.instance.getPrimaryEnabledButtonColor(context),
|
2022-09-16 16:23:42 +00:00
|
|
|
onPressed: () {
|
|
|
|
Navigator.of(context).pushNamed(AddWalletView.routeName);
|
|
|
|
},
|
|
|
|
child: Center(
|
|
|
|
child: Container(
|
|
|
|
padding: const EdgeInsets.symmetric(
|
|
|
|
horizontal: 16,
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
SvgPicture.asset(
|
|
|
|
Assets.svg.plus,
|
|
|
|
width: isDesktop ? 18 : null,
|
|
|
|
height: isDesktop ? 18 : null,
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
width: isDesktop ? 8 : 5,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"Add Wallet",
|
|
|
|
style: isDesktop
|
|
|
|
? STextStyles.desktopButtonEnabled
|
|
|
|
: STextStyles.button,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2022-08-26 08:11:35 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|