isSmallerThan method Null safety

bool isSmallerThan(
  1. String? name
)

Is the screenWidth smaller than the name? Defaults to false if the name cannot be found.

Implementation

bool isSmallerThan(String? name) =>
    screenWidth <
    breakpointSegments
        .firstWhere((element) => element.responsiveBreakpoint.name == name,
            orElse: () => ResponsiveBreakpointSegment(
                breakpoint: 0,
                segmentType: ResponsiveBreakpointBehavior.TAG,
                responsiveBreakpoint: ResponsiveBreakpoint.tag(0, name: '')))
        .breakpoint;