fix: possible context null check issue in exchange trade (#2253)

Serhii committed May 7, 2025 at 17:22 UTC cab47923884111f59076643c3feb2e245fd8318d
1 file changed +2 -4
lib/src/screens/exchange_trade/exchange_trade_page.dart
+2 -4
@@ -307,9 +307,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
307
308 if (state is TransactionCommitted) {
309 WidgetsBinding.instance.addPostFrameCallback((_) async {
310 - if (!context.mounted) {
311 - return;
312 - }
310 + if (!mounted) return;
311
312 await showModalBottomSheet<void>(
313 context: context,
@@ -323,7 +321,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
321 actionButtonKey: ValueKey('send_page_sent_dialog_ok_button_key'),
322 actionButton: () {
323 Navigator.of(bottomSheetContext).pop();
326 - if (context.mounted) {
324 + if (mounted) {
325 Navigator.of(context).pushNamedAndRemoveUntil(
326 Routes.dashboard,
327 (route) => false,