ControllerGroup class
Annotation to create a query for a group of controllers.
You can define a query to retrieve the controller at static const query = _$(class name)ControllerGroupQuery()
.
Multiple ChangeNotifier
s can be grouped together in katana_listenables
and used as a controller group.
If autoDisposeWhenUnreferenced is set to true
, ControllerGroup will be automatically disposed of when it is no longer referenced by any widget.
コントローラーグループ用のクエリを作成するためのアノテーション。
static const query = _$(クラス名)ControllerGroupQuery()
にコントローラーを取得するためのクエリを定義できます。
katana_listenables
で複数のChangeNotifier
をまとめた上でコントローラーグループとして利用することが可能です。
autoDisposeWhenUnreferencedをtrue
にした場合、ControllerGroupがどのウィジェットにも参照されなくなったときに自動的に破棄します。
@listenables
@controllerGroup
class PageControllerGroup with _$PageControllerGroup, ChangeNotifier {
factory ${className}ControllerGroup({
TextEditingController? textEditingController,
FocusNode? focusNode,
}) = _PageControllerGroup;
PageControllerGroup._();
static const query = _$PageControllerGroupQuery();
}
Constructors
- ControllerGroup({bool autoDisposeWhenUnreferenced = true})
-
Annotation to create a query for a group of controllers.
const
Properties
- autoDisposeWhenUnreferenced → bool
-
Returns
true
if ControllerGroup should be automatically destroyed when it is no longer referenced by any widget.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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