所以这是我现在的课程
onPressed: () {
if (_formKey.currentState.validate()) {
Future<String> check = logIn();
if (check != null) {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
HomePage()));
}
}
是否可以将其更改为具有如下所示的吸气剂
@freezed
abstract class Union with _$Union {
const factory Union.initial() = Initial;
const factory Union.loadInProgress() = LoadInProgress;
const factory Union.loadSuccess(List<Some> some) = LoadSuccess;
}