desktop tx search filter + various bugfixes

This commit is contained in:
julian 2022-10-27 16:04:13 -06:00
parent ec7840419f
commit cc0770b2a2
4 changed files with 772 additions and 536 deletions

View file

@ -306,7 +306,7 @@ class _TransactionDetailsViewState extends ConsumerState<AllTransactionsView> {
"Search",
searchFieldFocusNode,
context,
desktopMed: true,
desktopMed: isDesktop,
).copyWith(
prefixIcon: Padding(
padding: EdgeInsets.symmetric(
@ -330,6 +330,7 @@ class _TransactionDetailsViewState extends ConsumerState<AllTransactionsView> {
onTap: () async {
setState(() {
_searchController.text = "";
_searchString = "";
});
},
),
@ -342,31 +343,45 @@ class _TransactionDetailsViewState extends ConsumerState<AllTransactionsView> {
),
),
),
const SizedBox(
width: 20,
),
SecondaryButton(
desktopMed: true,
width: 200,
label: "Filter",
icon: SvgPicture.asset(
Assets.svg.filter,
color: Theme.of(context)
.extension<StackColors>()!
.accentColorDark,
if (isDesktop)
const SizedBox(
width: 20,
height: 20,
),
onPressed: () {
Navigator.of(context).pushNamed(
TransactionSearchFilterView.routeName,
arguments: ref
if (isDesktop)
SecondaryButton(
desktopMed: isDesktop,
width: 200,
label: "Filter",
icon: SvgPicture.asset(
Assets.svg.filter,
color: Theme.of(context)
.extension<StackColors>()!
.accentColorDark,
width: 20,
height: 20,
),
onPressed: () {
final coin = ref
.read(walletsChangeNotifierProvider)
.getManager(walletId)
.coin,
);
},
),
.coin;
if (isDesktop) {
showDialog<void>(
context: context,
builder: (context) {
return TransactionSearchFilterView(
coin: coin,
);
},
);
} else {
Navigator.of(context).pushNamed(
TransactionSearchFilterView.routeName,
arguments: coin,
);
}
},
),
],
),
),
@ -402,6 +417,7 @@ class _TransactionDetailsViewState extends ConsumerState<AllTransactionsView> {
final monthlyList = groupTransactionsByMonth(searched);
return ListView.builder(
primary: isDesktop ? false : null,
itemCount: monthlyList.length,
itemBuilder: (_, index) {
final month = monthlyList[index];

View file

@ -359,6 +359,7 @@ class _MyWalletState extends State<MyWallet> {
@override
Widget build(BuildContext context) {
return ListView(
primary: false,
children: [
Text(
"My wallet",

View file

@ -228,6 +228,25 @@ class STextStyles {
}
}
static TextStyle labelExtraExtraSmall(BuildContext context) {
switch (_theme(context).themeType) {
case ThemeType.light:
return GoogleFonts.inter(
color: _theme(context).textFieldActiveSearchIconRight,
fontWeight: FontWeight.w500,
fontSize: 14,
height: 14 / 14,
);
case ThemeType.dark:
return GoogleFonts.inter(
color: _theme(context).textFieldActiveSearchIconRight,
fontWeight: FontWeight.w500,
fontSize: 14,
height: 14 / 14,
);
}
}
static TextStyle label700(BuildContext context) {
switch (_theme(context).themeType) {
case ThemeType.light: