From 80a8c83d02f20b3347096810b0b9eb2b90603d77 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Wed, 23 Sep 2026 20:14:00 +0300 Subject: [PATCH] Fix missing Material ancestor on history filters and support chat pages (#3647) * Fix missing Material ancestor on history filters page Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_015CQrMvFAMkzVAPBrvAwRjL * Fix missing Material ancestor on support chat page Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_015CQrMvFAMkzVAPBrvAwRjL --------- Co-authored-by: Claude --- .../assets_history/history_filters_page.dart | 178 +++++++++--------- .../support_chat/support_chat_page.dart | 65 ++++--- 2 files changed, 125 insertions(+), 118 deletions(-) diff --git a/lib/new-ui/widgets/coins_page/assets_history/history_filters_page.dart b/lib/new-ui/widgets/coins_page/assets_history/history_filters_page.dart index 383ced531..f5bce173c 100644 --- a/lib/new-ui/widgets/coins_page/assets_history/history_filters_page.dart +++ b/lib/new-ui/widgets/coins_page/assets_history/history_filters_page.dart @@ -20,101 +20,105 @@ class HistoryFiltersPage extends StatelessWidget { @override Widget build(BuildContext context) { - return Container( - color: Theme.of(context).colorScheme.surface, - child: Column( - children: [ - ModalTopBar( - title: S.of(context).filters, - leadingIcon: Icon(Icons.arrow_back_ios_new), - leadingSemanticLabel: S.of(context).seed_alert_back, - onLeadingPressed: Navigator.of(context).pop, - ), - Expanded( - child: SingleChildScrollView( - controller: ModalScrollController.of(context), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 18.0), - child: Observer( - builder: (_) => Column( - children: [ - Padding( - padding: const EdgeInsets.only(bottom: 12.0), - child: Material( - color: Colors.transparent, - child: SelectDeselectAllBar( - title: S.of(context).type, - onSelected: dashboardViewModel.changeAllFilterItems), + return Material( + color: Colors.transparent, + child: Container( + color: Theme.of(context).colorScheme.surface, + child: Column( + children: [ + ModalTopBar( + title: S.of(context).filters, + leadingIcon: Icon(Icons.arrow_back_ios_new), + leadingSemanticLabel: S.of(context).seed_alert_back, + onLeadingPressed: Navigator.of(context).pop, + ), + Expanded( + child: SingleChildScrollView( + controller: ModalScrollController.of(context), + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 18.0), + child: Observer( + builder: (_) => Column( + children: [ + Padding( + padding: const EdgeInsets.only(bottom: 12.0), + child: Material( + color: Colors.transparent, + child: SelectDeselectAllBar( + title: S.of(context).type, + onSelected: dashboardViewModel.changeAllFilterItems), + ), ), - ), - NewListSections( - sections: { - "": dashboardViewModel.filterItems.map((item) { - if (item is SwapFilterItem) { - final String subtitle; - final Color subtitleColor; - if (dashboardViewModel.tradeFilterStore.displayAllTrades) { - subtitle = S.of(context).manage_providers; - subtitleColor = Theme.of(context).colorScheme.onSurfaceVariant; - } else if (dashboardViewModel.tradeFilterStore.enabledProvidersCount == - 0) { - subtitle = S.of(context).no_providers_selected; - subtitleColor = Color(0xFFFFB84E); - } else { - subtitle = "${item.enabledProviders()} ${S.of(context).providers}"; - subtitleColor = Theme.of(context).colorScheme.primary; + NewListSections( + sections: { + "": dashboardViewModel.filterItems.map((item) { + if (item is SwapFilterItem) { + final String subtitle; + final Color subtitleColor; + if (dashboardViewModel.tradeFilterStore.displayAllTrades) { + subtitle = S.of(context).manage_providers; + subtitleColor = Theme.of(context).colorScheme.onSurfaceVariant; + } else if (dashboardViewModel + .tradeFilterStore.enabledProvidersCount == + 0) { + subtitle = S.of(context).no_providers_selected; + subtitleColor = Color(0xFFFFB84E); + } else { + subtitle = "${item.enabledProviders()} ${S.of(context).providers}"; + subtitleColor = Theme.of(context).colorScheme.primary; + } + + return ListItemCheckbox( + onTap: () { + Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => HistorySwapProvidersPage( + dashboardViewModel: dashboardViewModel))); + }, + keyValue: item.caption, + label: S.of(context).swap, + value: item.value(), + onChanged: (val) { + if ((val && + dashboardViewModel + .tradeFilterStore.enabledProvidersCount == + 0) || + (!val && + dashboardViewModel + .tradeFilterStore.enabledProvidersCount > + 0)) { + dashboardViewModel.tradeFilterStore + .toggleDisplayExchange(ExchangeProviderDescription.all); + } + }, + subtitle: subtitle, + subtitleColor: subtitleColor, + showArrow: true); } return ListItemCheckbox( - onTap: () { - Navigator.of(context).push(CupertinoPageRoute( - builder: (context) => HistorySwapProvidersPage( - dashboardViewModel: dashboardViewModel))); - }, keyValue: item.caption, - label: S.of(context).swap, + label: item.caption, value: item.value(), - onChanged: (val) { - if ((val && - dashboardViewModel - .tradeFilterStore.enabledProvidersCount == - 0) || - (!val && - dashboardViewModel - .tradeFilterStore.enabledProvidersCount > - 0)) { - dashboardViewModel.tradeFilterStore - .toggleDisplayExchange(ExchangeProviderDescription.all); - } - }, - subtitle: subtitle, - subtitleColor: subtitleColor, - showArrow: true); - } - - return ListItemCheckbox( - keyValue: item.caption, - label: item.caption, - value: item.value(), - onChanged: (val) => item.onChanged()); - }).toList() - }, - ), - ], + onChanged: (val) => item.onChanged()); + }).toList() + }, + ), + ], + ), ), ), - ), - )), - SafeArea( - child: Padding( - padding: const EdgeInsets.all(18.0), - child: NewPrimaryButton( - onPressed: () => dashboardViewModel.changeAllFilterItems(true), - text: S.of(context).reset_filters, - color: Theme.of(context).colorScheme.surfaceContainer, - textColor: Theme.of(context).colorScheme.primary), - )) - ], + )), + SafeArea( + child: Padding( + padding: const EdgeInsets.all(18.0), + child: NewPrimaryButton( + onPressed: () => dashboardViewModel.changeAllFilterItems(true), + text: S.of(context).reset_filters, + color: Theme.of(context).colorScheme.surfaceContainer, + textColor: Theme.of(context).colorScheme.primary), + )) + ], + ), ), ); } diff --git a/lib/src/screens/support_chat/support_chat_page.dart b/lib/src/screens/support_chat/support_chat_page.dart index 88079add3..b992b403f 100644 --- a/lib/src/screens/support_chat/support_chat_page.dart +++ b/lib/src/screens/support_chat/support_chat_page.dart @@ -12,37 +12,40 @@ class SupportChatPage extends StatelessWidget { final SecureStorage secureStorage; @override - Widget build(BuildContext context) => Container( - color: Theme.of(context).colorScheme.surface, - child: SafeArea( - child: Padding( - padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), - child: Column( - children: [ - ModalTopBar( - title: S.current.settings_support, - leadingIcon: Icon(Icons.arrow_back_ios_new), - leadingSemanticLabel: S.current.seed_alert_back, - onLeadingPressed: Navigator.of(context).pop), - FutureBuilder( - future: getCookie(), - builder: (BuildContext context, AsyncSnapshot snapshot) { - if (snapshot.hasData) - return Expanded( - child: ChatwootWidget( - secureStorage, - supportUrl: supportViewModel.fetchUrl(authToken: snapshot.data!), - appVersion: supportViewModel.appVersion, - fiatApiMode: supportViewModel.fiatApiMode, - walletType: supportViewModel.walletType, - walletSyncState: supportViewModel.walletSyncState, - builtInTorState: supportViewModel.builtInTorState, - ), - ); - return Container(); - }, - ), - ], + Widget build(BuildContext context) => Material( + color: Colors.transparent, + child: Container( + color: Theme.of(context).colorScheme.surface, + child: SafeArea( + child: Padding( + padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom), + child: Column( + children: [ + ModalTopBar( + title: S.current.settings_support, + leadingIcon: Icon(Icons.arrow_back_ios_new), + leadingSemanticLabel: S.current.seed_alert_back, + onLeadingPressed: Navigator.of(context).pop), + FutureBuilder( + future: getCookie(), + builder: (BuildContext context, AsyncSnapshot snapshot) { + if (snapshot.hasData) + return Expanded( + child: ChatwootWidget( + secureStorage, + supportUrl: supportViewModel.fetchUrl(authToken: snapshot.data!), + appVersion: supportViewModel.appVersion, + fiatApiMode: supportViewModel.fiatApiMode, + walletType: supportViewModel.walletType, + walletSyncState: supportViewModel.walletSyncState, + builtInTorState: supportViewModel.builtInTorState, + ), + ); + return Container(); + }, + ), + ], + ), ), ), ),