SDK Affected
AppKit
Describe the bug
|
// If we aren't open, then we can't and shouldn't close |
|
_close(); |
|
if (_context != null) { |
|
final canPop = Navigator.of(_context!, rootNavigator: true).canPop(); |
|
if (canPop) { |
|
Navigator.of(_context!, rootNavigator: true).pop(); |
|
} |
|
} |
The closeModal method calls navigation popping without checking if the modal has opened.
To Reproduce
// Select and connect a target wallet directly without opening the modal.
_appKitModal.selectWallet(targetWallet);
await _appKitModal.connectSelectedWallet();
Expected behavior
The navigation operation should not be called if the modal is not open.
SDK Affected
AppKit
Describe the bug
reown_flutter/packages/reown_appkit/lib/modal/appkit_modal_impl.dart
Lines 1404 to 1411 in ac096cb
The
closeModalmethod calls navigation popping without checking if the modal has opened.To Reproduce
Expected behavior
The navigation operation should not be called if the modal is not open.