fluttercandies / flutter_smart_dialog

An elegant Flutter Dialog solution | 一种更优雅的 Flutter Dialog 解决方案
MIT License
1.13k stars 142 forks source link

LateInitializationError: Field 'contextCustom' has not been initialized. EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK #217

Closed TK9404 closed 1 month ago

TK9404 commented 1 month ago

Version Information

Describe the bug/requirement

EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK in integration test on attempt to open smart dialogue

Problem demo

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════ The following LateError was thrown running a test: LateInitializationError: Field 'contextCustom' has not been initialized. When the exception was thrown, this was the stack:

0 DialogProxy.contextCustom (package:flutter_smart_dialog/src/helper/dialog_proxy.dart)

1 DialogProxy.timelyContextCustom (package:flutter_smart_dialog/src/helper/dialog_proxy.dart:66:50)

2 CustomDialog._pushDialog. (package:flutter_smart_dialog/src/custom/custom_dialog.dart:266:25)

3 ViewUtils.addSafeUse (package:flutter_smart_dialog/src/kit/view_utils.dart:10:15)

4 CustomDialog._pushDialog (package:flutter_smart_dialog/src/custom/custom_dialog.dart:264:15)

5 CustomDialog._handleMustOperate (package:flutter_smart_dialog/src/custom/custom_dialog.dart:246:7)

6 CustomDialog.show (package:flutter_smart_dialog/src/custom/custom_dialog.dart:53:24)

7 DialogProxy.show (package:flutter_smart_dialog/src/helper/dialog_proxy.dart:139:19)

xdd666t commented 1 month ago
dependencies:
  flutter_smart_dialog: ^4.9.8+2