Merge pull request #115 from SyncrowIOT/dev

Dev
This commit is contained in:
Abdullah
2025-03-12 14:21:13 +03:00
committed by GitHub
149 changed files with 4580 additions and 1757 deletions
+1
View File
@@ -71,4 +71,5 @@ abstract class ColorsManager {
static const Color lightGrayBorderColor = Color(0xB2D5D5D5);
//background: #F8F8F8;
static const Color vividBlue = Color(0xFF023DFE);
static const Color semiTransparentRed = Color(0x99FF0000);
}
+7
View File
@@ -89,6 +89,13 @@ abstract class ApiEndpoints {
static const String createSpaceModel = '/projects/{projectId}/space-models';
static const String getSpaceModel = '/projects/{projectId}/space-models/{spaceModelUuid}';
static const String updateSpaceModel = '/projects/{projectId}/space-models/{spaceModelUuid}';
//tag
static const String listTags = '/projects/{projectId}/tags';
static const String linkSpaceModel =
'/projects/{projectId}/space-models/{spaceModelUuid}/spaces/link';
static const String validateSpaceModel = '/projects/{projectId}/spaces/validate';
static const String roleTypes = '/role/types';
static const String permission = '/permission/{roleUuid}';
+7 -1
View File
@@ -258,6 +258,7 @@ class Assets {
static const String doorSensor = 'assets/icons/door_sensor.svg';
static const String delete = 'assets/icons/delete.svg';
static const String deleteSpaceModel = 'assets/icons/delete_space_model.svg';
static const String edit = 'assets/icons/edit.svg';
static const String editSpace = 'assets/icons/edit_space.svg';
//assets/icons/routine/tab_to_run.svg
@@ -401,5 +402,10 @@ class Assets {
static const String link = 'assets/icons/link.svg';
static const String duplicate = 'assets/icons/duplicate.svg';
static const String spaceDelete = 'assets/icons/space_delete.svg';
static const String deleteSpaceLinkIcon =
'assets/icons/delete_space_link_icon.svg';
static const String spaceLinkIcon = 'assets/icons/space_link_icon.svg';
static const String successIcon = 'assets/icons/success_icon.svg';
}
//user_management.svg
+25 -6
View File
@@ -1,18 +1,37 @@
import 'package:flutter/material.dart';
class ResponsiveLayout extends StatelessWidget {
final Widget desktopBody;
final Widget mobileBody;
const ResponsiveLayout(
{super.key, required this.desktopBody, required this.mobileBody});
final Widget? tablet;
final Widget desktopBody;
const ResponsiveLayout({
super.key,
required this.mobileBody,
this.tablet,
required this.desktopBody,
});
static bool isMobile(BuildContext context) =>
MediaQuery.of(context).size.width < 650;
static bool isTablet(BuildContext context) =>
MediaQuery.of(context).size.width < 1100 &&
MediaQuery.of(context).size.width >= 650;
static bool isDesktop(BuildContext context) =>
MediaQuery.of(context).size.width >= 1100;
@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, constraints) {
if (constraints.maxWidth < 600) {
return mobileBody;
} else {
if (constraints.maxWidth >= 1100) {
return desktopBody;
} else if (constraints.maxWidth >= 650) {
return tablet!;
} else {
return mobileBody;
}
},
);
@@ -0,0 +1,30 @@
import 'package:flutter/material.dart';
import 'package:syncrow_web/utils/color_manager.dart';
import 'package:syncrow_web/utils/responsive_layout.dart';
class ResponsiveTextTheme extends ThemeExtension<ResponsiveTextTheme> {
final TextStyle deviceManagementTitle;
ResponsiveTextTheme({
required this.deviceManagementTitle,
});
@override
ThemeExtension<ResponsiveTextTheme> copyWith() => this;
@override
ThemeExtension<ResponsiveTextTheme> lerp(
ThemeExtension<ResponsiveTextTheme>? other, double t) =>
this;
static ResponsiveTextTheme of(BuildContext context) {
final isMobile = ResponsiveLayout.isMobile(context);
return Theme.of(context).extension<ResponsiveTextTheme>() ??
ResponsiveTextTheme(
deviceManagementTitle: TextStyle(
fontSize: isMobile ? 20 : 30,
fontWeight: FontWeight.w700,
color: ColorsManager.whiteColors),
);
}
}