mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-22 10:34:32 +00:00
add wallet summary card background image optional param to theme assets
This commit is contained in:
parent
d627f8e73c
commit
a047eac770
2 changed files with 182 additions and 1 deletions
|
@ -1939,7 +1939,9 @@ class ThemeAssets implements IThemeAssets {
|
||||||
@override
|
@override
|
||||||
late final String? background;
|
late final String? background;
|
||||||
|
|
||||||
// todo: add all assets expected in json
|
@override
|
||||||
|
@ignore
|
||||||
|
String? get walletSummaryCardBackground => null;
|
||||||
|
|
||||||
ThemeAssets();
|
ThemeAssets();
|
||||||
|
|
||||||
|
@ -2102,6 +2104,8 @@ class ThemeAssetsV2 implements IThemeAssets {
|
||||||
late final String? loadingGif;
|
late final String? loadingGif;
|
||||||
@override
|
@override
|
||||||
late final String? background;
|
late final String? background;
|
||||||
|
@override
|
||||||
|
late final String? walletSummaryCardBackground;
|
||||||
|
|
||||||
late final String coinPlaceholder;
|
late final String coinPlaceholder;
|
||||||
|
|
||||||
|
@ -2196,6 +2200,10 @@ class ThemeAssetsV2 implements IThemeAssets {
|
||||||
: null
|
: null
|
||||||
..background = json["background"] is String
|
..background = json["background"] is String
|
||||||
? "$applicationThemesDirectoryPath/$themeId/assets/${json["background"] as String}"
|
? "$applicationThemesDirectoryPath/$themeId/assets/${json["background"] as String}"
|
||||||
|
: null
|
||||||
|
..walletSummaryCardBackground = json["walletSummaryCardBackground"]
|
||||||
|
is String
|
||||||
|
? "$applicationThemesDirectoryPath/$themeId/assets/${json["walletSummaryCardBackground"] as String}"
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2246,6 +2254,7 @@ class ThemeAssetsV2 implements IThemeAssets {
|
||||||
'txExchangeFailed: $txExchangeFailed, '
|
'txExchangeFailed: $txExchangeFailed, '
|
||||||
'loadingGif: $loadingGif, '
|
'loadingGif: $loadingGif, '
|
||||||
'background: $background, '
|
'background: $background, '
|
||||||
|
'walletSummaryCardBackground: $walletSummaryCardBackground, '
|
||||||
'coinPlaceholder: $coinPlaceholder, '
|
'coinPlaceholder: $coinPlaceholder, '
|
||||||
'coinIcons: $coinIcons, '
|
'coinIcons: $coinIcons, '
|
||||||
'coinImages: $coinImages, '
|
'coinImages: $coinImages, '
|
||||||
|
@ -2276,4 +2285,5 @@ abstract class IThemeAssets {
|
||||||
|
|
||||||
String? get loadingGif;
|
String? get loadingGif;
|
||||||
String? get background;
|
String? get background;
|
||||||
|
String? get walletSummaryCardBackground;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25895,6 +25895,11 @@ const ThemeAssetsV2Schema = Schema(
|
||||||
id: 23,
|
id: 23,
|
||||||
name: r'txExchangePending',
|
name: r'txExchangePending',
|
||||||
type: IsarType.string,
|
type: IsarType.string,
|
||||||
|
),
|
||||||
|
r'walletSummaryCardBackground': PropertySchema(
|
||||||
|
id: 24,
|
||||||
|
name: r'walletSummaryCardBackground',
|
||||||
|
type: IsarType.string,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
estimateSize: _themeAssetsV2EstimateSize,
|
estimateSize: _themeAssetsV2EstimateSize,
|
||||||
|
@ -25943,6 +25948,12 @@ int _themeAssetsV2EstimateSize(
|
||||||
bytesCount += 3 + object.txExchange.length * 3;
|
bytesCount += 3 + object.txExchange.length * 3;
|
||||||
bytesCount += 3 + object.txExchangeFailed.length * 3;
|
bytesCount += 3 + object.txExchangeFailed.length * 3;
|
||||||
bytesCount += 3 + object.txExchangePending.length * 3;
|
bytesCount += 3 + object.txExchangePending.length * 3;
|
||||||
|
{
|
||||||
|
final value = object.walletSummaryCardBackground;
|
||||||
|
if (value != null) {
|
||||||
|
bytesCount += 3 + value.length * 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
return bytesCount;
|
return bytesCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25976,6 +25987,7 @@ void _themeAssetsV2Serialize(
|
||||||
writer.writeString(offsets[21], object.txExchange);
|
writer.writeString(offsets[21], object.txExchange);
|
||||||
writer.writeString(offsets[22], object.txExchangeFailed);
|
writer.writeString(offsets[22], object.txExchangeFailed);
|
||||||
writer.writeString(offsets[23], object.txExchangePending);
|
writer.writeString(offsets[23], object.txExchangePending);
|
||||||
|
writer.writeString(offsets[24], object.walletSummaryCardBackground);
|
||||||
}
|
}
|
||||||
|
|
||||||
ThemeAssetsV2 _themeAssetsV2Deserialize(
|
ThemeAssetsV2 _themeAssetsV2Deserialize(
|
||||||
|
@ -26009,6 +26021,7 @@ ThemeAssetsV2 _themeAssetsV2Deserialize(
|
||||||
object.txExchange = reader.readString(offsets[21]);
|
object.txExchange = reader.readString(offsets[21]);
|
||||||
object.txExchangeFailed = reader.readString(offsets[22]);
|
object.txExchangeFailed = reader.readString(offsets[22]);
|
||||||
object.txExchangePending = reader.readString(offsets[23]);
|
object.txExchangePending = reader.readString(offsets[23]);
|
||||||
|
object.walletSummaryCardBackground = reader.readStringOrNull(offsets[24]);
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26067,6 +26080,8 @@ P _themeAssetsV2DeserializeProp<P>(
|
||||||
return (reader.readString(offset)) as P;
|
return (reader.readString(offset)) as P;
|
||||||
case 23:
|
case 23:
|
||||||
return (reader.readString(offset)) as P;
|
return (reader.readString(offset)) as P;
|
||||||
|
case 24:
|
||||||
|
return (reader.readStringOrNull(offset)) as P;
|
||||||
default:
|
default:
|
||||||
throw IsarError('Unknown property with id $propertyId');
|
throw IsarError('Unknown property with id $propertyId');
|
||||||
}
|
}
|
||||||
|
@ -29372,6 +29387,162 @@ extension ThemeAssetsV2QueryFilter
|
||||||
));
|
));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QueryBuilder<ThemeAssetsV2, ThemeAssetsV2, QAfterFilterCondition>
|
||||||
|
walletSummaryCardBackgroundIsNull() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(const FilterCondition.isNull(
|
||||||
|
property: r'walletSummaryCardBackground',
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<ThemeAssetsV2, ThemeAssetsV2, QAfterFilterCondition>
|
||||||
|
walletSummaryCardBackgroundIsNotNull() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(const FilterCondition.isNotNull(
|
||||||
|
property: r'walletSummaryCardBackground',
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<ThemeAssetsV2, ThemeAssetsV2, QAfterFilterCondition>
|
||||||
|
walletSummaryCardBackgroundEqualTo(
|
||||||
|
String? value, {
|
||||||
|
bool caseSensitive = true,
|
||||||
|
}) {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(FilterCondition.equalTo(
|
||||||
|
property: r'walletSummaryCardBackground',
|
||||||
|
value: value,
|
||||||
|
caseSensitive: caseSensitive,
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<ThemeAssetsV2, ThemeAssetsV2, QAfterFilterCondition>
|
||||||
|
walletSummaryCardBackgroundGreaterThan(
|
||||||
|
String? value, {
|
||||||
|
bool include = false,
|
||||||
|
bool caseSensitive = true,
|
||||||
|
}) {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||||
|
include: include,
|
||||||
|
property: r'walletSummaryCardBackground',
|
||||||
|
value: value,
|
||||||
|
caseSensitive: caseSensitive,
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<ThemeAssetsV2, ThemeAssetsV2, QAfterFilterCondition>
|
||||||
|
walletSummaryCardBackgroundLessThan(
|
||||||
|
String? value, {
|
||||||
|
bool include = false,
|
||||||
|
bool caseSensitive = true,
|
||||||
|
}) {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(FilterCondition.lessThan(
|
||||||
|
include: include,
|
||||||
|
property: r'walletSummaryCardBackground',
|
||||||
|
value: value,
|
||||||
|
caseSensitive: caseSensitive,
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<ThemeAssetsV2, ThemeAssetsV2, QAfterFilterCondition>
|
||||||
|
walletSummaryCardBackgroundBetween(
|
||||||
|
String? lower,
|
||||||
|
String? upper, {
|
||||||
|
bool includeLower = true,
|
||||||
|
bool includeUpper = true,
|
||||||
|
bool caseSensitive = true,
|
||||||
|
}) {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(FilterCondition.between(
|
||||||
|
property: r'walletSummaryCardBackground',
|
||||||
|
lower: lower,
|
||||||
|
includeLower: includeLower,
|
||||||
|
upper: upper,
|
||||||
|
includeUpper: includeUpper,
|
||||||
|
caseSensitive: caseSensitive,
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<ThemeAssetsV2, ThemeAssetsV2, QAfterFilterCondition>
|
||||||
|
walletSummaryCardBackgroundStartsWith(
|
||||||
|
String value, {
|
||||||
|
bool caseSensitive = true,
|
||||||
|
}) {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(FilterCondition.startsWith(
|
||||||
|
property: r'walletSummaryCardBackground',
|
||||||
|
value: value,
|
||||||
|
caseSensitive: caseSensitive,
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<ThemeAssetsV2, ThemeAssetsV2, QAfterFilterCondition>
|
||||||
|
walletSummaryCardBackgroundEndsWith(
|
||||||
|
String value, {
|
||||||
|
bool caseSensitive = true,
|
||||||
|
}) {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(FilterCondition.endsWith(
|
||||||
|
property: r'walletSummaryCardBackground',
|
||||||
|
value: value,
|
||||||
|
caseSensitive: caseSensitive,
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<ThemeAssetsV2, ThemeAssetsV2, QAfterFilterCondition>
|
||||||
|
walletSummaryCardBackgroundContains(String value,
|
||||||
|
{bool caseSensitive = true}) {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(FilterCondition.contains(
|
||||||
|
property: r'walletSummaryCardBackground',
|
||||||
|
value: value,
|
||||||
|
caseSensitive: caseSensitive,
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<ThemeAssetsV2, ThemeAssetsV2, QAfterFilterCondition>
|
||||||
|
walletSummaryCardBackgroundMatches(String pattern,
|
||||||
|
{bool caseSensitive = true}) {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(FilterCondition.matches(
|
||||||
|
property: r'walletSummaryCardBackground',
|
||||||
|
wildcard: pattern,
|
||||||
|
caseSensitive: caseSensitive,
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<ThemeAssetsV2, ThemeAssetsV2, QAfterFilterCondition>
|
||||||
|
walletSummaryCardBackgroundIsEmpty() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(FilterCondition.equalTo(
|
||||||
|
property: r'walletSummaryCardBackground',
|
||||||
|
value: '',
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<ThemeAssetsV2, ThemeAssetsV2, QAfterFilterCondition>
|
||||||
|
walletSummaryCardBackgroundIsNotEmpty() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||||
|
property: r'walletSummaryCardBackground',
|
||||||
|
value: '',
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ThemeAssetsV2QueryObject
|
extension ThemeAssetsV2QueryObject
|
||||||
|
|
Loading…
Reference in a new issue