temp disable some ordinals stuff

This commit is contained in:
julian 2023-07-26 17:01:24 -06:00
parent e520726495
commit 4d87096324
3 changed files with 160 additions and 165 deletions

View file

@ -11,21 +11,15 @@
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:flutter_svg/svg.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/pages/ordinals/widgets/ordinals_list.dart';
import 'package:stackwallet/providers/global/wallets_provider.dart'; import 'package:stackwallet/providers/global/wallets_provider.dart';
import 'package:stackwallet/services/mixins/ordinals_interface.dart'; import 'package:stackwallet/services/mixins/ordinals_interface.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/constants.dart';
import 'package:stackwallet/utilities/show_loading.dart'; import 'package:stackwallet/utilities/show_loading.dart';
import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/utilities/util.dart';
import 'package:stackwallet/widgets/background.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/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 { class OrdinalsView extends ConsumerStatefulWidget {
const OrdinalsView({ const OrdinalsView({
@ -93,38 +87,39 @@ class _OrdinalsViewState extends ConsumerState<OrdinalsView> {
onPressed: () async { onPressed: () async {
// show loading for a minimum of 2 seconds on refreshing // show loading for a minimum of 2 seconds on refreshing
await showLoading( await showLoading(
whileFuture: Future.wait<void>([ whileFuture: Future.wait<void>([
Future.delayed(const Duration(seconds: 2)), Future.delayed(const Duration(seconds: 2)),
(ref (ref
.read(walletsChangeNotifierProvider) .read(walletsChangeNotifierProvider)
.getManager(widget.walletId) .getManager(widget.walletId)
.wallet as OrdinalsInterface) .wallet as OrdinalsInterface)
.refreshInscriptions() .refreshInscriptions()
]), ]),
context: context, context: context,
message: "Refreshing..."); 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,
); );
}, },
), ),
), ),
// 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( body: Padding(
@ -135,63 +130,63 @@ class _OrdinalsViewState extends ConsumerState<OrdinalsView> {
), ),
child: Column( child: Column(
children: [ children: [
ClipRRect( // ClipRRect(
borderRadius: BorderRadius.circular( // borderRadius: BorderRadius.circular(
Constants.size.circularBorderRadius, // Constants.size.circularBorderRadius,
), // ),
child: TextField( // child: TextField(
autocorrect: Util.isDesktop ? false : true, // autocorrect: Util.isDesktop ? false : true,
enableSuggestions: Util.isDesktop ? false : true, // enableSuggestions: Util.isDesktop ? false : true,
controller: searchController, // controller: searchController,
focusNode: searchFocus, // focusNode: searchFocus,
onChanged: (value) { // onChanged: (value) {
setState(() { // setState(() {
_searchTerm = value; // _searchTerm = value;
}); // });
}, // },
style: STextStyles.field(context), // style: STextStyles.field(context),
decoration: standardInputDecoration( // decoration: standardInputDecoration(
"Search", // "Search",
searchFocus, // searchFocus,
context, // context,
).copyWith( // ).copyWith(
prefixIcon: Padding( // prefixIcon: Padding(
padding: const EdgeInsets.symmetric( // padding: const EdgeInsets.symmetric(
horizontal: 10, // horizontal: 10,
vertical: 16, // vertical: 16,
), // ),
child: SvgPicture.asset( // child: SvgPicture.asset(
Assets.svg.search, // Assets.svg.search,
width: 16, // width: 16,
height: 16, // height: 16,
), // ),
), // ),
suffixIcon: searchController.text.isNotEmpty // suffixIcon: searchController.text.isNotEmpty
? Padding( // ? Padding(
padding: const EdgeInsets.only(right: 0), // padding: const EdgeInsets.only(right: 0),
child: UnconstrainedBox( // child: UnconstrainedBox(
child: Row( // child: Row(
children: [ // children: [
TextFieldIconButton( // TextFieldIconButton(
child: const XIcon(), // child: const XIcon(),
onTap: () async { // onTap: () async {
setState(() { // setState(() {
searchController.text = ""; // searchController.text = "";
_searchTerm = ""; // _searchTerm = "";
}); // });
}, // },
), // ),
], // ],
), // ),
), // ),
) // )
: null, // : null,
), // ),
), // ),
), // ),
const SizedBox( // const SizedBox(
height: 16, // height: 16,
), // ),
Expanded( Expanded(
child: OrdinalsList( child: OrdinalsList(
walletId: widget.walletId, walletId: widget.walletId,

View file

@ -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/custom_buttons/app_bar_icon_button.dart';
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart'; import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
import 'package:stackwallet/widgets/desktop/desktop_scaffold.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'; import 'package:stackwallet/widgets/rounded_white_container.dart';
class DesktopOrdinalDetailsView extends ConsumerStatefulWidget { class DesktopOrdinalDetailsView extends ConsumerStatefulWidget {
@ -175,23 +174,23 @@ class _DesktopOrdinalDetailsViewState
// const SizedBox( // const SizedBox(
// width: 16, // width: 16,
// ), // ),
SecondaryButton( // SecondaryButton(
width: 150, // width: 150,
label: "Download", // label: "Download",
icon: SvgPicture.asset( // icon: SvgPicture.asset(
Assets.svg.arrowDown, // Assets.svg.arrowDown,
width: 13, // width: 13,
height: 18, // height: 18,
color: Theme.of(context) // color: Theme.of(context)
.extension<StackColors>()! // .extension<StackColors>()!
.buttonTextSecondary, // .buttonTextSecondary,
), // ),
buttonHeight: ButtonHeight.l, // buttonHeight: ButtonHeight.l,
iconSpacing: 8, // iconSpacing: 8,
onPressed: () { // onPressed: () {
// TODO: save and download image to device // // TODO: save and download image to device
}, // },
), // ),
], ],
), ),
), ),

View file

@ -121,62 +121,63 @@ class _DesktopOrdinals extends ConsumerState<DesktopOrdinalsView> {
children: [ children: [
Row( Row(
children: [ children: [
Expanded( const Spacer(),
child: ClipRRect( // Expanded(
borderRadius: BorderRadius.circular( // child: ClipRRect(
Constants.size.circularBorderRadius, // borderRadius: BorderRadius.circular(
), // Constants.size.circularBorderRadius,
child: TextField( // ),
autocorrect: Util.isDesktop ? false : true, // child: TextField(
enableSuggestions: Util.isDesktop ? false : true, // autocorrect: Util.isDesktop ? false : true,
controller: searchController, // enableSuggestions: Util.isDesktop ? false : true,
focusNode: searchFocusNode, // controller: searchController,
onChanged: (value) { // focusNode: searchFocusNode,
setState(() { // onChanged: (value) {
_searchTerm = value; // setState(() {
}); // _searchTerm = value;
}, // });
style: STextStyles.field(context), // },
decoration: standardInputDecoration( // style: STextStyles.field(context),
"Search", // decoration: standardInputDecoration(
searchFocusNode, // "Search",
context, // searchFocusNode,
).copyWith( // context,
prefixIcon: Padding( // ).copyWith(
padding: const EdgeInsets.symmetric( // prefixIcon: Padding(
horizontal: 10, // padding: const EdgeInsets.symmetric(
vertical: 20, // horizontal: 10,
), // vertical: 20,
child: SvgPicture.asset( // ),
Assets.svg.search, // child: SvgPicture.asset(
width: 16, // Assets.svg.search,
height: 16, // width: 16,
), // height: 16,
), // ),
suffixIcon: searchController.text.isNotEmpty // ),
? Padding( // suffixIcon: searchController.text.isNotEmpty
padding: const EdgeInsets.only(right: 0), // ? Padding(
child: UnconstrainedBox( // padding: const EdgeInsets.only(right: 0),
child: Row( // child: UnconstrainedBox(
children: [ // child: Row(
TextFieldIconButton( // children: [
child: const XIcon(), // TextFieldIconButton(
onTap: () async { // child: const XIcon(),
setState(() { // onTap: () async {
searchController.text = ""; // setState(() {
_searchTerm = ""; // searchController.text = "";
}); // _searchTerm = "";
}, // });
), // },
], // ),
), // ],
), // ),
) // ),
: null, // )
), // : null,
), // ),
), // ),
), // ),
// ),
// const SizedBox( // const SizedBox(
// width: 16, // width: 16,
// ), // ),