2023-05-28 19:11:34 +02:00
|
|
|
part of '../expert_settings.dart';
|
|
|
|
|
|
|
|
@genCopyWith
|
|
|
|
@toString
|
|
|
|
class _State {
|
|
|
|
const _State({
|
2024-08-05 19:22:46 +02:00
|
|
|
required this.isNewHttpEngine,
|
2023-05-28 19:11:34 +02:00
|
|
|
this.lastSuccessful,
|
|
|
|
});
|
|
|
|
|
2024-08-05 19:22:46 +02:00
|
|
|
factory _State.init({
|
|
|
|
required bool isNewHttpEngine,
|
|
|
|
}) {
|
|
|
|
return _State(
|
|
|
|
isNewHttpEngine: isNewHttpEngine,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-05-28 19:11:34 +02:00
|
|
|
@override
|
|
|
|
String toString() => _$toString();
|
|
|
|
|
2024-08-05 19:22:46 +02:00
|
|
|
final bool isNewHttpEngine;
|
|
|
|
|
2023-05-28 19:11:34 +02:00
|
|
|
final _Event? lastSuccessful;
|
|
|
|
}
|
|
|
|
|
2024-08-05 19:22:46 +02:00
|
|
|
abstract class _Event {}
|
|
|
|
|
|
|
|
@toString
|
|
|
|
class _Init implements _Event {
|
|
|
|
const _Init();
|
|
|
|
|
|
|
|
@override
|
|
|
|
String toString() => _$toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
@toString
|
|
|
|
class _ClearCacheDatabase implements _Event {
|
|
|
|
const _ClearCacheDatabase();
|
|
|
|
|
|
|
|
@override
|
|
|
|
String toString() => _$toString();
|
2023-05-28 19:11:34 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@toString
|
2024-08-05 19:22:46 +02:00
|
|
|
class _SetNewHttpEngine implements _Event {
|
|
|
|
const _SetNewHttpEngine(this.value);
|
2023-05-28 19:11:34 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
String toString() => _$toString();
|
2024-08-05 19:22:46 +02:00
|
|
|
|
|
|
|
final bool value;
|
2023-05-28 19:11:34 +02:00
|
|
|
}
|