Revert "formatted all files."

This reverts commit 04250ebc98.
This commit is contained in:
Faris Armoush
2025-06-12 16:04:49 +03:00
parent 218f43bacb
commit c642ba2644
473 changed files with 4335 additions and 5417 deletions

View File

@ -56,7 +56,7 @@ class SpaceModel {
{String? parentInternalId}) {
final String internalId = json['internalId'] ?? const Uuid().v4();
final children = json['children'] != null
final List<SpaceModel> children = json['children'] != null
? (json['children'] as List).map((childJson) {
return SpaceModel.fromJson(
childJson,
@ -73,8 +73,8 @@ class SpaceModel {
isPrivate: json['isPrivate'] ?? false,
invitationCode: json['invitationCode'],
subspaces: (json['subspaces'] as List<dynamic>?)
?.whereType<Map<String, dynamic>>() // Validate type
.map(SubspaceModel.fromJson)
?.where((e) => e is Map<String, dynamic>) // Validate type
.map((e) => SubspaceModel.fromJson(e as Map<String, dynamic>))
.toList() ??
[],
parent: parentInternalId != null
@ -102,8 +102,8 @@ class SpaceModel {
? SpaceTemplateModel.fromJson(json['spaceModel'])
: null,
tags: (json['productAllocations'] as List<dynamic>?)
?.whereType<Map<String, dynamic>>() // Validate type
.map(Tag.fromJson)
?.where((item) => item is Map<String, dynamic>) // Validate type
.map((item) => Tag.fromJson(item as Map<String, dynamic>))
.toList() ??
[],
);
@ -150,7 +150,7 @@ class SpaceModel {
extension SpaceExtensions on SpaceModel {
List<String> listAllTagValues() {
final tagValues = <String>[];
final List<String> tagValues = [];
if (tags != null) {
tagValues.addAll(
@ -174,10 +174,10 @@ extension SpaceExtensions on SpaceModel {
bool isNoChangesSubmited(String name, icon, SpaceTemplateModel? spaceModel,
List<SubspaceModel>? subspaces, List<Tag>? tags) {
return name == this.name &&
return (name == this.name &&
icon == this.icon &&
spaceModel == this.spaceModel &&
subspaces == this.subspaces &&
tags == this.tags;
tags == this.tags);
}
}