Skip to content

"Bad state: No element" when the app is launch when the screen is off #56

@rockerhieu

Description

@rockerhieu

Stacktrace

When the exception was thrown, this was the stack: 
#0      ListIterable.firstWhere (dart:_internal/iterable.dart:107:5)
#1      _ResponsiveWrapperState.getActiveBreakpointSegment (package:responsive_framework/responsive_wrapper.dart:537:10)
#2      _ResponsiveWrapperState.getScreenWidth (package:responsive_framework/responsive_wrapper.dart:233:31)
#3      _ResponsiveWrapperState.setDimensions (package:responsive_framework/responsive_wrapper.dart:499:19)
#4      _ResponsiveWrapperState.initState.<anonymous closure> (package:responsive_framework/responsive_wrapper.dart:581:7)

Reproduce steps

  • Turn the screen off
  • Launch the app from the command line
  • crash

In real life, this crash may also happen when launching the app asynchronously, i.e clicking on notification to launch app, but before the app is launched, turn off the screen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions