MyBootstrapTask class
首帧提交后再跑的 blocking 初始化项。
旧 MyService 列表仍在 runApp 前注册,语义不变。
首页数据层应 await MyApp.bootstrapReady,不要对未就绪依赖直接 Get.find。
Properties
- debugLabel → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- severity → MyBootstrapSeverity
-
final
Methods
-
execute(
) → Future< void> - 门闩与测试调用。
-
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
-
putAsync<
T extends Object> (Future< T> builder(), {MyBootstrapSeverity severity = MyBootstrapSeverity.degraded, String? debugLabel, bool permanent = false, String? tag}) → MyBootstrapTask -
带类型地把异步服务登记进 GetX(
permanent/tag原样交给 GetX)。 -
run<
T> (Future< T> body(), {MyBootstrapSeverity severity = MyBootstrapSeverity.degraded, String? debugLabel}) → MyBootstrapTask -
任意会完成的工作。返回类型由闭包推断,不会预先钉成
void。