UtilityContextExtension extension

Utility extensions for common BuildContext actions.

on

Properties

isDarkMode → bool

Available on BuildContext, provided by the UtilityContextExtension extension

True when the active theme is dark.
no setter
isRtl → bool

Available on BuildContext, provided by the UtilityContextExtension extension

True when the ambient text direction is right-to-left.
no setter
locale → Locale

Available on BuildContext, provided by the UtilityContextExtension extension

The current Locale.
no setter

Methods

copyToClipboard(String text) → Future<void>

Available on BuildContext, provided by the UtilityContextExtension extension

Copies the given text to the clipboard.
unfocus() → void

Available on BuildContext, provided by the UtilityContextExtension extension

Removes focus from the current widget (useful for hiding the keyboard).