Skip to content

1.1.0

Choose a tag to compare

@smith8h smith8h released this 17 Nov 22:15
· 35 commits to main since this release

1.1.0

Added

BoolExtensions

  • toInt returns 1 if this boolean is true, and 0 if this boolean is false.
  • toOnOff returns 'on' if this boolean is true, and 'off' if this boolean is false.
  • toYesNo returns 'yes' if this boolean is true, and 'no' if this boolean is false.
  • toEnabledDisabled returns 'enabled' if this boolean is true, and 'disabled' if this boolean is false.
  • whenTrue executes [action] if this boolean is true.
  • whenFalse executes [action] if this boolean is false.

BuildContextExtensions

  • theme gets the current ThemeData.
  • textTheme gets the current TextTheme.
  • colorScheme gets the current ColorScheme.
  • isRTL gets if the current directionality is right-to-left.
  • isLTR gets if the current directionality is left-to-right.
  • topPadding returns the top padding of the app bar.
  • bottomPadding returns the bottom padding of the navigation bar.
  • devicePixelRatio gets the device pixel ratio.
  • isTablet gets if the device is tablet-sized (shortestSide ≥ 600).
  • pop pops the current route off the navigator stack.
  • push pushes a new page with MaterialPageRoute.
  • pushNamed pushes a new page with MaterialPageRoute and the given name.
  • brightness gets the current brightness independent of the theme.
  • isHighContrast gets if device accessibility high contrast is enabled.
  • isScreenSmall gets if width < 360px (useful for responsive).
  • widgetSize gets the size of the widget tied to this context.
  • widgetPosition gets the global position of the widget.

Full Changelog: 1.0.1...1.1.0