mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
temp disable some ordinals stuff
This commit is contained in:
parent
e520726495
commit
4d87096324
3 changed files with 160 additions and 165 deletions
|
@ -11,21 +11,15 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:stackwallet/pages/ordinals/ordinals_filter_view.dart';
|
||||
import 'package:stackwallet/pages/ordinals/widgets/ordinals_list.dart';
|
||||
import 'package:stackwallet/providers/global/wallets_provider.dart';
|
||||
import 'package:stackwallet/services/mixins/ordinals_interface.dart';
|
||||
import 'package:stackwallet/themes/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/show_loading.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/widgets/background.dart';
|
||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||
import 'package:stackwallet/widgets/icon_widgets/x_icon.dart';
|
||||
import 'package:stackwallet/widgets/stack_text_field.dart';
|
||||
import 'package:stackwallet/widgets/textfield_icon_button.dart';
|
||||
|
||||
class OrdinalsView extends ConsumerStatefulWidget {
|
||||
const OrdinalsView({
|
||||
|
@ -93,38 +87,39 @@ class _OrdinalsViewState extends ConsumerState<OrdinalsView> {
|
|||
onPressed: () async {
|
||||
// show loading for a minimum of 2 seconds on refreshing
|
||||
await showLoading(
|
||||
whileFuture: Future.wait<void>([
|
||||
Future.delayed(const Duration(seconds: 2)),
|
||||
(ref
|
||||
.read(walletsChangeNotifierProvider)
|
||||
.getManager(widget.walletId)
|
||||
.wallet as OrdinalsInterface)
|
||||
.refreshInscriptions()
|
||||
]),
|
||||
context: context,
|
||||
message: "Refreshing...");
|
||||
},
|
||||
),
|
||||
),
|
||||
AspectRatio(
|
||||
aspectRatio: 1,
|
||||
child: AppBarIconButton(
|
||||
size: 36,
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.filter,
|
||||
width: 20,
|
||||
height: 20,
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.topNavIconPrimary,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pushNamed(
|
||||
OrdinalsFilterView.routeName,
|
||||
whileFuture: Future.wait<void>([
|
||||
Future.delayed(const Duration(seconds: 2)),
|
||||
(ref
|
||||
.read(walletsChangeNotifierProvider)
|
||||
.getManager(widget.walletId)
|
||||
.wallet as OrdinalsInterface)
|
||||
.refreshInscriptions()
|
||||
]),
|
||||
context: context,
|
||||
message: "Refreshing...",
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
// AspectRatio(
|
||||
// aspectRatio: 1,
|
||||
// child: AppBarIconButton(
|
||||
// size: 36,
|
||||
// icon: SvgPicture.asset(
|
||||
// Assets.svg.filter,
|
||||
// width: 20,
|
||||
// height: 20,
|
||||
// color: Theme.of(context)
|
||||
// .extension<StackColors>()!
|
||||
// .topNavIconPrimary,
|
||||
// ),
|
||||
// onPressed: () {
|
||||
// Navigator.of(context).pushNamed(
|
||||
// OrdinalsFilterView.routeName,
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
body: Padding(
|
||||
|
@ -135,63 +130,63 @@ class _OrdinalsViewState extends ConsumerState<OrdinalsView> {
|
|||
),
|
||||
child: Column(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
child: TextField(
|
||||
autocorrect: Util.isDesktop ? false : true,
|
||||
enableSuggestions: Util.isDesktop ? false : true,
|
||||
controller: searchController,
|
||||
focusNode: searchFocus,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_searchTerm = value;
|
||||
});
|
||||
},
|
||||
style: STextStyles.field(context),
|
||||
decoration: standardInputDecoration(
|
||||
"Search",
|
||||
searchFocus,
|
||||
context,
|
||||
).copyWith(
|
||||
prefixIcon: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 16,
|
||||
),
|
||||
child: SvgPicture.asset(
|
||||
Assets.svg.search,
|
||||
width: 16,
|
||||
height: 16,
|
||||
),
|
||||
),
|
||||
suffixIcon: searchController.text.isNotEmpty
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(right: 0),
|
||||
child: UnconstrainedBox(
|
||||
child: Row(
|
||||
children: [
|
||||
TextFieldIconButton(
|
||||
child: const XIcon(),
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
searchController.text = "";
|
||||
_searchTerm = "";
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
// ClipRRect(
|
||||
// borderRadius: BorderRadius.circular(
|
||||
// Constants.size.circularBorderRadius,
|
||||
// ),
|
||||
// child: TextField(
|
||||
// autocorrect: Util.isDesktop ? false : true,
|
||||
// enableSuggestions: Util.isDesktop ? false : true,
|
||||
// controller: searchController,
|
||||
// focusNode: searchFocus,
|
||||
// onChanged: (value) {
|
||||
// setState(() {
|
||||
// _searchTerm = value;
|
||||
// });
|
||||
// },
|
||||
// style: STextStyles.field(context),
|
||||
// decoration: standardInputDecoration(
|
||||
// "Search",
|
||||
// searchFocus,
|
||||
// context,
|
||||
// ).copyWith(
|
||||
// prefixIcon: Padding(
|
||||
// padding: const EdgeInsets.symmetric(
|
||||
// horizontal: 10,
|
||||
// vertical: 16,
|
||||
// ),
|
||||
// child: SvgPicture.asset(
|
||||
// Assets.svg.search,
|
||||
// width: 16,
|
||||
// height: 16,
|
||||
// ),
|
||||
// ),
|
||||
// suffixIcon: searchController.text.isNotEmpty
|
||||
// ? Padding(
|
||||
// padding: const EdgeInsets.only(right: 0),
|
||||
// child: UnconstrainedBox(
|
||||
// child: Row(
|
||||
// children: [
|
||||
// TextFieldIconButton(
|
||||
// child: const XIcon(),
|
||||
// onTap: () async {
|
||||
// setState(() {
|
||||
// searchController.text = "";
|
||||
// _searchTerm = "";
|
||||
// });
|
||||
// },
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// : null,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(
|
||||
// height: 16,
|
||||
// ),
|
||||
Expanded(
|
||||
child: OrdinalsList(
|
||||
walletId: widget.walletId,
|
||||
|
|
|
@ -19,7 +19,6 @@ import 'package:stackwallet/utilities/text_styles.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/secondary_button.dart';
|
||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||
|
||||
class DesktopOrdinalDetailsView extends ConsumerStatefulWidget {
|
||||
|
@ -175,23 +174,23 @@ class _DesktopOrdinalDetailsViewState
|
|||
// const SizedBox(
|
||||
// width: 16,
|
||||
// ),
|
||||
SecondaryButton(
|
||||
width: 150,
|
||||
label: "Download",
|
||||
icon: SvgPicture.asset(
|
||||
Assets.svg.arrowDown,
|
||||
width: 13,
|
||||
height: 18,
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.buttonTextSecondary,
|
||||
),
|
||||
buttonHeight: ButtonHeight.l,
|
||||
iconSpacing: 8,
|
||||
onPressed: () {
|
||||
// TODO: save and download image to device
|
||||
},
|
||||
),
|
||||
// SecondaryButton(
|
||||
// width: 150,
|
||||
// label: "Download",
|
||||
// icon: SvgPicture.asset(
|
||||
// Assets.svg.arrowDown,
|
||||
// width: 13,
|
||||
// height: 18,
|
||||
// color: Theme.of(context)
|
||||
// .extension<StackColors>()!
|
||||
// .buttonTextSecondary,
|
||||
// ),
|
||||
// buttonHeight: ButtonHeight.l,
|
||||
// iconSpacing: 8,
|
||||
// onPressed: () {
|
||||
// // TODO: save and download image to device
|
||||
// },
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -121,62 +121,63 @@ class _DesktopOrdinals extends ConsumerState<DesktopOrdinalsView> {
|
|||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(
|
||||
Constants.size.circularBorderRadius,
|
||||
),
|
||||
child: TextField(
|
||||
autocorrect: Util.isDesktop ? false : true,
|
||||
enableSuggestions: Util.isDesktop ? false : true,
|
||||
controller: searchController,
|
||||
focusNode: searchFocusNode,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
_searchTerm = value;
|
||||
});
|
||||
},
|
||||
style: STextStyles.field(context),
|
||||
decoration: standardInputDecoration(
|
||||
"Search",
|
||||
searchFocusNode,
|
||||
context,
|
||||
).copyWith(
|
||||
prefixIcon: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 20,
|
||||
),
|
||||
child: SvgPicture.asset(
|
||||
Assets.svg.search,
|
||||
width: 16,
|
||||
height: 16,
|
||||
),
|
||||
),
|
||||
suffixIcon: searchController.text.isNotEmpty
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(right: 0),
|
||||
child: UnconstrainedBox(
|
||||
child: Row(
|
||||
children: [
|
||||
TextFieldIconButton(
|
||||
child: const XIcon(),
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
searchController.text = "";
|
||||
_searchTerm = "";
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
// Expanded(
|
||||
// child: ClipRRect(
|
||||
// borderRadius: BorderRadius.circular(
|
||||
// Constants.size.circularBorderRadius,
|
||||
// ),
|
||||
// child: TextField(
|
||||
// autocorrect: Util.isDesktop ? false : true,
|
||||
// enableSuggestions: Util.isDesktop ? false : true,
|
||||
// controller: searchController,
|
||||
// focusNode: searchFocusNode,
|
||||
// onChanged: (value) {
|
||||
// setState(() {
|
||||
// _searchTerm = value;
|
||||
// });
|
||||
// },
|
||||
// style: STextStyles.field(context),
|
||||
// decoration: standardInputDecoration(
|
||||
// "Search",
|
||||
// searchFocusNode,
|
||||
// context,
|
||||
// ).copyWith(
|
||||
// prefixIcon: Padding(
|
||||
// padding: const EdgeInsets.symmetric(
|
||||
// horizontal: 10,
|
||||
// vertical: 20,
|
||||
// ),
|
||||
// child: SvgPicture.asset(
|
||||
// Assets.svg.search,
|
||||
// width: 16,
|
||||
// height: 16,
|
||||
// ),
|
||||
// ),
|
||||
// suffixIcon: searchController.text.isNotEmpty
|
||||
// ? Padding(
|
||||
// padding: const EdgeInsets.only(right: 0),
|
||||
// child: UnconstrainedBox(
|
||||
// child: Row(
|
||||
// children: [
|
||||
// TextFieldIconButton(
|
||||
// child: const XIcon(),
|
||||
// onTap: () async {
|
||||
// setState(() {
|
||||
// searchController.text = "";
|
||||
// _searchTerm = "";
|
||||
// });
|
||||
// },
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// : null,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(
|
||||
// width: 16,
|
||||
// ),
|
||||
|
|
Loading…
Reference in a new issue