monkey view page

This commit is contained in:
ryleedavis 2023-07-24 12:43:33 -06:00
parent 8ac085fe24
commit a286ba7b8f

View file

@ -7,11 +7,13 @@ import 'package:stackwallet/pages/monkey/sub_widgets/fetch_monkey_dialog.dart';
import 'package:stackwallet/services/coins/manager.dart';
import 'package:stackwallet/themes/coin_icon_provider.dart';
import 'package:stackwallet/themes/stack_colors.dart';
import 'package:stackwallet/utilities/assets.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/widgets/background.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/desktop/primary_button.dart';
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
class MonkeyView extends ConsumerStatefulWidget {
const MonkeyView({
@ -50,6 +52,7 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
@override
Widget build(BuildContext context) {
final Coin coin = ref.watch(managerProvider.select((value) => value.coin));
bool isMonkey = false;
return Background(
child: Stack(
@ -65,21 +68,90 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
"MonKey",
style: STextStyles.navBarTitle(context),
),
actions: [
AspectRatio(
aspectRatio: 1,
child: AppBarIconButton(
icon: SvgPicture.asset(Assets.svg.circleQuestion),
onPressed: () {
showDialog<dynamic>(
context: context,
useSafeArea: false,
barrierDismissible: true,
builder: (context) {
return Dialog(
child: Material(
borderRadius: BorderRadius.circular(
20,
),
body: Column(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
child: Container(
height: 200,
decoration: BoxDecoration(
color: Theme.of(context)
.extension<StackColors>()!
.popupBG,
borderRadius: BorderRadius.circular(
20,
),
),
child: Column(
children: [
const Spacer(),
Center(
child: Text(
"Help",
style: STextStyles.pageTitleH2(
context),
),
)
],
),
),
),
);
});
}),
)
],
),
body: isMonkey
? Column(
children: [
Spacer(),
Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
SecondaryButton(
label: "Download as SVG",
onPressed: () {},
),
const SizedBox(height: 12),
SecondaryButton(
label: "Download as PNG",
onPressed: () {},
),
],
),
),
],
)
: Column(
children: [
const Spacer(
flex: 4,
),
Center(
child: Column(
children: [
SvgPicture.file(
Opacity(
opacity: 0.2,
child: SvgPicture.file(
File(
ref.watch(coinIconProvider(coin)),
),
width: 164,
height: 164,
width: 200,
height: 200,
),
),
const SizedBox(
height: 40,
@ -96,7 +168,9 @@ class _MonkeyViewState extends ConsumerState<MonkeyView> {
],
),
),
const Spacer(),
const Spacer(
flex: 6,
),
Padding(
padding: const EdgeInsets.all(16.0),
child: PrimaryButton(