own paints and public paints thingie
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user