mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
use id given by server
This commit is contained in:
parent
236b895ae4
commit
f3da99fd00
2 changed files with 9 additions and 8 deletions
|
@ -7,18 +7,19 @@ import 'package:stackwallet/utilities/extensions/impl/box_shadow.dart';
|
||||||
import 'package:stackwallet/utilities/extensions/impl/gradient.dart';
|
import 'package:stackwallet/utilities/extensions/impl/gradient.dart';
|
||||||
import 'package:stackwallet/utilities/extensions/impl/string.dart';
|
import 'package:stackwallet/utilities/extensions/impl/string.dart';
|
||||||
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
||||||
import 'package:uuid/uuid.dart';
|
|
||||||
|
|
||||||
@Collection(inheritance: false)
|
@Collection(inheritance: false)
|
||||||
class StackTheme {
|
class StackTheme {
|
||||||
|
Id id = Isar.autoIncrement;
|
||||||
|
|
||||||
|
/// id of theme on themes server
|
||||||
|
@Index(unique: true, replace: true)
|
||||||
|
final String idOnServer;
|
||||||
|
|
||||||
final String assetBundleUrl;
|
final String assetBundleUrl;
|
||||||
|
|
||||||
final ThemeType themeType = ThemeType.dark;
|
final ThemeType themeType = ThemeType.dark;
|
||||||
|
|
||||||
/// should be a uuid
|
|
||||||
@Index(unique: true, replace: true)
|
|
||||||
final String internalId;
|
|
||||||
|
|
||||||
/// the theme name that will be displayed in app
|
/// the theme name that will be displayed in app
|
||||||
final String name;
|
final String name;
|
||||||
|
|
||||||
|
@ -1475,7 +1476,7 @@ class StackTheme {
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
StackTheme({
|
StackTheme({
|
||||||
required this.internalId,
|
required this.idOnServer,
|
||||||
required this.assetBundleUrl,
|
required this.assetBundleUrl,
|
||||||
required this.name,
|
required this.name,
|
||||||
required this.assets,
|
required this.assets,
|
||||||
|
@ -1640,9 +1641,8 @@ class StackTheme {
|
||||||
required Map<String, dynamic> json,
|
required Map<String, dynamic> json,
|
||||||
required String applicationThemesDirectoryPath,
|
required String applicationThemesDirectoryPath,
|
||||||
}) {
|
}) {
|
||||||
final _id = const Uuid().v1();
|
|
||||||
return StackTheme(
|
return StackTheme(
|
||||||
internalId: _id,
|
idOnServer: json["id"] as String,
|
||||||
name: json["name"] as String,
|
name: json["name"] as String,
|
||||||
assetBundleUrl: json["asset_bundle_url"] as String,
|
assetBundleUrl: json["asset_bundle_url"] as String,
|
||||||
brightnessString: json["brightness"] as String,
|
brightnessString: json["brightness"] as String,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
final Map<String, dynamic> darkJson = {
|
final Map<String, dynamic> darkJson = {
|
||||||
"name": "Dark",
|
"name": "Dark",
|
||||||
|
"id": "dark",
|
||||||
"asset_bundle_url": "",
|
"asset_bundle_url": "",
|
||||||
"brightness": "dark",
|
"brightness": "dark",
|
||||||
"colors": {
|
"colors": {
|
||||||
|
|
Loading…
Reference in a new issue