mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
desktop ordinal details view fix
This commit is contained in:
parent
d9d7f25692
commit
8edaa9d353
2 changed files with 105 additions and 72 deletions
|
@ -9,8 +9,9 @@ import 'package:stackwallet/pages/ordinals/widgets/dialogs.dart';
|
||||||
import 'package:stackwallet/themes/stack_colors.dart';
|
import 'package:stackwallet/themes/stack_colors.dart';
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.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/custom_buttons/app_bar_icon_button.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||||
|
import 'package:stackwallet/widgets/desktop/desktop_scaffold.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
|
import 'package:stackwallet/widgets/desktop/secondary_button.dart';
|
||||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
@ -36,77 +37,110 @@ class _DesktopOrdinalDetailsViewState extends State<DesktopOrdinalDetailsView> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Background(
|
return DesktopScaffold(
|
||||||
child: SafeArea(
|
appBar: DesktopAppBar(
|
||||||
child: Scaffold(
|
background: Theme.of(context).extension<StackColors>()!.popupBG,
|
||||||
backgroundColor:
|
leading: Expanded(
|
||||||
Theme.of(context).extension<StackColors>()!.background,
|
child: Row(
|
||||||
appBar: AppBar(
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
backgroundColor:
|
children: [
|
||||||
Theme.of(context).extension<StackColors>()!.background,
|
const SizedBox(
|
||||||
leading: const AppBarBackButton(),
|
width: 32,
|
||||||
title: Text(
|
),
|
||||||
"Ordinal details",
|
AppBarIconButton(
|
||||||
style: STextStyles.navBarTitle(context),
|
size: 32,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textFieldDefaultBG,
|
||||||
|
shadows: const [],
|
||||||
|
icon: SvgPicture.asset(
|
||||||
|
Assets.svg.arrowLeft,
|
||||||
|
width: 18,
|
||||||
|
height: 18,
|
||||||
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.topNavIconPrimary,
|
||||||
|
),
|
||||||
|
onPressed: Navigator.of(context).pop,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 18,
|
||||||
|
),
|
||||||
|
SvgPicture.asset(
|
||||||
|
Assets.svg.ordinal,
|
||||||
|
width: 32,
|
||||||
|
height: 32,
|
||||||
|
color:
|
||||||
|
Theme.of(context).extension<StackColors>()!.textSubtitle1,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 12,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Ordinals",
|
||||||
|
style: STextStyles.desktopH3(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
useSpacers: false,
|
||||||
child: Padding(
|
isCompactHeight: true,
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
),
|
||||||
child: Column(
|
body: SingleChildScrollView(
|
||||||
children: [
|
child: Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
padding: const EdgeInsets.symmetric(
|
child: Column(
|
||||||
vertical: 12,
|
children: [
|
||||||
horizontal: 39,
|
Padding(
|
||||||
),
|
padding: const EdgeInsets.symmetric(
|
||||||
child: _OrdinalImageGroup(
|
vertical: 12,
|
||||||
ordinal: widget.ordinal,
|
horizontal: 39,
|
||||||
walletId: widget.walletId,
|
),
|
||||||
),
|
child: _OrdinalImageGroup(
|
||||||
),
|
ordinal: widget.ordinal,
|
||||||
_DetailsItemWCopy(
|
walletId: widget.walletId,
|
||||||
title: "Inscription number",
|
),
|
||||||
data: widget.ordinal.inscriptionNumber.toString(),
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: _spacing,
|
|
||||||
),
|
|
||||||
_DetailsItemWCopy(
|
|
||||||
title: "ID",
|
|
||||||
data: widget.ordinal.inscriptionId,
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: _spacing,
|
|
||||||
),
|
|
||||||
// todo: add utxo status
|
|
||||||
const SizedBox(
|
|
||||||
height: _spacing,
|
|
||||||
),
|
|
||||||
const _DetailsItemWCopy(
|
|
||||||
title: "Amount",
|
|
||||||
data: "TODO", // TODO infer from utxo utxoTXID:utxoVOUT
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: _spacing,
|
|
||||||
),
|
|
||||||
const _DetailsItemWCopy(
|
|
||||||
title: "Owner address",
|
|
||||||
data: "TODO", // infer from address associated w utxoTXID
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: _spacing,
|
|
||||||
),
|
|
||||||
_DetailsItemWCopy(
|
|
||||||
title: "Transaction ID",
|
|
||||||
data: widget.ordinal.utxoTXID,
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: _spacing,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
_DetailsItemWCopy(
|
||||||
|
title: "Inscription number",
|
||||||
|
data: widget.ordinal.inscriptionNumber.toString(),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: _spacing,
|
||||||
|
),
|
||||||
|
_DetailsItemWCopy(
|
||||||
|
title: "ID",
|
||||||
|
data: widget.ordinal.inscriptionId,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: _spacing,
|
||||||
|
),
|
||||||
|
// todo: add utxo status
|
||||||
|
const SizedBox(
|
||||||
|
height: _spacing,
|
||||||
|
),
|
||||||
|
const _DetailsItemWCopy(
|
||||||
|
title: "Amount",
|
||||||
|
data: "TODO", // TODO infer from utxo utxoTXID:utxoVOUT
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: _spacing,
|
||||||
|
),
|
||||||
|
const _DetailsItemWCopy(
|
||||||
|
title: "Owner address",
|
||||||
|
data: "TODO", // infer from address associated w utxoTXID
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: _spacing,
|
||||||
|
),
|
||||||
|
_DetailsItemWCopy(
|
||||||
|
title: "Transaction ID",
|
||||||
|
data: widget.ordinal.utxoTXID,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: _spacing,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -12,7 +12,6 @@ import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
import 'package:stackwallet/dto/ordinals/inscription_data.dart';
|
|
||||||
import 'package:stackwallet/models/add_wallet_list_entity/add_wallet_list_entity.dart';
|
import 'package:stackwallet/models/add_wallet_list_entity/add_wallet_list_entity.dart';
|
||||||
import 'package:stackwallet/models/add_wallet_list_entity/sub_classes/eth_token_entity.dart';
|
import 'package:stackwallet/models/add_wallet_list_entity/sub_classes/eth_token_entity.dart';
|
||||||
import 'package:stackwallet/models/buy/response_objects/quote.dart';
|
import 'package:stackwallet/models/buy/response_objects/quote.dart';
|
||||||
|
@ -20,7 +19,7 @@ import 'package:stackwallet/models/exchange/incomplete_exchange.dart';
|
||||||
import 'package:stackwallet/models/exchange/response_objects/trade.dart';
|
import 'package:stackwallet/models/exchange/response_objects/trade.dart';
|
||||||
import 'package:stackwallet/models/isar/models/contact_entry.dart';
|
import 'package:stackwallet/models/isar/models/contact_entry.dart';
|
||||||
import 'package:stackwallet/models/isar/models/isar_models.dart';
|
import 'package:stackwallet/models/isar/models/isar_models.dart';
|
||||||
import 'package:stackwallet/models/ordinal.dart'; // TODO generalize InscriptionData -> Ordinal
|
import 'package:stackwallet/models/ordinal.dart';
|
||||||
import 'package:stackwallet/models/paynym/paynym_account_lite.dart';
|
import 'package:stackwallet/models/paynym/paynym_account_lite.dart';
|
||||||
import 'package:stackwallet/models/send_view_auto_fill_data.dart';
|
import 'package:stackwallet/models/send_view_auto_fill_data.dart';
|
||||||
import 'package:stackwallet/pages/add_wallet_views/add_token_view/add_custom_token_view.dart';
|
import 'package:stackwallet/pages/add_wallet_views/add_token_view/add_custom_token_view.dart';
|
||||||
|
@ -458,7 +457,7 @@ class RouteGenerator {
|
||||||
if (args is ({Ordinal ordinal, String walletId})) {
|
if (args is ({Ordinal ordinal, String walletId})) {
|
||||||
return getRoute(
|
return getRoute(
|
||||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||||
builder: (_) => OrdinalDetailsView(
|
builder: (_) => DesktopOrdinalDetailsView(
|
||||||
walletId: args.walletId,
|
walletId: args.walletId,
|
||||||
ordinal: args.ordinal,
|
ordinal: args.ordinal,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue