test
This commit is contained in:
@@ -3,7 +3,7 @@ import 'package:oc_front/models/response.dart';
|
||||
import 'package:oc_front/models/workflow.dart';
|
||||
import 'package:oc_front/models/workspace.dart';
|
||||
|
||||
class SharedWorkspace extends SerializerDeserializer<SharedWorkspace> {
|
||||
class CollaborativeArea extends SerializerDeserializer<CollaborativeArea> {
|
||||
String? id;
|
||||
String? name;
|
||||
String? description;
|
||||
@@ -15,7 +15,7 @@ class SharedWorkspace extends SerializerDeserializer<SharedWorkspace> {
|
||||
List<Peer> peers = [];
|
||||
List<Rule> rules = [];
|
||||
|
||||
SharedWorkspace(
|
||||
CollaborativeArea(
|
||||
{this.id,
|
||||
this.name,
|
||||
this.description,
|
||||
@@ -30,8 +30,8 @@ class SharedWorkspace extends SerializerDeserializer<SharedWorkspace> {
|
||||
@override
|
||||
deserialize(dynamic json) {
|
||||
try { json = json as Map<String, dynamic>;
|
||||
} catch (e) { return SharedWorkspace(); }
|
||||
return SharedWorkspace(
|
||||
} catch (e) { return CollaborativeArea(); }
|
||||
return CollaborativeArea(
|
||||
id: json.containsKey("id") ? json["id"] : null,
|
||||
name: json.containsKey("name") ? json["name"] : null,
|
||||
description: json.containsKey("description") ? json["description"] : null,
|
||||
|
||||
Reference in New Issue
Block a user