anusii / anusii/solidpod

SOLID POD and ABOUT: BuildContext issues and Child Instantiation Issues

Open
#96 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
10
Forks
7
Avg merge
1d 3h
Merged PRs (30d)
6

Description

Description

As demonstrated in the DeadlyBushTucker app the showAbout Dialog using SolidLogin wrapper has issues..

The code is at https://github.com/gjwgit/deadly-bush-tucker. The main branch shows the missing build context if I choose CONTINUE on the login screen. If I login on the login screen then the about works - the build context is not lost.

The original error I was seeing:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: This BuildContext is no longer valid.
The showDialog function context parameter is a BuildContext that is no longer valid.
This can commonly occur when the showDialog function is called after awaiting a Future. In this situation the BuildContext might refer to a widget that has already been disposed during the await. Consider using a parent context instead.
#0      _debugIsActive (package:flutter/src/material/dialog.dart:1491:5)
#1      showDialog (package:flutter/src/material/dialog.dart:1412:10)
#2      showAboutDialog (package:flutter/src/material/about.dart:190:3)
#3      InnerPod.build.<anonymous closure> (package:innerpod/main.dart:97:17)
<asynchronous suspension>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the CONTINUE path in the DeadlyBushTucker app and inspect the InnerPod.build closure reported at main.dart:97. Compare it with the login path, then trace the SolidLogin wrapper and the showAboutDialog call. Done means the About dialog opens after continuing without a lost or invalid BuildContext.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.