LifecycleExtData class abstract

寄存于lifecycle的数据 基类

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
isDestroyed bool
判断当前是否是已经销毁状态
no setter
isEmpty bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

get<T extends Object>({Object? key}) → T?
根据key获取
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put<T extends Object>({Object? key, required T data, LifecycleExtDataOnDestroy<T>? onDestroy, bool callOnDestroy = true}) → T?
放入新值 如果之前存在返回之前的值并且将新的data放入
putIfAbsent<T extends Object>({Object? key, required T ifAbsent(), LifecycleExtDataOnDestroy<T>? onDestroy}) → T
根据Type + key获取,如果不存在则创建信息 如果已经存在则只返回之前的值
remove<T extends Object>({Object? key, bool callOnDestroy = true}) → T?
手动移除指定的key
replace<T extends Object>({Object? key, required T data, bool callOnDestroy = true}) → T?
替换为新数据 返回结构为旧数据如果不存在旧数据则返回null 如果旧数据不存在 则不执行任何操作
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited