mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-26 21:39:21 +00:00
64 lines
1.7 KiB
Dart
64 lines
1.7 KiB
Dart
/*
|
|
* 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 '../../models/isar/models/ethereum/eth_contract.dart';
|
|
import 'buy_view.dart';
|
|
import '../../themes/stack_colors.dart';
|
|
import '../../utilities/text_styles.dart';
|
|
import '../../wallets/crypto_currency/crypto_currency.dart';
|
|
import '../../widgets/background.dart';
|
|
import '../../widgets/custom_buttons/app_bar_icon_button.dart';
|
|
|
|
class BuyInWalletView extends StatefulWidget {
|
|
const BuyInWalletView({
|
|
super.key,
|
|
required this.coin,
|
|
this.contract,
|
|
});
|
|
|
|
static const String routeName = "/stackBuyInWalletView";
|
|
|
|
final CryptoCurrency? coin;
|
|
final EthContract? contract;
|
|
|
|
@override
|
|
State<BuyInWalletView> createState() => _BuyInWalletViewState();
|
|
}
|
|
|
|
class _BuyInWalletViewState extends State<BuyInWalletView> {
|
|
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(
|
|
"Buy ${widget.coin?.ticker}",
|
|
style: STextStyles.navBarTitle(context),
|
|
),
|
|
),
|
|
body: BuyView(
|
|
coin: widget.coin,
|
|
tokenContract: widget.contract,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|