Move to Flutter 3.47, use the improvements that come with this (#64)
Reviewed-on: #64
This commit is contained in:
parent
01b13b4764
commit
077044ec19
157 changed files with 1366 additions and 1457 deletions
|
|
@ -1,22 +1,23 @@
|
|||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:nexus/models/content/content.dart";
|
||||
import "package:nexus/models/ms_duration.dart";
|
||||
|
||||
part "set_state.freezed.dart";
|
||||
part "set_state.g.dart";
|
||||
|
||||
@freezed
|
||||
abstract class SetStateRequest with _$SetStateRequest {
|
||||
const factory SetStateRequest({
|
||||
required String roomId,
|
||||
required String type,
|
||||
required String stateKey,
|
||||
required Content content,
|
||||
@Freezed(toJson: false, fromJson: false)
|
||||
@JsonSerializable()
|
||||
class const SetStateRequest({
|
||||
required final String roomId,
|
||||
required final String type,
|
||||
required final String stateKey,
|
||||
required final Content content,
|
||||
|
||||
@JsonKey(name: "delay_ms", includeIfNull: false)
|
||||
@MSDuration()
|
||||
@Default(null)
|
||||
Duration? delay,
|
||||
}) = _SetStateRequest;
|
||||
@JsonKey(name: "delay_ms", includeIfNull: false)
|
||||
@MSDuration()
|
||||
final Duration? delay,
|
||||
}) with _$SetStateRequest {
|
||||
Map<String, Object?> toJson() => _$SetStateRequestToJson(this);
|
||||
|
||||
factory SetStateRequest.fromJson(Map<String, Object?> json) =>
|
||||
_$SetStateRequestFromJson(json);
|
||||
|
|
|
|||
Loading…
Reference in a new issue