own paints and public paints thingie

This commit is contained in:
Kima
2024-02-02 22:53:59 +01:00
parent 8b91e0e1d3
commit 18892c6156
8 changed files with 492 additions and 192 deletions

View File

@@ -270,6 +270,21 @@ class FilcAPI {
return null;
}
static Future<List?> getAllSharedThemes(int count) async {
try {
http.Response res = await http.get(Uri.parse(allThemes));
if (res.statusCode == 200) {
return (jsonDecode(res.body) as List);
} else {
throw "HTTP ${res.statusCode}: ${res.body}";
}
} on Exception catch (error, stacktrace) {
log("ERROR: FilcAPI.getAllSharedThemes: $error $stacktrace");
}
return null;
}
static Future<void> addSharedGradeColors(
SharedGradeColors gradeColors) async {
try {

View File

@@ -11,6 +11,7 @@ class SharedTheme {
Color iconColor;
bool shadowEffect;
SharedGradeColors gradeColors;
String displayName;
SharedTheme({
required this.json,
@@ -23,6 +24,7 @@ class SharedTheme {
required this.iconColor,
required this.shadowEffect,
required this.gradeColors,
this.displayName = 'displayName',
});
factory SharedTheme.fromJson(Map json, SharedGradeColors gradeColors) {