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,24 @@
|
|||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
import "package:nexus/models/content/create.dart";
|
||||
import "package:nexus/models/join_rule.dart";
|
||||
|
||||
part "room_summary.freezed.dart";
|
||||
part "room_summary.g.dart";
|
||||
|
||||
@freezed
|
||||
abstract class RoomSummary with _$RoomSummary {
|
||||
const factory RoomSummary({
|
||||
required String roomId,
|
||||
@JsonKey(name: "num_joined_members") required int joinedMembers,
|
||||
JoinRule? joinRule,
|
||||
String? name,
|
||||
Uri? avatarUrl,
|
||||
String? canonicalAlias,
|
||||
String? topic,
|
||||
String? roomVersion,
|
||||
@JsonKey(unknownEnumValue: RoomType.room) RoomType? roomType,
|
||||
}) = _RoomSummary;
|
||||
@Freezed(toJson: false, fromJson: false)
|
||||
@JsonSerializable()
|
||||
class const RoomSummary({
|
||||
required final String roomId,
|
||||
@JsonKey(name: "num_joined_members") required final int joinedMembers,
|
||||
final JoinRule? joinRule,
|
||||
final String? name,
|
||||
final Uri? avatarUrl,
|
||||
final String? canonicalAlias,
|
||||
final String? topic,
|
||||
final String? roomVersion,
|
||||
@JsonKey(unknownEnumValue: RoomType.room) final RoomType? roomType,
|
||||
}) with _$RoomSummary {
|
||||
Map<String, Object?> toJson() => _$RoomSummaryToJson(this);
|
||||
|
||||
factory RoomSummary.fromJson(Map<String, Object?> json) =>
|
||||
_$RoomSummaryFromJson(json);
|
||||
|
|
|
|||
Loading…
Reference in a new issue