@@ -332,22 +332,52 @@ class ResponsiveBreakpointsData {
332332 String toString () =>
333333 'ResponsiveWrapperData(breakpoint: $breakpoint , breakpoints: ${breakpoints .asMap ()}, isMobile: $isMobile , isPhone: $isPhone , isTablet: $isTablet , isDesktop: $isDesktop )' ;
334334
335- bool equals (String ? name) => breakpoint.name == name;
335+ /// Returns if the active breakpoint is [name] .
336+ bool equals (String name) => breakpoint.name == name;
336337
337- /// Is the width larger than or equal to [name] ?
338+ /// Is the [screenWidth] larger than [name] ?
338339 /// Defaults to false if the [name] cannot be found.
339- bool isLargerThan (String ? name) =>
340+ bool largerThan (String name) =>
340341 screenWidth >
341342 (breakpoints.firstWhereOrNull ((element) => element.name == name)? .end ??
342343 double .infinity);
343344
345+ /// Is the [screenWidth] larger than or equal to [name] ?
346+ /// Defaults to false if the [name] cannot be found.
347+ bool largerOrEqualTo (String name) =>
348+ screenWidth >=
349+ (breakpoints.firstWhereOrNull ((element) => element.name == name)? .start ??
350+ double .infinity);
351+
344352 /// Is the [screenWidth] smaller than the [name] ?
345353 /// Defaults to false if the [name] cannot be found.
346- bool isSmallerThan (String ? name) =>
354+ bool smallerThan (String name) =>
347355 screenWidth <
348356 (breakpoints.firstWhereOrNull ((element) => element.name == name)? .start ??
349357 0 );
350358
359+ /// Is the [screenWidth] smaller than or equal to the [name] ?
360+ /// Defaults to false if the [name] cannot be found.
361+ bool smallerOrEqualTo (String name) =>
362+ screenWidth <=
363+ (breakpoints.firstWhereOrNull ((element) => element.name == name)? .end ??
364+ 0 );
365+
366+ /// Is the [screenWidth] smaller than or equal to the [name] ?
367+ /// Defaults to false if the [name] cannot be found.
368+ bool between (String name, String name1) {
369+ return (screenWidth >=
370+ (breakpoints
371+ .firstWhereOrNull ((element) => element.name == name)
372+ ? .start ??
373+ 0 ) &&
374+ screenWidth <=
375+ (breakpoints
376+ .firstWhereOrNull ((element) => element.name == name1)
377+ ? .end ??
378+ 0 ));
379+ }
380+
351381 @override
352382 bool operator == (Object other) =>
353383 identical (this , other) ||
0 commit comments