✨ Check-in basis
This commit is contained in:
parent
039f5b202f
commit
ec2233fbaf
@ -106,5 +106,12 @@
|
|||||||
"reactionNeutral": "Neutral",
|
"reactionNeutral": "Neutral",
|
||||||
"connectionConnected": "Connected",
|
"connectionConnected": "Connected",
|
||||||
"connectionDisconnected": "Disconnected",
|
"connectionDisconnected": "Disconnected",
|
||||||
"connectionReconnecting": "Reconnecting"
|
"connectionReconnecting": "Reconnecting",
|
||||||
|
"checkInNone": "Not checked-in yet",
|
||||||
|
"checkInNoneHint": "Get your fortune tips and daily rewards by checking in.",
|
||||||
|
"checkInResultLevel0": "Wrost Luck",
|
||||||
|
"checkInResultLevel1": "Bad Luck",
|
||||||
|
"checkInResultLevel2": "A Normal Day",
|
||||||
|
"checkInResultLevel3": "Good Luck",
|
||||||
|
"checkInResultLevel4": "Best Luck"
|
||||||
}
|
}
|
||||||
|
@ -22,3 +22,32 @@ abstract class SnActivity with _$SnActivity {
|
|||||||
factory SnActivity.fromJson(Map<String, dynamic> json) =>
|
factory SnActivity.fromJson(Map<String, dynamic> json) =>
|
||||||
_$SnActivityFromJson(json);
|
_$SnActivityFromJson(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class SnCheckInResult with _$SnCheckInResult {
|
||||||
|
const factory SnCheckInResult({
|
||||||
|
required String id,
|
||||||
|
required int level,
|
||||||
|
required List<SnFortuneTip> tips,
|
||||||
|
required int accountId,
|
||||||
|
required SnAccount? account,
|
||||||
|
required DateTime createdAt,
|
||||||
|
required DateTime updatedAt,
|
||||||
|
required DateTime? deletedAt,
|
||||||
|
}) = _SnCheckInResult;
|
||||||
|
|
||||||
|
factory SnCheckInResult.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$SnCheckInResultFromJson(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class SnFortuneTip with _$SnFortuneTip {
|
||||||
|
const factory SnFortuneTip({
|
||||||
|
required bool isPositive,
|
||||||
|
required String title,
|
||||||
|
required String content,
|
||||||
|
}) = _SnFortuneTip;
|
||||||
|
|
||||||
|
factory SnFortuneTip.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$SnFortuneTipFromJson(json);
|
||||||
|
}
|
||||||
|
@ -190,4 +190,327 @@ $SnAccountCopyWith<$Res> get account {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$SnCheckInResult {
|
||||||
|
|
||||||
|
String get id; int get level; List<SnFortuneTip> get tips; int get accountId; SnAccount? get account; DateTime get createdAt; DateTime get updatedAt; DateTime? get deletedAt;
|
||||||
|
/// Create a copy of SnCheckInResult
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnCheckInResultCopyWith<SnCheckInResult> get copyWith => _$SnCheckInResultCopyWithImpl<SnCheckInResult>(this as SnCheckInResult, _$identity);
|
||||||
|
|
||||||
|
/// Serializes this SnCheckInResult to a JSON map.
|
||||||
|
Map<String, dynamic> toJson();
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnCheckInResult&&(identical(other.id, id) || other.id == id)&&(identical(other.level, level) || other.level == level)&&const DeepCollectionEquality().equals(other.tips, tips)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,id,level,const DeepCollectionEquality().hash(tips),accountId,account,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SnCheckInResult(id: $id, level: $level, tips: $tips, accountId: $accountId, account: $account, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $SnCheckInResultCopyWith<$Res> {
|
||||||
|
factory $SnCheckInResultCopyWith(SnCheckInResult value, $Res Function(SnCheckInResult) _then) = _$SnCheckInResultCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
String id, int level, List<SnFortuneTip> tips, int accountId, SnAccount? account, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$SnAccountCopyWith<$Res>? get account;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$SnCheckInResultCopyWithImpl<$Res>
|
||||||
|
implements $SnCheckInResultCopyWith<$Res> {
|
||||||
|
_$SnCheckInResultCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final SnCheckInResult _self;
|
||||||
|
final $Res Function(SnCheckInResult) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SnCheckInResult
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? level = null,Object? tips = null,Object? accountId = null,Object? account = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,tips: null == tips ? _self.tips : tips // ignore: cast_nullable_to_non_nullable
|
||||||
|
as List<SnFortuneTip>,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,account: freezed == account ? _self.account : account // ignore: cast_nullable_to_non_nullable
|
||||||
|
as SnAccount?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||||
|
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||||
|
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
|
as DateTime?,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
/// Create a copy of SnCheckInResult
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnAccountCopyWith<$Res>? get account {
|
||||||
|
if (_self.account == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $SnAccountCopyWith<$Res>(_self.account!, (value) {
|
||||||
|
return _then(_self.copyWith(account: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
@JsonSerializable()
|
||||||
|
|
||||||
|
class _SnCheckInResult implements SnCheckInResult {
|
||||||
|
const _SnCheckInResult({required this.id, required this.level, required final List<SnFortuneTip> tips, required this.accountId, required this.account, required this.createdAt, required this.updatedAt, required this.deletedAt}): _tips = tips;
|
||||||
|
factory _SnCheckInResult.fromJson(Map<String, dynamic> json) => _$SnCheckInResultFromJson(json);
|
||||||
|
|
||||||
|
@override final String id;
|
||||||
|
@override final int level;
|
||||||
|
final List<SnFortuneTip> _tips;
|
||||||
|
@override List<SnFortuneTip> get tips {
|
||||||
|
if (_tips is EqualUnmodifiableListView) return _tips;
|
||||||
|
// ignore: implicit_dynamic_type
|
||||||
|
return EqualUnmodifiableListView(_tips);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override final int accountId;
|
||||||
|
@override final SnAccount? account;
|
||||||
|
@override final DateTime createdAt;
|
||||||
|
@override final DateTime updatedAt;
|
||||||
|
@override final DateTime? deletedAt;
|
||||||
|
|
||||||
|
/// Create a copy of SnCheckInResult
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$SnCheckInResultCopyWith<_SnCheckInResult> get copyWith => __$SnCheckInResultCopyWithImpl<_SnCheckInResult>(this, _$identity);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return _$SnCheckInResultToJson(this, );
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnCheckInResult&&(identical(other.id, id) || other.id == id)&&(identical(other.level, level) || other.level == level)&&const DeepCollectionEquality().equals(other._tips, _tips)&&(identical(other.accountId, accountId) || other.accountId == accountId)&&(identical(other.account, account) || other.account == account)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.deletedAt, deletedAt) || other.deletedAt == deletedAt));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,id,level,const DeepCollectionEquality().hash(_tips),accountId,account,createdAt,updatedAt,deletedAt);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SnCheckInResult(id: $id, level: $level, tips: $tips, accountId: $accountId, account: $account, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$SnCheckInResultCopyWith<$Res> implements $SnCheckInResultCopyWith<$Res> {
|
||||||
|
factory _$SnCheckInResultCopyWith(_SnCheckInResult value, $Res Function(_SnCheckInResult) _then) = __$SnCheckInResultCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
String id, int level, List<SnFortuneTip> tips, int accountId, SnAccount? account, DateTime createdAt, DateTime updatedAt, DateTime? deletedAt
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@override $SnAccountCopyWith<$Res>? get account;
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$SnCheckInResultCopyWithImpl<$Res>
|
||||||
|
implements _$SnCheckInResultCopyWith<$Res> {
|
||||||
|
__$SnCheckInResultCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _SnCheckInResult _self;
|
||||||
|
final $Res Function(_SnCheckInResult) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SnCheckInResult
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? level = null,Object? tips = null,Object? accountId = null,Object? account = freezed,Object? createdAt = null,Object? updatedAt = null,Object? deletedAt = freezed,}) {
|
||||||
|
return _then(_SnCheckInResult(
|
||||||
|
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,tips: null == tips ? _self._tips : tips // ignore: cast_nullable_to_non_nullable
|
||||||
|
as List<SnFortuneTip>,accountId: null == accountId ? _self.accountId : accountId // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,account: freezed == account ? _self.account : account // ignore: cast_nullable_to_non_nullable
|
||||||
|
as SnAccount?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
|
||||||
|
as DateTime,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
|
||||||
|
as DateTime,deletedAt: freezed == deletedAt ? _self.deletedAt : deletedAt // ignore: cast_nullable_to_non_nullable
|
||||||
|
as DateTime?,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a copy of SnCheckInResult
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnAccountCopyWith<$Res>? get account {
|
||||||
|
if (_self.account == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $SnAccountCopyWith<$Res>(_self.account!, (value) {
|
||||||
|
return _then(_self.copyWith(account: value));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
mixin _$SnFortuneTip {
|
||||||
|
|
||||||
|
bool get isPositive; String get title; String get content;
|
||||||
|
/// Create a copy of SnFortuneTip
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
$SnFortuneTipCopyWith<SnFortuneTip> get copyWith => _$SnFortuneTipCopyWithImpl<SnFortuneTip>(this as SnFortuneTip, _$identity);
|
||||||
|
|
||||||
|
/// Serializes this SnFortuneTip to a JSON map.
|
||||||
|
Map<String, dynamic> toJson();
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is SnFortuneTip&&(identical(other.isPositive, isPositive) || other.isPositive == isPositive)&&(identical(other.title, title) || other.title == title)&&(identical(other.content, content) || other.content == content));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,isPositive,title,content);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SnFortuneTip(isPositive: $isPositive, title: $title, content: $content)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class $SnFortuneTipCopyWith<$Res> {
|
||||||
|
factory $SnFortuneTipCopyWith(SnFortuneTip value, $Res Function(SnFortuneTip) _then) = _$SnFortuneTipCopyWithImpl;
|
||||||
|
@useResult
|
||||||
|
$Res call({
|
||||||
|
bool isPositive, String title, String content
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class _$SnFortuneTipCopyWithImpl<$Res>
|
||||||
|
implements $SnFortuneTipCopyWith<$Res> {
|
||||||
|
_$SnFortuneTipCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final SnFortuneTip _self;
|
||||||
|
final $Res Function(SnFortuneTip) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SnFortuneTip
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@pragma('vm:prefer-inline') @override $Res call({Object? isPositive = null,Object? title = null,Object? content = null,}) {
|
||||||
|
return _then(_self.copyWith(
|
||||||
|
isPositive: null == isPositive ? _self.isPositive : isPositive // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
@JsonSerializable()
|
||||||
|
|
||||||
|
class _SnFortuneTip implements SnFortuneTip {
|
||||||
|
const _SnFortuneTip({required this.isPositive, required this.title, required this.content});
|
||||||
|
factory _SnFortuneTip.fromJson(Map<String, dynamic> json) => _$SnFortuneTipFromJson(json);
|
||||||
|
|
||||||
|
@override final bool isPositive;
|
||||||
|
@override final String title;
|
||||||
|
@override final String content;
|
||||||
|
|
||||||
|
/// Create a copy of SnFortuneTip
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@pragma('vm:prefer-inline')
|
||||||
|
_$SnFortuneTipCopyWith<_SnFortuneTip> get copyWith => __$SnFortuneTipCopyWithImpl<_SnFortuneTip>(this, _$identity);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return _$SnFortuneTipToJson(this, );
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SnFortuneTip&&(identical(other.isPositive, isPositive) || other.isPositive == isPositive)&&(identical(other.title, title) || other.title == title)&&(identical(other.content, content) || other.content == content));
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||||
|
@override
|
||||||
|
int get hashCode => Object.hash(runtimeType,isPositive,title,content);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return 'SnFortuneTip(isPositive: $isPositive, title: $title, content: $content)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @nodoc
|
||||||
|
abstract mixin class _$SnFortuneTipCopyWith<$Res> implements $SnFortuneTipCopyWith<$Res> {
|
||||||
|
factory _$SnFortuneTipCopyWith(_SnFortuneTip value, $Res Function(_SnFortuneTip) _then) = __$SnFortuneTipCopyWithImpl;
|
||||||
|
@override @useResult
|
||||||
|
$Res call({
|
||||||
|
bool isPositive, String title, String content
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// @nodoc
|
||||||
|
class __$SnFortuneTipCopyWithImpl<$Res>
|
||||||
|
implements _$SnFortuneTipCopyWith<$Res> {
|
||||||
|
__$SnFortuneTipCopyWithImpl(this._self, this._then);
|
||||||
|
|
||||||
|
final _SnFortuneTip _self;
|
||||||
|
final $Res Function(_SnFortuneTip) _then;
|
||||||
|
|
||||||
|
/// Create a copy of SnFortuneTip
|
||||||
|
/// with the given fields replaced by the non-null parameter values.
|
||||||
|
@override @pragma('vm:prefer-inline') $Res call({Object? isPositive = null,Object? title = null,Object? content = null,}) {
|
||||||
|
return _then(_SnFortuneTip(
|
||||||
|
isPositive: null == isPositive ? _self.isPositive : isPositive // ignore: cast_nullable_to_non_nullable
|
||||||
|
as bool,title: null == title ? _self.title : title // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,content: null == content ? _self.content : content // ignore: cast_nullable_to_non_nullable
|
||||||
|
as String,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// dart format on
|
// dart format on
|
||||||
|
@ -32,3 +32,50 @@ Map<String, dynamic> _$SnActivityToJson(_SnActivity instance) =>
|
|||||||
'updated_at': instance.updatedAt.toIso8601String(),
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
'deleted_at': instance.deletedAt,
|
'deleted_at': instance.deletedAt,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_SnCheckInResult _$SnCheckInResultFromJson(Map<String, dynamic> json) =>
|
||||||
|
_SnCheckInResult(
|
||||||
|
id: json['id'] as String,
|
||||||
|
level: (json['level'] as num).toInt(),
|
||||||
|
tips:
|
||||||
|
(json['tips'] as List<dynamic>)
|
||||||
|
.map((e) => SnFortuneTip.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList(),
|
||||||
|
accountId: (json['account_id'] as num).toInt(),
|
||||||
|
account:
|
||||||
|
json['account'] == null
|
||||||
|
? null
|
||||||
|
: SnAccount.fromJson(json['account'] as Map<String, dynamic>),
|
||||||
|
createdAt: DateTime.parse(json['created_at'] as String),
|
||||||
|
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||||
|
deletedAt:
|
||||||
|
json['deleted_at'] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json['deleted_at'] as String),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$SnCheckInResultToJson(_SnCheckInResult instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'id': instance.id,
|
||||||
|
'level': instance.level,
|
||||||
|
'tips': instance.tips.map((e) => e.toJson()).toList(),
|
||||||
|
'account_id': instance.accountId,
|
||||||
|
'account': instance.account?.toJson(),
|
||||||
|
'created_at': instance.createdAt.toIso8601String(),
|
||||||
|
'updated_at': instance.updatedAt.toIso8601String(),
|
||||||
|
'deleted_at': instance.deletedAt?.toIso8601String(),
|
||||||
|
};
|
||||||
|
|
||||||
|
_SnFortuneTip _$SnFortuneTipFromJson(Map<String, dynamic> json) =>
|
||||||
|
_SnFortuneTip(
|
||||||
|
isPositive: json['is_positive'] as bool,
|
||||||
|
title: json['title'] as String,
|
||||||
|
content: json['content'] as String,
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$SnFortuneTipToJson(_SnFortuneTip instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'is_positive': instance.isPositive,
|
||||||
|
'title': instance.title,
|
||||||
|
'content': instance.content,
|
||||||
|
};
|
||||||
|
@ -9,33 +9,50 @@
|
|||||||
// coverage:ignore-file
|
// coverage:ignore-file
|
||||||
|
|
||||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||||
import 'package:auto_route/auto_route.dart' as _i17;
|
import 'package:auto_route/auto_route.dart' as _i18;
|
||||||
import 'package:flutter/material.dart' as _i18;
|
import 'package:flutter/material.dart' as _i19;
|
||||||
import 'package:island/models/post.dart' as _i19;
|
import 'package:island/models/post.dart' as _i20;
|
||||||
import 'package:island/screens/account.dart' as _i2;
|
import 'package:island/screens/account.dart' as _i3;
|
||||||
import 'package:island/screens/account/me.dart' as _i11;
|
import 'package:island/screens/account/me.dart' as _i12;
|
||||||
import 'package:island/screens/account/me/publishers.dart' as _i7;
|
import 'package:island/screens/account/me/event_calendar.dart' as _i1;
|
||||||
import 'package:island/screens/account/me/update.dart' as _i16;
|
import 'package:island/screens/account/me/publishers.dart' as _i8;
|
||||||
import 'package:island/screens/account/profile.dart' as _i1;
|
import 'package:island/screens/account/me/update.dart' as _i17;
|
||||||
import 'package:island/screens/auth/create_account.dart' as _i6;
|
import 'package:island/screens/account/profile.dart' as _i2;
|
||||||
import 'package:island/screens/auth/login.dart' as _i10;
|
import 'package:island/screens/auth/create_account.dart' as _i7;
|
||||||
import 'package:island/screens/auth/tabs.dart' as _i15;
|
import 'package:island/screens/auth/login.dart' as _i11;
|
||||||
import 'package:island/screens/chat/chat.dart' as _i4;
|
import 'package:island/screens/auth/tabs.dart' as _i16;
|
||||||
import 'package:island/screens/chat/room.dart' as _i5;
|
import 'package:island/screens/chat/chat.dart' as _i5;
|
||||||
import 'package:island/screens/chat/room_detail.dart' as _i3;
|
import 'package:island/screens/chat/room.dart' as _i6;
|
||||||
import 'package:island/screens/explore.dart' as _i9;
|
import 'package:island/screens/chat/room_detail.dart' as _i4;
|
||||||
import 'package:island/screens/posts/compose.dart' as _i12;
|
import 'package:island/screens/explore.dart' as _i10;
|
||||||
import 'package:island/screens/posts/detail.dart' as _i13;
|
import 'package:island/screens/posts/compose.dart' as _i13;
|
||||||
import 'package:island/screens/realm/detail.dart' as _i14;
|
import 'package:island/screens/posts/detail.dart' as _i14;
|
||||||
import 'package:island/screens/realm/realms.dart' as _i8;
|
import 'package:island/screens/realm/detail.dart' as _i15;
|
||||||
|
import 'package:island/screens/realm/realms.dart' as _i9;
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i1.AccountProfileScreen]
|
/// [_i1.AccountEventCalendar]
|
||||||
class AccountProfileRoute extends _i17.PageRouteInfo<AccountProfileRouteArgs> {
|
class AccountEventCalendar extends _i18.PageRouteInfo<void> {
|
||||||
|
const AccountEventCalendar({List<_i18.PageRouteInfo>? children})
|
||||||
|
: super(AccountEventCalendar.name, initialChildren: children);
|
||||||
|
|
||||||
|
static const String name = 'AccountEventCalendar';
|
||||||
|
|
||||||
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
|
name,
|
||||||
|
builder: (data) {
|
||||||
|
return const _i1.AccountEventCalendar();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// generated route for
|
||||||
|
/// [_i2.AccountProfileScreen]
|
||||||
|
class AccountProfileRoute extends _i18.PageRouteInfo<AccountProfileRouteArgs> {
|
||||||
AccountProfileRoute({
|
AccountProfileRoute({
|
||||||
_i18.Key? key,
|
_i19.Key? key,
|
||||||
required String name,
|
required String name,
|
||||||
List<_i17.PageRouteInfo>? children,
|
List<_i18.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
AccountProfileRoute.name,
|
AccountProfileRoute.name,
|
||||||
args: AccountProfileRouteArgs(key: key, name: name),
|
args: AccountProfileRouteArgs(key: key, name: name),
|
||||||
@ -45,7 +62,7 @@ class AccountProfileRoute extends _i17.PageRouteInfo<AccountProfileRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'AccountProfileRoute';
|
static const String name = 'AccountProfileRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final pathParams = data.inheritedPathParams;
|
final pathParams = data.inheritedPathParams;
|
||||||
@ -53,7 +70,7 @@ class AccountProfileRoute extends _i17.PageRouteInfo<AccountProfileRouteArgs> {
|
|||||||
orElse:
|
orElse:
|
||||||
() => AccountProfileRouteArgs(name: pathParams.getString('name')),
|
() => AccountProfileRouteArgs(name: pathParams.getString('name')),
|
||||||
);
|
);
|
||||||
return _i1.AccountProfileScreen(key: args.key, name: args.name);
|
return _i2.AccountProfileScreen(key: args.key, name: args.name);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -61,7 +78,7 @@ class AccountProfileRoute extends _i17.PageRouteInfo<AccountProfileRouteArgs> {
|
|||||||
class AccountProfileRouteArgs {
|
class AccountProfileRouteArgs {
|
||||||
const AccountProfileRouteArgs({this.key, required this.name});
|
const AccountProfileRouteArgs({this.key, required this.name});
|
||||||
|
|
||||||
final _i18.Key? key;
|
final _i19.Key? key;
|
||||||
|
|
||||||
final String name;
|
final String name;
|
||||||
|
|
||||||
@ -72,28 +89,28 @@ class AccountProfileRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i2.AccountScreen]
|
/// [_i3.AccountScreen]
|
||||||
class AccountRoute extends _i17.PageRouteInfo<void> {
|
class AccountRoute extends _i18.PageRouteInfo<void> {
|
||||||
const AccountRoute({List<_i17.PageRouteInfo>? children})
|
const AccountRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(AccountRoute.name, initialChildren: children);
|
: super(AccountRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'AccountRoute';
|
static const String name = 'AccountRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i2.AccountScreen();
|
return const _i3.AccountScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i3.ChatDetailScreen]
|
/// [_i4.ChatDetailScreen]
|
||||||
class ChatDetailRoute extends _i17.PageRouteInfo<ChatDetailRouteArgs> {
|
class ChatDetailRoute extends _i18.PageRouteInfo<ChatDetailRouteArgs> {
|
||||||
ChatDetailRoute({
|
ChatDetailRoute({
|
||||||
_i18.Key? key,
|
_i19.Key? key,
|
||||||
required int id,
|
required int id,
|
||||||
List<_i17.PageRouteInfo>? children,
|
List<_i18.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
ChatDetailRoute.name,
|
ChatDetailRoute.name,
|
||||||
args: ChatDetailRouteArgs(key: key, id: id),
|
args: ChatDetailRouteArgs(key: key, id: id),
|
||||||
@ -103,14 +120,14 @@ class ChatDetailRoute extends _i17.PageRouteInfo<ChatDetailRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'ChatDetailRoute';
|
static const String name = 'ChatDetailRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final pathParams = data.inheritedPathParams;
|
final pathParams = data.inheritedPathParams;
|
||||||
final args = data.argsAs<ChatDetailRouteArgs>(
|
final args = data.argsAs<ChatDetailRouteArgs>(
|
||||||
orElse: () => ChatDetailRouteArgs(id: pathParams.getInt('id')),
|
orElse: () => ChatDetailRouteArgs(id: pathParams.getInt('id')),
|
||||||
);
|
);
|
||||||
return _i3.ChatDetailScreen(key: args.key, id: args.id);
|
return _i4.ChatDetailScreen(key: args.key, id: args.id);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -118,7 +135,7 @@ class ChatDetailRoute extends _i17.PageRouteInfo<ChatDetailRouteArgs> {
|
|||||||
class ChatDetailRouteArgs {
|
class ChatDetailRouteArgs {
|
||||||
const ChatDetailRouteArgs({this.key, required this.id});
|
const ChatDetailRouteArgs({this.key, required this.id});
|
||||||
|
|
||||||
final _i18.Key? key;
|
final _i19.Key? key;
|
||||||
|
|
||||||
final int id;
|
final int id;
|
||||||
|
|
||||||
@ -129,28 +146,28 @@ class ChatDetailRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i4.ChatListScreen]
|
/// [_i5.ChatListScreen]
|
||||||
class ChatListRoute extends _i17.PageRouteInfo<void> {
|
class ChatListRoute extends _i18.PageRouteInfo<void> {
|
||||||
const ChatListRoute({List<_i17.PageRouteInfo>? children})
|
const ChatListRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(ChatListRoute.name, initialChildren: children);
|
: super(ChatListRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'ChatListRoute';
|
static const String name = 'ChatListRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i4.ChatListScreen();
|
return const _i5.ChatListScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i5.ChatRoomScreen]
|
/// [_i6.ChatRoomScreen]
|
||||||
class ChatRoomRoute extends _i17.PageRouteInfo<ChatRoomRouteArgs> {
|
class ChatRoomRoute extends _i18.PageRouteInfo<ChatRoomRouteArgs> {
|
||||||
ChatRoomRoute({
|
ChatRoomRoute({
|
||||||
_i18.Key? key,
|
_i19.Key? key,
|
||||||
required int id,
|
required int id,
|
||||||
List<_i17.PageRouteInfo>? children,
|
List<_i18.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
ChatRoomRoute.name,
|
ChatRoomRoute.name,
|
||||||
args: ChatRoomRouteArgs(key: key, id: id),
|
args: ChatRoomRouteArgs(key: key, id: id),
|
||||||
@ -160,14 +177,14 @@ class ChatRoomRoute extends _i17.PageRouteInfo<ChatRoomRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'ChatRoomRoute';
|
static const String name = 'ChatRoomRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final pathParams = data.inheritedPathParams;
|
final pathParams = data.inheritedPathParams;
|
||||||
final args = data.argsAs<ChatRoomRouteArgs>(
|
final args = data.argsAs<ChatRoomRouteArgs>(
|
||||||
orElse: () => ChatRoomRouteArgs(id: pathParams.getInt('id')),
|
orElse: () => ChatRoomRouteArgs(id: pathParams.getInt('id')),
|
||||||
);
|
);
|
||||||
return _i5.ChatRoomScreen(key: args.key, id: args.id);
|
return _i6.ChatRoomScreen(key: args.key, id: args.id);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -175,7 +192,7 @@ class ChatRoomRoute extends _i17.PageRouteInfo<ChatRoomRouteArgs> {
|
|||||||
class ChatRoomRouteArgs {
|
class ChatRoomRouteArgs {
|
||||||
const ChatRoomRouteArgs({this.key, required this.id});
|
const ChatRoomRouteArgs({this.key, required this.id});
|
||||||
|
|
||||||
final _i18.Key? key;
|
final _i19.Key? key;
|
||||||
|
|
||||||
final int id;
|
final int id;
|
||||||
|
|
||||||
@ -186,25 +203,25 @@ class ChatRoomRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i6.CreateAccountScreen]
|
/// [_i7.CreateAccountScreen]
|
||||||
class CreateAccountRoute extends _i17.PageRouteInfo<void> {
|
class CreateAccountRoute extends _i18.PageRouteInfo<void> {
|
||||||
const CreateAccountRoute({List<_i17.PageRouteInfo>? children})
|
const CreateAccountRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(CreateAccountRoute.name, initialChildren: children);
|
: super(CreateAccountRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'CreateAccountRoute';
|
static const String name = 'CreateAccountRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i6.CreateAccountScreen();
|
return const _i7.CreateAccountScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i4.EditChatScreen]
|
/// [_i5.EditChatScreen]
|
||||||
class EditChatRoute extends _i17.PageRouteInfo<EditChatRouteArgs> {
|
class EditChatRoute extends _i18.PageRouteInfo<EditChatRouteArgs> {
|
||||||
EditChatRoute({_i18.Key? key, int? id, List<_i17.PageRouteInfo>? children})
|
EditChatRoute({_i19.Key? key, int? id, List<_i18.PageRouteInfo>? children})
|
||||||
: super(
|
: super(
|
||||||
EditChatRoute.name,
|
EditChatRoute.name,
|
||||||
args: EditChatRouteArgs(key: key, id: id),
|
args: EditChatRouteArgs(key: key, id: id),
|
||||||
@ -214,14 +231,14 @@ class EditChatRoute extends _i17.PageRouteInfo<EditChatRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'EditChatRoute';
|
static const String name = 'EditChatRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final pathParams = data.inheritedPathParams;
|
final pathParams = data.inheritedPathParams;
|
||||||
final args = data.argsAs<EditChatRouteArgs>(
|
final args = data.argsAs<EditChatRouteArgs>(
|
||||||
orElse: () => EditChatRouteArgs(id: pathParams.optInt('id')),
|
orElse: () => EditChatRouteArgs(id: pathParams.optInt('id')),
|
||||||
);
|
);
|
||||||
return _i4.EditChatScreen(key: args.key, id: args.id);
|
return _i5.EditChatScreen(key: args.key, id: args.id);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -229,7 +246,7 @@ class EditChatRoute extends _i17.PageRouteInfo<EditChatRouteArgs> {
|
|||||||
class EditChatRouteArgs {
|
class EditChatRouteArgs {
|
||||||
const EditChatRouteArgs({this.key, this.id});
|
const EditChatRouteArgs({this.key, this.id});
|
||||||
|
|
||||||
final _i18.Key? key;
|
final _i19.Key? key;
|
||||||
|
|
||||||
final int? id;
|
final int? id;
|
||||||
|
|
||||||
@ -240,12 +257,12 @@ class EditChatRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i7.EditPublisherScreen]
|
/// [_i8.EditPublisherScreen]
|
||||||
class EditPublisherRoute extends _i17.PageRouteInfo<EditPublisherRouteArgs> {
|
class EditPublisherRoute extends _i18.PageRouteInfo<EditPublisherRouteArgs> {
|
||||||
EditPublisherRoute({
|
EditPublisherRoute({
|
||||||
_i18.Key? key,
|
_i19.Key? key,
|
||||||
String? name,
|
String? name,
|
||||||
List<_i17.PageRouteInfo>? children,
|
List<_i18.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
EditPublisherRoute.name,
|
EditPublisherRoute.name,
|
||||||
args: EditPublisherRouteArgs(key: key, name: name),
|
args: EditPublisherRouteArgs(key: key, name: name),
|
||||||
@ -255,14 +272,14 @@ class EditPublisherRoute extends _i17.PageRouteInfo<EditPublisherRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'EditPublisherRoute';
|
static const String name = 'EditPublisherRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final pathParams = data.inheritedPathParams;
|
final pathParams = data.inheritedPathParams;
|
||||||
final args = data.argsAs<EditPublisherRouteArgs>(
|
final args = data.argsAs<EditPublisherRouteArgs>(
|
||||||
orElse: () => EditPublisherRouteArgs(name: pathParams.optString('id')),
|
orElse: () => EditPublisherRouteArgs(name: pathParams.optString('id')),
|
||||||
);
|
);
|
||||||
return _i7.EditPublisherScreen(key: args.key, name: args.name);
|
return _i8.EditPublisherScreen(key: args.key, name: args.name);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -270,7 +287,7 @@ class EditPublisherRoute extends _i17.PageRouteInfo<EditPublisherRouteArgs> {
|
|||||||
class EditPublisherRouteArgs {
|
class EditPublisherRouteArgs {
|
||||||
const EditPublisherRouteArgs({this.key, this.name});
|
const EditPublisherRouteArgs({this.key, this.name});
|
||||||
|
|
||||||
final _i18.Key? key;
|
final _i19.Key? key;
|
||||||
|
|
||||||
final String? name;
|
final String? name;
|
||||||
|
|
||||||
@ -281,12 +298,12 @@ class EditPublisherRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i8.EditRealmScreen]
|
/// [_i9.EditRealmScreen]
|
||||||
class EditRealmRoute extends _i17.PageRouteInfo<EditRealmRouteArgs> {
|
class EditRealmRoute extends _i18.PageRouteInfo<EditRealmRouteArgs> {
|
||||||
EditRealmRoute({
|
EditRealmRoute({
|
||||||
_i18.Key? key,
|
_i19.Key? key,
|
||||||
String? slug,
|
String? slug,
|
||||||
List<_i17.PageRouteInfo>? children,
|
List<_i18.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
EditRealmRoute.name,
|
EditRealmRoute.name,
|
||||||
args: EditRealmRouteArgs(key: key, slug: slug),
|
args: EditRealmRouteArgs(key: key, slug: slug),
|
||||||
@ -296,14 +313,14 @@ class EditRealmRoute extends _i17.PageRouteInfo<EditRealmRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'EditRealmRoute';
|
static const String name = 'EditRealmRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final pathParams = data.inheritedPathParams;
|
final pathParams = data.inheritedPathParams;
|
||||||
final args = data.argsAs<EditRealmRouteArgs>(
|
final args = data.argsAs<EditRealmRouteArgs>(
|
||||||
orElse: () => EditRealmRouteArgs(slug: pathParams.optString('slug')),
|
orElse: () => EditRealmRouteArgs(slug: pathParams.optString('slug')),
|
||||||
);
|
);
|
||||||
return _i8.EditRealmScreen(key: args.key, slug: args.slug);
|
return _i9.EditRealmScreen(key: args.key, slug: args.slug);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -311,7 +328,7 @@ class EditRealmRoute extends _i17.PageRouteInfo<EditRealmRouteArgs> {
|
|||||||
class EditRealmRouteArgs {
|
class EditRealmRouteArgs {
|
||||||
const EditRealmRouteArgs({this.key, this.slug});
|
const EditRealmRouteArgs({this.key, this.slug});
|
||||||
|
|
||||||
final _i18.Key? key;
|
final _i19.Key? key;
|
||||||
|
|
||||||
final String? slug;
|
final String? slug;
|
||||||
|
|
||||||
@ -322,124 +339,124 @@ class EditRealmRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i9.ExploreScreen]
|
/// [_i10.ExploreScreen]
|
||||||
class ExploreRoute extends _i17.PageRouteInfo<void> {
|
class ExploreRoute extends _i18.PageRouteInfo<void> {
|
||||||
const ExploreRoute({List<_i17.PageRouteInfo>? children})
|
const ExploreRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(ExploreRoute.name, initialChildren: children);
|
: super(ExploreRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'ExploreRoute';
|
static const String name = 'ExploreRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i9.ExploreScreen();
|
return const _i10.ExploreScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i10.LoginScreen]
|
/// [_i11.LoginScreen]
|
||||||
class LoginRoute extends _i17.PageRouteInfo<void> {
|
class LoginRoute extends _i18.PageRouteInfo<void> {
|
||||||
const LoginRoute({List<_i17.PageRouteInfo>? children})
|
const LoginRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(LoginRoute.name, initialChildren: children);
|
: super(LoginRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'LoginRoute';
|
static const String name = 'LoginRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i10.LoginScreen();
|
return const _i11.LoginScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i7.ManagedPublisherScreen]
|
/// [_i8.ManagedPublisherScreen]
|
||||||
class ManagedPublisherRoute extends _i17.PageRouteInfo<void> {
|
class ManagedPublisherRoute extends _i18.PageRouteInfo<void> {
|
||||||
const ManagedPublisherRoute({List<_i17.PageRouteInfo>? children})
|
const ManagedPublisherRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(ManagedPublisherRoute.name, initialChildren: children);
|
: super(ManagedPublisherRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'ManagedPublisherRoute';
|
static const String name = 'ManagedPublisherRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i7.ManagedPublisherScreen();
|
return const _i8.ManagedPublisherScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i11.MyselfProfileScreen]
|
/// [_i12.MyselfProfileScreen]
|
||||||
class MyselfProfileRoute extends _i17.PageRouteInfo<void> {
|
class MyselfProfileRoute extends _i18.PageRouteInfo<void> {
|
||||||
const MyselfProfileRoute({List<_i17.PageRouteInfo>? children})
|
const MyselfProfileRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(MyselfProfileRoute.name, initialChildren: children);
|
: super(MyselfProfileRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'MyselfProfileRoute';
|
static const String name = 'MyselfProfileRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i11.MyselfProfileScreen();
|
return const _i12.MyselfProfileScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i4.NewChatScreen]
|
/// [_i5.NewChatScreen]
|
||||||
class NewChatRoute extends _i17.PageRouteInfo<void> {
|
class NewChatRoute extends _i18.PageRouteInfo<void> {
|
||||||
const NewChatRoute({List<_i17.PageRouteInfo>? children})
|
const NewChatRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(NewChatRoute.name, initialChildren: children);
|
: super(NewChatRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'NewChatRoute';
|
static const String name = 'NewChatRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i4.NewChatScreen();
|
return const _i5.NewChatScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i7.NewPublisherScreen]
|
/// [_i8.NewPublisherScreen]
|
||||||
class NewPublisherRoute extends _i17.PageRouteInfo<void> {
|
class NewPublisherRoute extends _i18.PageRouteInfo<void> {
|
||||||
const NewPublisherRoute({List<_i17.PageRouteInfo>? children})
|
const NewPublisherRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(NewPublisherRoute.name, initialChildren: children);
|
: super(NewPublisherRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'NewPublisherRoute';
|
static const String name = 'NewPublisherRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i7.NewPublisherScreen();
|
return const _i8.NewPublisherScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i8.NewRealmScreen]
|
/// [_i9.NewRealmScreen]
|
||||||
class NewRealmRoute extends _i17.PageRouteInfo<void> {
|
class NewRealmRoute extends _i18.PageRouteInfo<void> {
|
||||||
const NewRealmRoute({List<_i17.PageRouteInfo>? children})
|
const NewRealmRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(NewRealmRoute.name, initialChildren: children);
|
: super(NewRealmRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'NewRealmRoute';
|
static const String name = 'NewRealmRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i8.NewRealmScreen();
|
return const _i9.NewRealmScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i12.PostComposeScreen]
|
/// [_i13.PostComposeScreen]
|
||||||
class PostComposeRoute extends _i17.PageRouteInfo<PostComposeRouteArgs> {
|
class PostComposeRoute extends _i18.PageRouteInfo<PostComposeRouteArgs> {
|
||||||
PostComposeRoute({
|
PostComposeRoute({
|
||||||
_i18.Key? key,
|
_i19.Key? key,
|
||||||
_i19.SnPost? originalPost,
|
_i20.SnPost? originalPost,
|
||||||
List<_i17.PageRouteInfo>? children,
|
List<_i18.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
PostComposeRoute.name,
|
PostComposeRoute.name,
|
||||||
args: PostComposeRouteArgs(key: key, originalPost: originalPost),
|
args: PostComposeRouteArgs(key: key, originalPost: originalPost),
|
||||||
@ -448,13 +465,13 @@ class PostComposeRoute extends _i17.PageRouteInfo<PostComposeRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'PostComposeRoute';
|
static const String name = 'PostComposeRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final args = data.argsAs<PostComposeRouteArgs>(
|
final args = data.argsAs<PostComposeRouteArgs>(
|
||||||
orElse: () => const PostComposeRouteArgs(),
|
orElse: () => const PostComposeRouteArgs(),
|
||||||
);
|
);
|
||||||
return _i12.PostComposeScreen(
|
return _i13.PostComposeScreen(
|
||||||
key: args.key,
|
key: args.key,
|
||||||
originalPost: args.originalPost,
|
originalPost: args.originalPost,
|
||||||
);
|
);
|
||||||
@ -465,9 +482,9 @@ class PostComposeRoute extends _i17.PageRouteInfo<PostComposeRouteArgs> {
|
|||||||
class PostComposeRouteArgs {
|
class PostComposeRouteArgs {
|
||||||
const PostComposeRouteArgs({this.key, this.originalPost});
|
const PostComposeRouteArgs({this.key, this.originalPost});
|
||||||
|
|
||||||
final _i18.Key? key;
|
final _i19.Key? key;
|
||||||
|
|
||||||
final _i19.SnPost? originalPost;
|
final _i20.SnPost? originalPost;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
@ -476,12 +493,12 @@ class PostComposeRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i13.PostDetailScreen]
|
/// [_i14.PostDetailScreen]
|
||||||
class PostDetailRoute extends _i17.PageRouteInfo<PostDetailRouteArgs> {
|
class PostDetailRoute extends _i18.PageRouteInfo<PostDetailRouteArgs> {
|
||||||
PostDetailRoute({
|
PostDetailRoute({
|
||||||
_i18.Key? key,
|
_i19.Key? key,
|
||||||
required int id,
|
required int id,
|
||||||
List<_i17.PageRouteInfo>? children,
|
List<_i18.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
PostDetailRoute.name,
|
PostDetailRoute.name,
|
||||||
args: PostDetailRouteArgs(key: key, id: id),
|
args: PostDetailRouteArgs(key: key, id: id),
|
||||||
@ -491,14 +508,14 @@ class PostDetailRoute extends _i17.PageRouteInfo<PostDetailRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'PostDetailRoute';
|
static const String name = 'PostDetailRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final pathParams = data.inheritedPathParams;
|
final pathParams = data.inheritedPathParams;
|
||||||
final args = data.argsAs<PostDetailRouteArgs>(
|
final args = data.argsAs<PostDetailRouteArgs>(
|
||||||
orElse: () => PostDetailRouteArgs(id: pathParams.getInt('id')),
|
orElse: () => PostDetailRouteArgs(id: pathParams.getInt('id')),
|
||||||
);
|
);
|
||||||
return _i13.PostDetailScreen(key: args.key, id: args.id);
|
return _i14.PostDetailScreen(key: args.key, id: args.id);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -506,7 +523,7 @@ class PostDetailRoute extends _i17.PageRouteInfo<PostDetailRouteArgs> {
|
|||||||
class PostDetailRouteArgs {
|
class PostDetailRouteArgs {
|
||||||
const PostDetailRouteArgs({this.key, required this.id});
|
const PostDetailRouteArgs({this.key, required this.id});
|
||||||
|
|
||||||
final _i18.Key? key;
|
final _i19.Key? key;
|
||||||
|
|
||||||
final int id;
|
final int id;
|
||||||
|
|
||||||
@ -517,12 +534,12 @@ class PostDetailRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i12.PostEditScreen]
|
/// [_i13.PostEditScreen]
|
||||||
class PostEditRoute extends _i17.PageRouteInfo<PostEditRouteArgs> {
|
class PostEditRoute extends _i18.PageRouteInfo<PostEditRouteArgs> {
|
||||||
PostEditRoute({
|
PostEditRoute({
|
||||||
_i18.Key? key,
|
_i19.Key? key,
|
||||||
required int id,
|
required int id,
|
||||||
List<_i17.PageRouteInfo>? children,
|
List<_i18.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
PostEditRoute.name,
|
PostEditRoute.name,
|
||||||
args: PostEditRouteArgs(key: key, id: id),
|
args: PostEditRouteArgs(key: key, id: id),
|
||||||
@ -532,14 +549,14 @@ class PostEditRoute extends _i17.PageRouteInfo<PostEditRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'PostEditRoute';
|
static const String name = 'PostEditRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final pathParams = data.inheritedPathParams;
|
final pathParams = data.inheritedPathParams;
|
||||||
final args = data.argsAs<PostEditRouteArgs>(
|
final args = data.argsAs<PostEditRouteArgs>(
|
||||||
orElse: () => PostEditRouteArgs(id: pathParams.getInt('id')),
|
orElse: () => PostEditRouteArgs(id: pathParams.getInt('id')),
|
||||||
);
|
);
|
||||||
return _i12.PostEditScreen(key: args.key, id: args.id);
|
return _i13.PostEditScreen(key: args.key, id: args.id);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -547,7 +564,7 @@ class PostEditRoute extends _i17.PageRouteInfo<PostEditRouteArgs> {
|
|||||||
class PostEditRouteArgs {
|
class PostEditRouteArgs {
|
||||||
const PostEditRouteArgs({this.key, required this.id});
|
const PostEditRouteArgs({this.key, required this.id});
|
||||||
|
|
||||||
final _i18.Key? key;
|
final _i19.Key? key;
|
||||||
|
|
||||||
final int id;
|
final int id;
|
||||||
|
|
||||||
@ -558,12 +575,12 @@ class PostEditRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i14.RealmDetailScreen]
|
/// [_i15.RealmDetailScreen]
|
||||||
class RealmDetailRoute extends _i17.PageRouteInfo<RealmDetailRouteArgs> {
|
class RealmDetailRoute extends _i18.PageRouteInfo<RealmDetailRouteArgs> {
|
||||||
RealmDetailRoute({
|
RealmDetailRoute({
|
||||||
_i18.Key? key,
|
_i19.Key? key,
|
||||||
required String slug,
|
required String slug,
|
||||||
List<_i17.PageRouteInfo>? children,
|
List<_i18.PageRouteInfo>? children,
|
||||||
}) : super(
|
}) : super(
|
||||||
RealmDetailRoute.name,
|
RealmDetailRoute.name,
|
||||||
args: RealmDetailRouteArgs(key: key, slug: slug),
|
args: RealmDetailRouteArgs(key: key, slug: slug),
|
||||||
@ -573,14 +590,14 @@ class RealmDetailRoute extends _i17.PageRouteInfo<RealmDetailRouteArgs> {
|
|||||||
|
|
||||||
static const String name = 'RealmDetailRoute';
|
static const String name = 'RealmDetailRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
final pathParams = data.inheritedPathParams;
|
final pathParams = data.inheritedPathParams;
|
||||||
final args = data.argsAs<RealmDetailRouteArgs>(
|
final args = data.argsAs<RealmDetailRouteArgs>(
|
||||||
orElse: () => RealmDetailRouteArgs(slug: pathParams.getString('slug')),
|
orElse: () => RealmDetailRouteArgs(slug: pathParams.getString('slug')),
|
||||||
);
|
);
|
||||||
return _i14.RealmDetailScreen(key: args.key, slug: args.slug);
|
return _i15.RealmDetailScreen(key: args.key, slug: args.slug);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -588,7 +605,7 @@ class RealmDetailRoute extends _i17.PageRouteInfo<RealmDetailRouteArgs> {
|
|||||||
class RealmDetailRouteArgs {
|
class RealmDetailRouteArgs {
|
||||||
const RealmDetailRouteArgs({this.key, required this.slug});
|
const RealmDetailRouteArgs({this.key, required this.slug});
|
||||||
|
|
||||||
final _i18.Key? key;
|
final _i19.Key? key;
|
||||||
|
|
||||||
final String slug;
|
final String slug;
|
||||||
|
|
||||||
@ -599,49 +616,49 @@ class RealmDetailRouteArgs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i8.RealmListScreen]
|
/// [_i9.RealmListScreen]
|
||||||
class RealmListRoute extends _i17.PageRouteInfo<void> {
|
class RealmListRoute extends _i18.PageRouteInfo<void> {
|
||||||
const RealmListRoute({List<_i17.PageRouteInfo>? children})
|
const RealmListRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(RealmListRoute.name, initialChildren: children);
|
: super(RealmListRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'RealmListRoute';
|
static const String name = 'RealmListRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i8.RealmListScreen();
|
return const _i9.RealmListScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i15.TabsScreen]
|
/// [_i16.TabsScreen]
|
||||||
class TabsRoute extends _i17.PageRouteInfo<void> {
|
class TabsRoute extends _i18.PageRouteInfo<void> {
|
||||||
const TabsRoute({List<_i17.PageRouteInfo>? children})
|
const TabsRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(TabsRoute.name, initialChildren: children);
|
: super(TabsRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'TabsRoute';
|
static const String name = 'TabsRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i15.TabsScreen();
|
return const _i16.TabsScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// generated route for
|
/// generated route for
|
||||||
/// [_i16.UpdateProfileScreen]
|
/// [_i17.UpdateProfileScreen]
|
||||||
class UpdateProfileRoute extends _i17.PageRouteInfo<void> {
|
class UpdateProfileRoute extends _i18.PageRouteInfo<void> {
|
||||||
const UpdateProfileRoute({List<_i17.PageRouteInfo>? children})
|
const UpdateProfileRoute({List<_i18.PageRouteInfo>? children})
|
||||||
: super(UpdateProfileRoute.name, initialChildren: children);
|
: super(UpdateProfileRoute.name, initialChildren: children);
|
||||||
|
|
||||||
static const String name = 'UpdateProfileRoute';
|
static const String name = 'UpdateProfileRoute';
|
||||||
|
|
||||||
static _i17.PageInfo page = _i17.PageInfo(
|
static _i18.PageInfo page = _i18.PageInfo(
|
||||||
name,
|
name,
|
||||||
builder: (data) {
|
builder: (data) {
|
||||||
return const _i16.UpdateProfileScreen();
|
return const _i17.UpdateProfileScreen();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
13
lib/screens/account/me/event_calendar.dart
Normal file
13
lib/screens/account/me/event_calendar.dart
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import 'package:auto_route/auto_route.dart';
|
||||||
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
|
||||||
|
@RoutePage()
|
||||||
|
class AccountEventCalendar extends HookConsumerWidget {
|
||||||
|
const AccountEventCalendar({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
return const Placeholder();
|
||||||
|
}
|
||||||
|
}
|
@ -3,9 +3,11 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:island/models/activity.dart';
|
import 'package:island/models/activity.dart';
|
||||||
|
import 'package:island/pods/userinfo.dart';
|
||||||
import 'package:island/route.gr.dart';
|
import 'package:island/route.gr.dart';
|
||||||
import 'package:island/widgets/app_scaffold.dart';
|
import 'package:island/widgets/app_scaffold.dart';
|
||||||
import 'package:island/models/post.dart';
|
import 'package:island/models/post.dart';
|
||||||
|
import 'package:island/widgets/check_in.dart';
|
||||||
import 'package:island/widgets/post/post_item.dart';
|
import 'package:island/widgets/post/post_item.dart';
|
||||||
import 'package:material_symbols_icons/symbols.dart';
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
import 'package:very_good_infinite_list/very_good_infinite_list.dart';
|
import 'package:very_good_infinite_list/very_good_infinite_list.dart';
|
||||||
@ -18,6 +20,7 @@ class ExploreScreen extends ConsumerWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
final user = ref.watch(userInfoProvider);
|
||||||
final posts = ref.watch(activityListProvider);
|
final posts = ref.watch(activityListProvider);
|
||||||
final postsNotifier = ref.watch(activityListProvider.notifier);
|
final postsNotifier = ref.watch(activityListProvider.notifier);
|
||||||
|
|
||||||
@ -39,6 +42,7 @@ class ExploreScreen extends ConsumerWidget {
|
|||||||
onRefresh: () => postsNotifier.refresh(),
|
onRefresh: () => postsNotifier.refresh(),
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
|
if (user.hasValue) SliverToBoxAdapter(child: CheckInWidget()),
|
||||||
SliverInfiniteList(
|
SliverInfiniteList(
|
||||||
itemCount: posts.length,
|
itemCount: posts.length,
|
||||||
isLoading: postsNotifier.isLoading,
|
isLoading: postsNotifier.isLoading,
|
||||||
|
@ -1,11 +1,138 @@
|
|||||||
import 'package:flutter/widgets.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
|
import 'package:island/models/activity.dart';
|
||||||
|
import 'package:island/pods/network.dart';
|
||||||
|
import 'package:material_symbols_icons/symbols.dart';
|
||||||
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
|
import 'package:styled_widget/styled_widget.dart';
|
||||||
|
|
||||||
|
part 'check_in.g.dart';
|
||||||
|
|
||||||
|
@riverpod
|
||||||
|
Future<SnCheckInResult?> checkInResultToday(Ref ref) async {
|
||||||
|
final client = ref.watch(apiClientProvider);
|
||||||
|
try {
|
||||||
|
final resp = await client.get('/accounts/me/check-in');
|
||||||
|
return SnCheckInResult.fromJson(resp.data);
|
||||||
|
} catch (err) {
|
||||||
|
if (err is DioException) {
|
||||||
|
if (err.response?.statusCode == 404) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class CheckInWidget extends HookConsumerWidget {
|
class CheckInWidget extends HookConsumerWidget {
|
||||||
const CheckInWidget({super.key});
|
const CheckInWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
return const Placeholder();
|
final todayResult = ref.watch(checkInResultTodayProvider);
|
||||||
|
|
||||||
|
return Card(
|
||||||
|
margin: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 8),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
spacing: 16,
|
||||||
|
children: [
|
||||||
|
ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
child: Container(
|
||||||
|
color: Theme.of(context).colorScheme.secondaryContainer,
|
||||||
|
width: 56,
|
||||||
|
height: 56,
|
||||||
|
child:
|
||||||
|
Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Text(DateFormat('EEE').format(DateTime.now()))
|
||||||
|
.fontSize(16)
|
||||||
|
.bold()
|
||||||
|
.textColor(
|
||||||
|
Theme.of(context).colorScheme.onSecondaryContainer,
|
||||||
|
),
|
||||||
|
Text(DateFormat('MM/dd').format(DateTime.now()))
|
||||||
|
.fontSize(12)
|
||||||
|
.textColor(
|
||||||
|
Theme.of(context).colorScheme.onSecondaryContainer,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
).center(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: AnimatedSwitcher(
|
||||||
|
duration: const Duration(milliseconds: 300),
|
||||||
|
child: todayResult.when(
|
||||||
|
data: (result) {
|
||||||
|
if (result == null) return _CheckInNoneWidget();
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'checkInResultLevel${result.level}',
|
||||||
|
).tr().fontSize(15).bold(),
|
||||||
|
Text(
|
||||||
|
result.tips
|
||||||
|
.map(
|
||||||
|
(e) => '${e.isPositive ? '宜' : '忌'} ${e.title}',
|
||||||
|
)
|
||||||
|
.join(' · '),
|
||||||
|
).tr().fontSize(11),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
loading: () => _CheckInNoneWidget(),
|
||||||
|
error:
|
||||||
|
(err, stack) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('error').tr().fontSize(15).bold(),
|
||||||
|
Text(err.toString()).fontSize(11),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
IconButton.outlined(
|
||||||
|
onPressed: () {},
|
||||||
|
icon: AnimatedSwitcher(
|
||||||
|
duration: const Duration(milliseconds: 300),
|
||||||
|
child: todayResult.when(
|
||||||
|
data:
|
||||||
|
(result) => Icon(
|
||||||
|
result == null
|
||||||
|
? Symbols.local_fire_department
|
||||||
|
: Symbols.event,
|
||||||
|
key: ValueKey(result != null),
|
||||||
|
),
|
||||||
|
loading: () => const Icon(Symbols.refresh),
|
||||||
|
error: (_, __) => const Icon(Symbols.error),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
).padding(horizontal: 16, vertical: 12),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CheckInNoneWidget extends StatelessWidget {
|
||||||
|
const _CheckInNoneWidget();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
|
children: [
|
||||||
|
Text('checkInNone').tr().fontSize(15).bold(),
|
||||||
|
Text('checkInNoneHint').tr().fontSize(11),
|
||||||
|
],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
30
lib/widgets/check_in.g.dart
Normal file
30
lib/widgets/check_in.g.dart
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'check_in.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// RiverpodGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
String _$checkInResultTodayHash() =>
|
||||||
|
r'0e2af6c1f419b2ee74ee38b6fb5d8071498e75c8';
|
||||||
|
|
||||||
|
/// See also [checkInResultToday].
|
||||||
|
@ProviderFor(checkInResultToday)
|
||||||
|
final checkInResultTodayProvider =
|
||||||
|
AutoDisposeFutureProvider<SnCheckInResult?>.internal(
|
||||||
|
checkInResultToday,
|
||||||
|
name: r'checkInResultTodayProvider',
|
||||||
|
debugGetCreateSourceHash:
|
||||||
|
const bool.fromEnvironment('dart.vm.product')
|
||||||
|
? null
|
||||||
|
: _$checkInResultTodayHash,
|
||||||
|
dependencies: null,
|
||||||
|
allTransitiveDependencies: null,
|
||||||
|
);
|
||||||
|
|
||||||
|
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||||
|
// ignore: unused_element
|
||||||
|
typedef CheckInResultTodayRef = AutoDisposeFutureProviderRef<SnCheckInResult?>;
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
Loading…
x
Reference in New Issue
Block a user