getActiveBreakpointSegment method
Set activeBreakpointSegment.
Active breakpoint segment is the first breakpoint segment
smaller or equal to the windowWidth
.
Implementation
ResponsiveBreakpointSegment getActiveBreakpointSegment(double windowWidth) {
ResponsiveBreakpointSegment activeBreakpointSegment = breakpointSegments
.reversed
.firstWhere((element) => windowWidth >= element.breakpoint);
return activeBreakpointSegment;
}