Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.1.1 [#unreleased]

- Fixed [#659](https://github.com/SimformSolutionsPvtLtd/showcaseview/issues/659) - Fix null-check crash in `ShowcaseController._initRootWidget` when the `Showcase` is unmounted in the same frame it mounts. Fixed by @[apurva-simform](https://github.com/apurva-simform)

## 5.1.0

- Fixed [#650](https://github.com/SimformSolutionsPvtLtd/showcaseview/issues/650) - Fix null-check crash in ShowcaseService.getController during didUpdateWidget. Fixed by @[vatsaltanna-simformsolutions](https://github.com/vatsaltanna-simformsolutions)
Expand Down
3 changes: 3 additions & 0 deletions lib/src/showcase/showcase_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ class ShowcaseController {
///
/// Must be called after the widget is mounted to ensure proper measurements.
void _initRootWidget() {
// register()'s post-frame callback can fire after the Showcase was
// unmounted in the same frame, and State.context throws on a dead State.
if (!_mounted) return;
final rootWidget = _context.findRootAncestorStateOfType<State<Overlay>>();
rootRenderObject = rootWidget?.context.findRenderObject() as RenderBox?;
rootWidgetSize = rootWidget == null
Expand Down
Loading