✨ Check in streak
This commit is contained in:
parent
f6939d7c23
commit
0241c5f804
@ -772,5 +772,10 @@
|
|||||||
"postViewInGlobalDescription": "Do not view the post in the specific realm.",
|
"postViewInGlobalDescription": "Do not view the post in the specific realm.",
|
||||||
"postDraftSaved": "The draft has been saved.",
|
"postDraftSaved": "The draft has been saved.",
|
||||||
"postDraftBox": "Draft Box",
|
"postDraftBox": "Draft Box",
|
||||||
"postShuffle": "Read Randomly"
|
"postShuffle": "Read Randomly",
|
||||||
|
"checkInStreak": {
|
||||||
|
"zero": "No streak",
|
||||||
|
"one": "{} day streak",
|
||||||
|
"other": "{} days streak"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -770,5 +770,10 @@
|
|||||||
"postViewInGlobalDescription": "不查看特定领域的帖子。",
|
"postViewInGlobalDescription": "不查看特定领域的帖子。",
|
||||||
"postDraftSaved": "已保存为草稿。",
|
"postDraftSaved": "已保存为草稿。",
|
||||||
"postDraftBox": "草稿箱",
|
"postDraftBox": "草稿箱",
|
||||||
"postShuffle": "随便看看"
|
"postShuffle": "随便看看",
|
||||||
|
"checkInStreak": {
|
||||||
|
"zero": "无连击",
|
||||||
|
"one": "连续签到 {} 天",
|
||||||
|
"other": "连续签到 {} 天"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -770,5 +770,10 @@
|
|||||||
"postViewInGlobalDescription": "不查看特定領域的帖子。",
|
"postViewInGlobalDescription": "不查看特定領域的帖子。",
|
||||||
"postDraftSaved": "已保存為草稿。",
|
"postDraftSaved": "已保存為草稿。",
|
||||||
"postDraftBox": "草稿箱",
|
"postDraftBox": "草稿箱",
|
||||||
"postShuffle": "隨便看看"
|
"postShuffle": "隨便看看",
|
||||||
|
"checkInStreak": {
|
||||||
|
"zero": "無連擊",
|
||||||
|
"one": "連續簽到 {} 天",
|
||||||
|
"other": "連續簽到 {} 天"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -770,5 +770,10 @@
|
|||||||
"postViewInGlobalDescription": "不查看特定領域的帖子。",
|
"postViewInGlobalDescription": "不查看特定領域的帖子。",
|
||||||
"postDraftSaved": "已保存為草稿。",
|
"postDraftSaved": "已保存為草稿。",
|
||||||
"postDraftBox": "草稿箱",
|
"postDraftBox": "草稿箱",
|
||||||
"postShuffle": "隨便看看"
|
"postShuffle": "隨便看看",
|
||||||
|
"checkInStreak": {
|
||||||
|
"zero": "無連擊",
|
||||||
|
"one": "連續簽到 {} 天",
|
||||||
|
"other": "連續簽到 {} 天"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,6 @@ class $SnLocalChatChannelTable extends SnLocalChatChannel
|
|||||||
late final GeneratedColumn<String> alias = GeneratedColumn<String>(
|
late final GeneratedColumn<String> alias = GeneratedColumn<String>(
|
||||||
'alias', aliasedName, false,
|
'alias', aliasedName, false,
|
||||||
type: DriftSqlType.string, requiredDuringInsert: true);
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
||||||
static const VerificationMeta _contentMeta =
|
|
||||||
const VerificationMeta('content');
|
|
||||||
@override
|
@override
|
||||||
late final GeneratedColumnWithTypeConverter<SnChannel, String> content =
|
late final GeneratedColumnWithTypeConverter<SnChannel, String> content =
|
||||||
GeneratedColumn<String>('content', aliasedName, false,
|
GeneratedColumn<String>('content', aliasedName, false,
|
||||||
@ -60,7 +58,6 @@ class $SnLocalChatChannelTable extends SnLocalChatChannel
|
|||||||
} else if (isInserting) {
|
} else if (isInserting) {
|
||||||
context.missing(_aliasMeta);
|
context.missing(_aliasMeta);
|
||||||
}
|
}
|
||||||
context.handle(_contentMeta, const VerificationResult.success());
|
|
||||||
if (data.containsKey('created_at')) {
|
if (data.containsKey('created_at')) {
|
||||||
context.handle(_createdAtMeta,
|
context.handle(_createdAtMeta,
|
||||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
||||||
@ -295,8 +292,6 @@ class $SnLocalChatMessageTable extends SnLocalChatMessage
|
|||||||
late final GeneratedColumn<int> senderId = GeneratedColumn<int>(
|
late final GeneratedColumn<int> senderId = GeneratedColumn<int>(
|
||||||
'sender_id', aliasedName, true,
|
'sender_id', aliasedName, true,
|
||||||
type: DriftSqlType.int, requiredDuringInsert: false);
|
type: DriftSqlType.int, requiredDuringInsert: false);
|
||||||
static const VerificationMeta _contentMeta =
|
|
||||||
const VerificationMeta('content');
|
|
||||||
@override
|
@override
|
||||||
late final GeneratedColumnWithTypeConverter<SnChatMessage, String> content =
|
late final GeneratedColumnWithTypeConverter<SnChatMessage, String> content =
|
||||||
GeneratedColumn<String>('content', aliasedName, false,
|
GeneratedColumn<String>('content', aliasedName, false,
|
||||||
@ -338,7 +333,6 @@ class $SnLocalChatMessageTable extends SnLocalChatMessage
|
|||||||
context.handle(_senderIdMeta,
|
context.handle(_senderIdMeta,
|
||||||
senderId.isAcceptableOrUnknown(data['sender_id']!, _senderIdMeta));
|
senderId.isAcceptableOrUnknown(data['sender_id']!, _senderIdMeta));
|
||||||
}
|
}
|
||||||
context.handle(_contentMeta, const VerificationResult.success());
|
|
||||||
if (data.containsKey('created_at')) {
|
if (data.containsKey('created_at')) {
|
||||||
context.handle(_createdAtMeta,
|
context.handle(_createdAtMeta,
|
||||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
||||||
@ -604,8 +598,6 @@ class $SnLocalChannelMemberTable extends SnLocalChannelMember
|
|||||||
late final GeneratedColumn<int> accountId = GeneratedColumn<int>(
|
late final GeneratedColumn<int> accountId = GeneratedColumn<int>(
|
||||||
'account_id', aliasedName, false,
|
'account_id', aliasedName, false,
|
||||||
type: DriftSqlType.int, requiredDuringInsert: true);
|
type: DriftSqlType.int, requiredDuringInsert: true);
|
||||||
static const VerificationMeta _contentMeta =
|
|
||||||
const VerificationMeta('content');
|
|
||||||
@override
|
@override
|
||||||
late final GeneratedColumnWithTypeConverter<SnChannelMember, String> content =
|
late final GeneratedColumnWithTypeConverter<SnChannelMember, String> content =
|
||||||
GeneratedColumn<String>('content', aliasedName, false,
|
GeneratedColumn<String>('content', aliasedName, false,
|
||||||
@ -655,7 +647,6 @@ class $SnLocalChannelMemberTable extends SnLocalChannelMember
|
|||||||
} else if (isInserting) {
|
} else if (isInserting) {
|
||||||
context.missing(_accountIdMeta);
|
context.missing(_accountIdMeta);
|
||||||
}
|
}
|
||||||
context.handle(_contentMeta, const VerificationResult.success());
|
|
||||||
if (data.containsKey('created_at')) {
|
if (data.containsKey('created_at')) {
|
||||||
context.handle(_createdAtMeta,
|
context.handle(_createdAtMeta,
|
||||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
||||||
@ -1265,8 +1256,6 @@ class $SnLocalAccountTable extends SnLocalAccount
|
|||||||
late final GeneratedColumn<String> name = GeneratedColumn<String>(
|
late final GeneratedColumn<String> name = GeneratedColumn<String>(
|
||||||
'name', aliasedName, false,
|
'name', aliasedName, false,
|
||||||
type: DriftSqlType.string, requiredDuringInsert: true);
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
||||||
static const VerificationMeta _contentMeta =
|
|
||||||
const VerificationMeta('content');
|
|
||||||
@override
|
@override
|
||||||
late final GeneratedColumnWithTypeConverter<SnAccount, String> content =
|
late final GeneratedColumnWithTypeConverter<SnAccount, String> content =
|
||||||
GeneratedColumn<String>('content', aliasedName, false,
|
GeneratedColumn<String>('content', aliasedName, false,
|
||||||
@ -1308,7 +1297,6 @@ class $SnLocalAccountTable extends SnLocalAccount
|
|||||||
} else if (isInserting) {
|
} else if (isInserting) {
|
||||||
context.missing(_nameMeta);
|
context.missing(_nameMeta);
|
||||||
}
|
}
|
||||||
context.handle(_contentMeta, const VerificationResult.success());
|
|
||||||
if (data.containsKey('created_at')) {
|
if (data.containsKey('created_at')) {
|
||||||
context.handle(_createdAtMeta,
|
context.handle(_createdAtMeta,
|
||||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
||||||
@ -1582,8 +1570,6 @@ class $SnLocalAttachmentTable extends SnLocalAttachment
|
|||||||
type: DriftSqlType.string,
|
type: DriftSqlType.string,
|
||||||
requiredDuringInsert: true,
|
requiredDuringInsert: true,
|
||||||
defaultConstraints: GeneratedColumn.constraintIsAlways('UNIQUE'));
|
defaultConstraints: GeneratedColumn.constraintIsAlways('UNIQUE'));
|
||||||
static const VerificationMeta _contentMeta =
|
|
||||||
const VerificationMeta('content');
|
|
||||||
@override
|
@override
|
||||||
late final GeneratedColumnWithTypeConverter<SnAttachment, String> content =
|
late final GeneratedColumnWithTypeConverter<SnAttachment, String> content =
|
||||||
GeneratedColumn<String>('content', aliasedName, false,
|
GeneratedColumn<String>('content', aliasedName, false,
|
||||||
@ -1639,7 +1625,6 @@ class $SnLocalAttachmentTable extends SnLocalAttachment
|
|||||||
} else if (isInserting) {
|
} else if (isInserting) {
|
||||||
context.missing(_uuidMeta);
|
context.missing(_uuidMeta);
|
||||||
}
|
}
|
||||||
context.handle(_contentMeta, const VerificationResult.success());
|
|
||||||
if (data.containsKey('account_id')) {
|
if (data.containsKey('account_id')) {
|
||||||
context.handle(_accountIdMeta,
|
context.handle(_accountIdMeta,
|
||||||
accountId.isAcceptableOrUnknown(data['account_id']!, _accountIdMeta));
|
accountId.isAcceptableOrUnknown(data['account_id']!, _accountIdMeta));
|
||||||
@ -1968,8 +1953,6 @@ class $SnLocalStickerTable extends SnLocalSticker
|
|||||||
late final GeneratedColumn<String> fullAlias = GeneratedColumn<String>(
|
late final GeneratedColumn<String> fullAlias = GeneratedColumn<String>(
|
||||||
'full_alias', aliasedName, false,
|
'full_alias', aliasedName, false,
|
||||||
type: DriftSqlType.string, requiredDuringInsert: true);
|
type: DriftSqlType.string, requiredDuringInsert: true);
|
||||||
static const VerificationMeta _contentMeta =
|
|
||||||
const VerificationMeta('content');
|
|
||||||
@override
|
@override
|
||||||
late final GeneratedColumnWithTypeConverter<SnSticker, String> content =
|
late final GeneratedColumnWithTypeConverter<SnSticker, String> content =
|
||||||
GeneratedColumn<String>('content', aliasedName, false,
|
GeneratedColumn<String>('content', aliasedName, false,
|
||||||
@ -2011,7 +1994,6 @@ class $SnLocalStickerTable extends SnLocalSticker
|
|||||||
} else if (isInserting) {
|
} else if (isInserting) {
|
||||||
context.missing(_fullAliasMeta);
|
context.missing(_fullAliasMeta);
|
||||||
}
|
}
|
||||||
context.handle(_contentMeta, const VerificationResult.success());
|
|
||||||
if (data.containsKey('created_at')) {
|
if (data.containsKey('created_at')) {
|
||||||
context.handle(_createdAtMeta,
|
context.handle(_createdAtMeta,
|
||||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
||||||
@ -2261,8 +2243,6 @@ class $SnLocalStickerPackTable extends SnLocalStickerPack
|
|||||||
requiredDuringInsert: false,
|
requiredDuringInsert: false,
|
||||||
defaultConstraints:
|
defaultConstraints:
|
||||||
GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT'));
|
GeneratedColumn.constraintIsAlways('PRIMARY KEY AUTOINCREMENT'));
|
||||||
static const VerificationMeta _contentMeta =
|
|
||||||
const VerificationMeta('content');
|
|
||||||
@override
|
@override
|
||||||
late final GeneratedColumnWithTypeConverter<SnStickerPack, String> content =
|
late final GeneratedColumnWithTypeConverter<SnStickerPack, String> content =
|
||||||
GeneratedColumn<String>('content', aliasedName, false,
|
GeneratedColumn<String>('content', aliasedName, false,
|
||||||
@ -2293,7 +2273,6 @@ class $SnLocalStickerPackTable extends SnLocalStickerPack
|
|||||||
if (data.containsKey('id')) {
|
if (data.containsKey('id')) {
|
||||||
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
||||||
}
|
}
|
||||||
context.handle(_contentMeta, const VerificationResult.success());
|
|
||||||
if (data.containsKey('created_at')) {
|
if (data.containsKey('created_at')) {
|
||||||
context.handle(_createdAtMeta,
|
context.handle(_createdAtMeta,
|
||||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta));
|
||||||
|
@ -546,11 +546,26 @@ class _HomeDashCheckInWidgetState extends State<_HomeDashCheckInWidget> {
|
|||||||
'+${_todayRecord!.resultExperience} EXP',
|
'+${_todayRecord!.resultExperience} EXP',
|
||||||
style: Theme.of(context).textTheme.bodyLarge,
|
style: Theme.of(context).textTheme.bodyLarge,
|
||||||
),
|
),
|
||||||
if (_todayRecord!.resultCoin >= 0)
|
if (_todayRecord!.resultCoin > 0)
|
||||||
Text(
|
Text(
|
||||||
'+${_todayRecord!.resultCoin} ${'walletCurrencyShort'.tr()}',
|
'+${_todayRecord!.resultCoin} ${'walletCurrencyShort'.tr()}',
|
||||||
style: Theme.of(context).textTheme.bodyLarge,
|
style: Theme.of(context).textTheme.bodyLarge,
|
||||||
)
|
),
|
||||||
|
if (_todayRecord!.currentStreak > 0)
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
const Icon(
|
||||||
|
Symbols.local_fire_department,
|
||||||
|
size: 14,
|
||||||
|
).padding(bottom: 2),
|
||||||
|
const Gap(4),
|
||||||
|
Text(
|
||||||
|
'checkInStreak'
|
||||||
|
.plural(_todayRecord!.currentStreak),
|
||||||
|
style: Theme.of(context).textTheme.bodySmall,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
).padding(top: 4),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -25,11 +25,13 @@ abstract class SnCheckInRecord with _$SnCheckInRecord {
|
|||||||
required int resultTier,
|
required int resultTier,
|
||||||
required int resultExperience,
|
required int resultExperience,
|
||||||
required double resultCoin,
|
required double resultCoin,
|
||||||
|
@Default(0) int currentStreak,
|
||||||
required List<int> resultModifiers,
|
required List<int> resultModifiers,
|
||||||
required int accountId,
|
required int accountId,
|
||||||
}) = _SnCheckInRecord;
|
}) = _SnCheckInRecord;
|
||||||
|
|
||||||
factory SnCheckInRecord.fromJson(Map<String, dynamic> json) => _$SnCheckInRecordFromJson(json);
|
factory SnCheckInRecord.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$SnCheckInRecordFromJson(json);
|
||||||
|
|
||||||
String get symbol => kCheckInResultTierSymbols[resultTier];
|
String get symbol => kCheckInResultTierSymbols[resultTier];
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ mixin _$SnCheckInRecord {
|
|||||||
int get resultTier;
|
int get resultTier;
|
||||||
int get resultExperience;
|
int get resultExperience;
|
||||||
double get resultCoin;
|
double get resultCoin;
|
||||||
|
int get currentStreak;
|
||||||
List<int> get resultModifiers;
|
List<int> get resultModifiers;
|
||||||
int get accountId;
|
int get accountId;
|
||||||
|
|
||||||
@ -54,6 +55,8 @@ mixin _$SnCheckInRecord {
|
|||||||
other.resultExperience == resultExperience) &&
|
other.resultExperience == resultExperience) &&
|
||||||
(identical(other.resultCoin, resultCoin) ||
|
(identical(other.resultCoin, resultCoin) ||
|
||||||
other.resultCoin == resultCoin) &&
|
other.resultCoin == resultCoin) &&
|
||||||
|
(identical(other.currentStreak, currentStreak) ||
|
||||||
|
other.currentStreak == currentStreak) &&
|
||||||
const DeepCollectionEquality()
|
const DeepCollectionEquality()
|
||||||
.equals(other.resultModifiers, resultModifiers) &&
|
.equals(other.resultModifiers, resultModifiers) &&
|
||||||
(identical(other.accountId, accountId) ||
|
(identical(other.accountId, accountId) ||
|
||||||
@ -71,12 +74,13 @@ mixin _$SnCheckInRecord {
|
|||||||
resultTier,
|
resultTier,
|
||||||
resultExperience,
|
resultExperience,
|
||||||
resultCoin,
|
resultCoin,
|
||||||
|
currentStreak,
|
||||||
const DeepCollectionEquality().hash(resultModifiers),
|
const DeepCollectionEquality().hash(resultModifiers),
|
||||||
accountId);
|
accountId);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, resultModifiers: $resultModifiers, accountId: $accountId)';
|
return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, currentStreak: $currentStreak, resultModifiers: $resultModifiers, accountId: $accountId)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,6 +98,7 @@ abstract mixin class $SnCheckInRecordCopyWith<$Res> {
|
|||||||
int resultTier,
|
int resultTier,
|
||||||
int resultExperience,
|
int resultExperience,
|
||||||
double resultCoin,
|
double resultCoin,
|
||||||
|
int currentStreak,
|
||||||
List<int> resultModifiers,
|
List<int> resultModifiers,
|
||||||
int accountId});
|
int accountId});
|
||||||
}
|
}
|
||||||
@ -118,6 +123,7 @@ class _$SnCheckInRecordCopyWithImpl<$Res>
|
|||||||
Object? resultTier = null,
|
Object? resultTier = null,
|
||||||
Object? resultExperience = null,
|
Object? resultExperience = null,
|
||||||
Object? resultCoin = null,
|
Object? resultCoin = null,
|
||||||
|
Object? currentStreak = null,
|
||||||
Object? resultModifiers = null,
|
Object? resultModifiers = null,
|
||||||
Object? accountId = null,
|
Object? accountId = null,
|
||||||
}) {
|
}) {
|
||||||
@ -150,6 +156,10 @@ class _$SnCheckInRecordCopyWithImpl<$Res>
|
|||||||
? _self.resultCoin
|
? _self.resultCoin
|
||||||
: resultCoin // ignore: cast_nullable_to_non_nullable
|
: resultCoin // ignore: cast_nullable_to_non_nullable
|
||||||
as double,
|
as double,
|
||||||
|
currentStreak: null == currentStreak
|
||||||
|
? _self.currentStreak
|
||||||
|
: currentStreak // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,
|
||||||
resultModifiers: null == resultModifiers
|
resultModifiers: null == resultModifiers
|
||||||
? _self.resultModifiers
|
? _self.resultModifiers
|
||||||
: resultModifiers // ignore: cast_nullable_to_non_nullable
|
: resultModifiers // ignore: cast_nullable_to_non_nullable
|
||||||
@ -173,6 +183,7 @@ class _SnCheckInRecord extends SnCheckInRecord {
|
|||||||
required this.resultTier,
|
required this.resultTier,
|
||||||
required this.resultExperience,
|
required this.resultExperience,
|
||||||
required this.resultCoin,
|
required this.resultCoin,
|
||||||
|
this.currentStreak = 0,
|
||||||
required final List<int> resultModifiers,
|
required final List<int> resultModifiers,
|
||||||
required this.accountId})
|
required this.accountId})
|
||||||
: _resultModifiers = resultModifiers,
|
: _resultModifiers = resultModifiers,
|
||||||
@ -194,6 +205,9 @@ class _SnCheckInRecord extends SnCheckInRecord {
|
|||||||
final int resultExperience;
|
final int resultExperience;
|
||||||
@override
|
@override
|
||||||
final double resultCoin;
|
final double resultCoin;
|
||||||
|
@override
|
||||||
|
@JsonKey()
|
||||||
|
final int currentStreak;
|
||||||
final List<int> _resultModifiers;
|
final List<int> _resultModifiers;
|
||||||
@override
|
@override
|
||||||
List<int> get resultModifiers {
|
List<int> get resultModifiers {
|
||||||
@ -238,6 +252,8 @@ class _SnCheckInRecord extends SnCheckInRecord {
|
|||||||
other.resultExperience == resultExperience) &&
|
other.resultExperience == resultExperience) &&
|
||||||
(identical(other.resultCoin, resultCoin) ||
|
(identical(other.resultCoin, resultCoin) ||
|
||||||
other.resultCoin == resultCoin) &&
|
other.resultCoin == resultCoin) &&
|
||||||
|
(identical(other.currentStreak, currentStreak) ||
|
||||||
|
other.currentStreak == currentStreak) &&
|
||||||
const DeepCollectionEquality()
|
const DeepCollectionEquality()
|
||||||
.equals(other._resultModifiers, _resultModifiers) &&
|
.equals(other._resultModifiers, _resultModifiers) &&
|
||||||
(identical(other.accountId, accountId) ||
|
(identical(other.accountId, accountId) ||
|
||||||
@ -255,12 +271,13 @@ class _SnCheckInRecord extends SnCheckInRecord {
|
|||||||
resultTier,
|
resultTier,
|
||||||
resultExperience,
|
resultExperience,
|
||||||
resultCoin,
|
resultCoin,
|
||||||
|
currentStreak,
|
||||||
const DeepCollectionEquality().hash(_resultModifiers),
|
const DeepCollectionEquality().hash(_resultModifiers),
|
||||||
accountId);
|
accountId);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, resultModifiers: $resultModifiers, accountId: $accountId)';
|
return 'SnCheckInRecord(id: $id, createdAt: $createdAt, updatedAt: $updatedAt, deletedAt: $deletedAt, resultTier: $resultTier, resultExperience: $resultExperience, resultCoin: $resultCoin, currentStreak: $currentStreak, resultModifiers: $resultModifiers, accountId: $accountId)';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,6 +297,7 @@ abstract mixin class _$SnCheckInRecordCopyWith<$Res>
|
|||||||
int resultTier,
|
int resultTier,
|
||||||
int resultExperience,
|
int resultExperience,
|
||||||
double resultCoin,
|
double resultCoin,
|
||||||
|
int currentStreak,
|
||||||
List<int> resultModifiers,
|
List<int> resultModifiers,
|
||||||
int accountId});
|
int accountId});
|
||||||
}
|
}
|
||||||
@ -304,6 +322,7 @@ class __$SnCheckInRecordCopyWithImpl<$Res>
|
|||||||
Object? resultTier = null,
|
Object? resultTier = null,
|
||||||
Object? resultExperience = null,
|
Object? resultExperience = null,
|
||||||
Object? resultCoin = null,
|
Object? resultCoin = null,
|
||||||
|
Object? currentStreak = null,
|
||||||
Object? resultModifiers = null,
|
Object? resultModifiers = null,
|
||||||
Object? accountId = null,
|
Object? accountId = null,
|
||||||
}) {
|
}) {
|
||||||
@ -336,6 +355,10 @@ class __$SnCheckInRecordCopyWithImpl<$Res>
|
|||||||
? _self.resultCoin
|
? _self.resultCoin
|
||||||
: resultCoin // ignore: cast_nullable_to_non_nullable
|
: resultCoin // ignore: cast_nullable_to_non_nullable
|
||||||
as double,
|
as double,
|
||||||
|
currentStreak: null == currentStreak
|
||||||
|
? _self.currentStreak
|
||||||
|
: currentStreak // ignore: cast_nullable_to_non_nullable
|
||||||
|
as int,
|
||||||
resultModifiers: null == resultModifiers
|
resultModifiers: null == resultModifiers
|
||||||
? _self._resultModifiers
|
? _self._resultModifiers
|
||||||
: resultModifiers // ignore: cast_nullable_to_non_nullable
|
: resultModifiers // ignore: cast_nullable_to_non_nullable
|
||||||
|
@ -17,6 +17,7 @@ _SnCheckInRecord _$SnCheckInRecordFromJson(Map<String, dynamic> json) =>
|
|||||||
resultTier: (json['result_tier'] as num).toInt(),
|
resultTier: (json['result_tier'] as num).toInt(),
|
||||||
resultExperience: (json['result_experience'] as num).toInt(),
|
resultExperience: (json['result_experience'] as num).toInt(),
|
||||||
resultCoin: (json['result_coin'] as num).toDouble(),
|
resultCoin: (json['result_coin'] as num).toDouble(),
|
||||||
|
currentStreak: (json['current_streak'] as num?)?.toInt() ?? 0,
|
||||||
resultModifiers: (json['result_modifiers'] as List<dynamic>)
|
resultModifiers: (json['result_modifiers'] as List<dynamic>)
|
||||||
.map((e) => (e as num).toInt())
|
.map((e) => (e as num).toInt())
|
||||||
.toList(),
|
.toList(),
|
||||||
@ -32,6 +33,7 @@ Map<String, dynamic> _$SnCheckInRecordToJson(_SnCheckInRecord instance) =>
|
|||||||
'result_tier': instance.resultTier,
|
'result_tier': instance.resultTier,
|
||||||
'result_experience': instance.resultExperience,
|
'result_experience': instance.resultExperience,
|
||||||
'result_coin': instance.resultCoin,
|
'result_coin': instance.resultCoin,
|
||||||
|
'current_streak': instance.currentStreak,
|
||||||
'result_modifiers': instance.resultModifiers,
|
'result_modifiers': instance.resultModifiers,
|
||||||
'account_id': instance.accountId,
|
'account_id': instance.accountId,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user