getBreakpointEntry function

BreakpointSystemEntry getBreakpointEntry(
  1. BuildContext context

Returns the BreakpointSystemEntry to the user.

Typically the developer will use the getWindowType function. Using this function gives the developer access to the specific breakpoint entry and it's variables.


BreakpointSystemEntry getBreakpointEntry(BuildContext context) {
  double width = MediaQuery.of(context).size.width;
  for (BreakpointSystemEntry entry in breakpointSystem) {
    if (entry.range.start <= width && width < entry.range.end + 1) {
      return entry;
  throw AssertionError('Something unexpected happened');