stack_wallet/lib/pages/buy_view/buy_in_wallet_view.dart

65 lines
1.8 KiB
Dart
Raw Normal View History

2023-05-26 21:21:16 +00:00
/*
* This file is part of Stack Wallet.
*
* Copyright (c) 2023 Cypher Stack
* All Rights Reserved.
* The code is distributed under GPLv3 license, see LICENSE file for details.
* Generated by Cypher Stack on 2023-05-26
*
*/
import 'package:flutter/material.dart';
import 'package:stackwallet/models/isar/models/ethereum/eth_contract.dart';
import 'package:stackwallet/pages/buy_view/buy_view.dart';
import 'package:stackwallet/themes/stack_colors.dart';
import 'package:stackwallet/utilities/text_styles.dart';
2024-05-15 21:20:45 +00:00
import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart';
import 'package:stackwallet/widgets/background.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
class BuyInWalletView extends StatefulWidget {
const BuyInWalletView({
2024-05-15 21:20:45 +00:00
super.key,
required this.coin,
this.contract,
2024-05-15 21:20:45 +00:00
});
static const String routeName = "/stackBuyInWalletView";
2024-05-15 21:20:45 +00:00
final CryptoCurrency? coin;
final EthContract? contract;
@override
State<BuyInWalletView> createState() => _BuyInWalletViewState();
}
class _BuyInWalletViewState extends State<BuyInWalletView> {
2024-05-15 21:20:45 +00:00
late final CryptoCurrency? coin;
@override
Widget build(BuildContext context) {
debugPrint("BUILD: $runtimeType");
return Background(
child: Scaffold(
backgroundColor: Theme.of(context).extension<StackColors>()!.background,
appBar: AppBar(
leading: AppBarBackButton(
onPressed: () {
Navigator.of(context).pop();
},
),
title: Text(
2023-01-27 20:00:51 +00:00
"Buy ${widget.coin?.ticker}",
style: STextStyles.navBarTitle(context),
),
),
body: BuyView(
coin: widget.coin,
2023-03-29 14:29:40 +00:00
tokenContract: widget.contract,
),
),
);
}
}