UseDark class
A reactive utility to determine if the current theme is dark.
It provides a useDark
composable to get a boolean Ref
and
a UseDark.builder
to rebuild a widget when the theme changes.
Constructors
- UseDark.new()
-
Factory constructor to return the singleton instance.
factory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
builder(
BuildContext ctx, Widget builder(bool isDark)) → Widget - A builder that provides the current dark mode status.