feat: scheme download feature.
This commit is contained in:
@@ -111,6 +111,9 @@ abstract class _SchemeForDownload {
|
|||||||
@SerializableField(isNullable: false)
|
@SerializableField(isNullable: false)
|
||||||
String? get name;
|
String? get name;
|
||||||
|
|
||||||
|
@SerializableField(defaultValue: false, isNullable: false)
|
||||||
|
bool? get shared;
|
||||||
|
|
||||||
@Column(type: ColumnType.text)
|
@Column(type: ColumnType.text)
|
||||||
String? description;
|
String? description;
|
||||||
|
|
||||||
@@ -124,6 +127,7 @@ SchemeForDownload transSchemeForDownload(Scheme scheme) => SchemeForDownload(
|
|||||||
name: scheme.name,
|
name: scheme.name,
|
||||||
description: scheme.description,
|
description: scheme.description,
|
||||||
gestures: scheme.gestures,
|
gestures: scheme.gestures,
|
||||||
|
shared: scheme.shared,
|
||||||
);
|
);
|
||||||
|
|
||||||
@serializable
|
@serializable
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class LocalManagerState extends State<LocalManager> {
|
|||||||
..name = downloadedScheme.name
|
..name = downloadedScheme.name
|
||||||
..description = downloadedScheme.description
|
..description = downloadedScheme.description
|
||||||
..uploaded = true
|
..uploaded = true
|
||||||
..fromMarket = true
|
..fromMarket = downloadedScheme.shared == true
|
||||||
..gestures = (downloadedScheme.gestures ?? []).map(GestureProp.parse).toList();
|
..gestures = (downloadedScheme.gestures ?? []).map(GestureProp.parse).toList();
|
||||||
}
|
}
|
||||||
newSchemes.add(newEntry);
|
newSchemes.add(newEntry);
|
||||||
|
|||||||
Reference in New Issue
Block a user