context.t() (Localizations) cannot be called during initState() — inherited widgets are not yet mounted. When download fails instantly (e.g. no network), setState with context.t() inside _startDownload fired synchronously within initState, causing: dependOnInheritedWidgetOfExactType called before initState() completed Fix: add _downloadStarted guard flag; call _startDownload() from didChangeDependencies() instead of initState(), where context is fully ready. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app | ||
| core | ||
| features | ||
| shared/widgets | ||
| main.dart | ||