diff --git a/assets/icons/duplicate.svg b/assets/icons/duplicate.svg
new file mode 100644
index 00000000..1faa1bab
--- /dev/null
+++ b/assets/icons/duplicate.svg
@@ -0,0 +1,16 @@
+
diff --git a/assets/icons/edit_space.svg b/assets/icons/edit_space.svg
new file mode 100644
index 00000000..417cd5bd
--- /dev/null
+++ b/assets/icons/edit_space.svg
@@ -0,0 +1,22 @@
+
diff --git a/assets/icons/space_delete.svg b/assets/icons/space_delete.svg
new file mode 100644
index 00000000..90c3413e
--- /dev/null
+++ b/assets/icons/space_delete.svg
@@ -0,0 +1,9 @@
+
diff --git a/lib/common/edit_chip.dart b/lib/common/edit_chip.dart
new file mode 100644
index 00000000..1643b414
--- /dev/null
+++ b/lib/common/edit_chip.dart
@@ -0,0 +1,39 @@
+import 'package:flutter/material.dart';
+import 'package:syncrow_web/utils/color_manager.dart';
+
+class EditChip extends StatelessWidget {
+ final String label;
+ final VoidCallback onTap;
+ final Color labelColor;
+ final Color backgroundColor;
+ final Color borderColor;
+ final double borderRadius;
+
+ const EditChip({
+ Key? key,
+ this.label = 'Edit',
+ required this.onTap,
+ this.labelColor = ColorsManager.spaceColor,
+ this.backgroundColor = ColorsManager.whiteColors,
+ this.borderColor = ColorsManager.spaceColor,
+ this.borderRadius = 16.0,
+ }) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return GestureDetector(
+ onTap: onTap,
+ child: Chip(
+ label: Text(
+ label,
+ style: Theme.of(context).textTheme.bodySmall!.copyWith(color: labelColor)
+ ),
+ backgroundColor: backgroundColor,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(borderRadius),
+ side: BorderSide(color: borderColor),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/pages/common/buttons/default_button.dart b/lib/pages/common/buttons/default_button.dart
index 4aa748b7..ecca6138 100644
--- a/lib/pages/common/buttons/default_button.dart
+++ b/lib/pages/common/buttons/default_button.dart
@@ -19,12 +19,14 @@ class DefaultButton extends StatelessWidget {
this.padding,
this.borderColor,
this.elevation,
+ this.borderWidth = 1.0,
});
final void Function()? onPressed;
final Widget child;
final double? height;
final bool isSecondary;
final double? borderRadius;
+ final double borderWidth;
final bool enabled;
final double? padding;
final bool isDone;
@@ -66,13 +68,16 @@ class DefaultButton extends StatelessWidget {
}),
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
- side: BorderSide(color: borderColor ?? Colors.transparent),
+ side: BorderSide(
+ color: borderColor ?? Colors.transparent,
+ width: borderWidth,
+ ),
borderRadius: BorderRadius.circular(borderRadius ?? 20),
),
),
fixedSize: height != null
- ? WidgetStateProperty.all(Size.fromHeight(height!))
- : null,
+ ? WidgetStateProperty.all(Size.fromHeight(height!))
+ : null,
padding: WidgetStateProperty.all(
EdgeInsets.all(padding ?? 10),
),
diff --git a/lib/pages/device_managment/all_devices/models/device_subspace.model.dart b/lib/pages/device_managment/all_devices/models/device_subspace.model.dart
new file mode 100644
index 00000000..dc2386de
--- /dev/null
+++ b/lib/pages/device_managment/all_devices/models/device_subspace.model.dart
@@ -0,0 +1,47 @@
+class DeviceSubspace {
+ final String uuid;
+ final DateTime? createdAt;
+ final DateTime? updatedAt;
+ final String subspaceName;
+ final bool disabled;
+
+ DeviceSubspace({
+ required this.uuid,
+ this.createdAt,
+ this.updatedAt,
+ required this.subspaceName,
+ required this.disabled,
+ });
+
+ factory DeviceSubspace.fromJson(Map json) {
+ return DeviceSubspace(
+ uuid: json['uuid'] as String,
+ createdAt: json['createdAt'] != null
+ ? DateTime.tryParse(json['createdAt'].toString())
+ : null,
+ updatedAt: json['updatedAt'] != null
+ ? DateTime.tryParse(json['updatedAt'].toString())
+ : null,
+ subspaceName: json['subspaceName'] as String,
+ disabled: json['disabled'] as bool,
+ );
+ }
+
+ Map toJson() {
+ return {
+ 'uuid': uuid,
+ 'createdAt': createdAt?.toIso8601String(),
+ 'updatedAt': updatedAt?.toIso8601String(),
+ 'subspaceName': subspaceName,
+ 'disabled': disabled,
+ };
+ }
+
+ static List listFromJson(List jsonList) {
+ return jsonList.map((json) => DeviceSubspace.fromJson(json)).toList();
+ }
+
+ static List