mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
formatted all files.
This commit is contained in:
@ -6,15 +6,15 @@ abstract class ColorsManager {
|
||||
static const Color primaryColor = Color(0xFF0030CB); //023DFE
|
||||
static const Color secondaryTextColor = Color(0xFF848484);
|
||||
static Color primaryColorWithOpacity =
|
||||
const Color(0xFF023DFE).withOpacity(0.6);
|
||||
const Color(0xFF023DFE).withValues(alpha: 0.6);
|
||||
static const Color whiteColors = Colors.white;
|
||||
static Color whiteColorsWithOpacity = Colors.white.withOpacity(0.6);
|
||||
static Color whiteColorsWithOpacity = Colors.white.withValues(alpha: 0.6);
|
||||
|
||||
static const Color secondaryColor = Color(0xFF023DFE);
|
||||
static const Color onSecondaryColor = Color(0xFF023DFE);
|
||||
static Color shadowBlackColor = Colors.black.withOpacity(0.2);
|
||||
static Color shadowBlackColor = Colors.black.withValues(alpha: 0.2);
|
||||
|
||||
static Color dialogBlueTitle = const Color(0xFF023DFE).withOpacity(0.6);
|
||||
static Color dialogBlueTitle = const Color(0xFF023DFE).withValues(alpha: 0.6);
|
||||
|
||||
static const Color primaryTextColor = Colors.black;
|
||||
|
||||
@ -83,7 +83,5 @@ abstract class ColorsManager {
|
||||
static const Color maxPurpleDot = Color(0xFF5F00BD);
|
||||
static const Color minBlue = Color(0xFF93AAFD);
|
||||
static const Color minBlueDot = Color(0xFF023DFE);
|
||||
static const Color grey25 = Color(0xFFF9F9F9);
|
||||
|
||||
|
||||
static const Color grey25 = Color(0xFFF9F9F9);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
|
||||
abstract class ApiEndpoints {
|
||||
static const String projectUuid = "0e62577c-06fa-41b9-8a92-99a21fbaf51c";
|
||||
static const String projectUuid = '0e62577c-06fa-41b9-8a92-99a21fbaf51c';
|
||||
static String baseUrl = dotenv.env['BASE_URL'] ?? '';
|
||||
static const String signUp = '/authentication/user/signup';
|
||||
static const String login = '/authentication/user/login';
|
||||
|
@ -9,28 +9,28 @@ extension AccessTypeExtension on AccessType {
|
||||
String get value {
|
||||
switch (this) {
|
||||
case AccessType.onlineOnetime:
|
||||
return "Online Password";
|
||||
return 'Online Password';
|
||||
case AccessType.onlineMultiple:
|
||||
return "online Multiple Password";
|
||||
return 'online Multiple Password';
|
||||
case AccessType.offlineOnetime:
|
||||
return "Offline Onetime Password";
|
||||
return 'Offline Onetime Password';
|
||||
case AccessType.offlineMultiple:
|
||||
return "Offline Multiple Password";
|
||||
return 'Offline Multiple Password';
|
||||
}
|
||||
}
|
||||
|
||||
static AccessType fromString(String value) {
|
||||
switch (value) {
|
||||
case "ONLINE_ONETIME":
|
||||
case 'ONLINE_ONETIME':
|
||||
return AccessType.onlineOnetime;
|
||||
case "ONLINE_MULTIPLE":
|
||||
case 'ONLINE_MULTIPLE':
|
||||
return AccessType.onlineMultiple;
|
||||
case "OFFLINE_ONETIME":
|
||||
case 'OFFLINE_ONETIME':
|
||||
return AccessType.offlineOnetime;
|
||||
case "OFFLINE_MULTIPLE":
|
||||
case 'OFFLINE_MULTIPLE':
|
||||
return AccessType.offlineMultiple;
|
||||
default:
|
||||
throw ArgumentError("Invalid access type: $value");
|
||||
throw ArgumentError('Invalid access type: $value');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -44,9 +44,9 @@ extension OnlineTypeExtension on DeviseStatus {
|
||||
String get value {
|
||||
switch (this) {
|
||||
case DeviseStatus.online:
|
||||
return "Online";
|
||||
return 'Online';
|
||||
case DeviseStatus.offline:
|
||||
return "Offline";
|
||||
return 'Offline';
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ extension OnlineTypeExtension on DeviseStatus {
|
||||
case true:
|
||||
return DeviseStatus.online;
|
||||
default:
|
||||
throw ArgumentError("Invalid access type: $value");
|
||||
throw ArgumentError('Invalid access type: $value');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -72,24 +72,24 @@ extension AccessStatusExtension on AccessStatus {
|
||||
String get value {
|
||||
switch (this) {
|
||||
case AccessStatus.expired:
|
||||
return "Expired";
|
||||
return 'Expired';
|
||||
case AccessStatus.effective:
|
||||
return "Effective";
|
||||
return 'Effective';
|
||||
case AccessStatus.toBeEffective:
|
||||
return "To be effective";
|
||||
return 'To be effective';
|
||||
}
|
||||
}
|
||||
|
||||
static AccessStatus fromString(String value) {
|
||||
switch (value) {
|
||||
case "EXPIRED":
|
||||
case 'EXPIRED':
|
||||
return AccessStatus.expired;
|
||||
case "EFFECTIVE":
|
||||
case 'EFFECTIVE':
|
||||
return AccessStatus.effective;
|
||||
case "TO_BE_EFFECTIVE":
|
||||
case 'TO_BE_EFFECTIVE':
|
||||
return AccessStatus.toBeEffective;
|
||||
default:
|
||||
throw ArgumentError("Invalid access type: $value");
|
||||
throw ArgumentError('Invalid access type: $value');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,138 +1,138 @@
|
||||
class Assets {
|
||||
Assets._();
|
||||
static const String background = "assets/images/Background.png";
|
||||
static const String webBackground = "assets/images/web_Background.svg";
|
||||
static const String webBackgroundPng = "assets/images/web_Background.png";
|
||||
static const String blackLogo = "assets/images/black-logo.png";
|
||||
static const String logo = "assets/images/Logo.svg";
|
||||
static const String logoHorizontal = "assets/images/logo_horizontal.png";
|
||||
static const String vector = "assets/images/Vector.png";
|
||||
static const String loginLogo = "assets/images/login_logo.svg";
|
||||
static const String whiteLogo = "assets/images/white-logo.png";
|
||||
static const String window = "assets/images/Window.png";
|
||||
static const String liftLine = "assets/images/lift_line.png";
|
||||
static const String rightLine = "assets/images/right_line.png";
|
||||
static const String google = "assets/images/google.svg";
|
||||
static const String facebook = "assets/images/facebook.svg";
|
||||
static const String background = 'assets/images/Background.png';
|
||||
static const String webBackground = 'assets/images/web_Background.svg';
|
||||
static const String webBackgroundPng = 'assets/images/web_Background.png';
|
||||
static const String blackLogo = 'assets/images/black-logo.png';
|
||||
static const String logo = 'assets/images/Logo.svg';
|
||||
static const String logoHorizontal = 'assets/images/logo_horizontal.png';
|
||||
static const String vector = 'assets/images/Vector.png';
|
||||
static const String loginLogo = 'assets/images/login_logo.svg';
|
||||
static const String whiteLogo = 'assets/images/white-logo.png';
|
||||
static const String window = 'assets/images/Window.png';
|
||||
static const String liftLine = 'assets/images/lift_line.png';
|
||||
static const String rightLine = 'assets/images/right_line.png';
|
||||
static const String google = 'assets/images/google.svg';
|
||||
static const String facebook = 'assets/images/facebook.svg';
|
||||
static const String invisiblePassword =
|
||||
"assets/images/Password_invisible.svg";
|
||||
static const String visiblePassword = "assets/images/password_visible.svg";
|
||||
static const String accessIcon = "assets/images/access_icon.svg";
|
||||
'assets/images/Password_invisible.svg';
|
||||
static const String visiblePassword = 'assets/images/password_visible.svg';
|
||||
static const String accessIcon = 'assets/images/access_icon.svg';
|
||||
static const String spaseManagementIcon =
|
||||
"assets/images/spase_management_icon.svg";
|
||||
static const String devicesIcon = "assets/images/devices_icon.svg";
|
||||
static const String analyticsIcon = "assets/icons/landing_analytics.svg";
|
||||
'assets/images/spase_management_icon.svg';
|
||||
static const String devicesIcon = 'assets/images/devices_icon.svg';
|
||||
static const String analyticsIcon = 'assets/icons/landing_analytics.svg';
|
||||
|
||||
static const String moveinIcon = "assets/images/movein_icon.svg";
|
||||
static const String constructionIcon = "assets/images/construction_icon.svg";
|
||||
static const String energyIcon = "assets/images/energy_icon.svg";
|
||||
static const String integrationsIcon = "assets/images/Integrations_icon.svg";
|
||||
static const String assetIcon = "assets/images/asset_icon.svg";
|
||||
static const String calendarIcon = "assets/images/calendar_icon.svg";
|
||||
static const String deviceNoteIcon = "assets/images/device_note.svg";
|
||||
static const String timeIcon = "assets/images/time_icon.svg";
|
||||
static const String emptyTable = "assets/images/empty_table.svg";
|
||||
static const String moveinIcon = 'assets/images/movein_icon.svg';
|
||||
static const String constructionIcon = 'assets/images/construction_icon.svg';
|
||||
static const String energyIcon = 'assets/images/energy_icon.svg';
|
||||
static const String integrationsIcon = 'assets/images/Integrations_icon.svg';
|
||||
static const String assetIcon = 'assets/images/asset_icon.svg';
|
||||
static const String calendarIcon = 'assets/images/calendar_icon.svg';
|
||||
static const String deviceNoteIcon = 'assets/images/device_note.svg';
|
||||
static const String timeIcon = 'assets/images/time_icon.svg';
|
||||
static const String emptyTable = 'assets/images/empty_table.svg';
|
||||
|
||||
// General assets
|
||||
static const String motionlessDetection =
|
||||
"assets/icons/motionless_detection.svg";
|
||||
static const String acHeating = "assets/icons/ac_heating.svg";
|
||||
static const String acPowerOff = "assets/icons/ac_power_off.svg";
|
||||
static const String acFanMiddle = "assets/icons/ac_fan_middle.svg";
|
||||
static const String switchAlarmSound = "assets/icons/switch_alarm_sound.svg";
|
||||
static const String resetOff = "assets/icons/reset_off.svg";
|
||||
'assets/icons/motionless_detection.svg';
|
||||
static const String acHeating = 'assets/icons/ac_heating.svg';
|
||||
static const String acPowerOff = 'assets/icons/ac_power_off.svg';
|
||||
static const String acFanMiddle = 'assets/icons/ac_fan_middle.svg';
|
||||
static const String switchAlarmSound = 'assets/icons/switch_alarm_sound.svg';
|
||||
static const String resetOff = 'assets/icons/reset_off.svg';
|
||||
static const String sensitivityOperationIcon =
|
||||
"assets/icons/sesitivity_operation_icon.svg";
|
||||
static const String motionDetection = "assets/icons/motion_detection.svg";
|
||||
static const String freezing = "assets/icons/freezing.svg";
|
||||
static const String indicator = "assets/icons/indicator.svg";
|
||||
static const String sceneRefresh = "assets/icons/scene_refresh.svg";
|
||||
static const String temperature = "assets/icons/tempreture.svg";
|
||||
static const String acFanHigh = "assets/icons/ac_fan_high.svg";
|
||||
static const String fanSpeed = "assets/icons/fan_speed.svg";
|
||||
static const String acFanLow = "assets/icons/ac_fan_low.svg";
|
||||
static const String sensitivity = "assets/icons/sensitivity.svg";
|
||||
static const String lightCountdown = "assets/icons/light_countdown.svg";
|
||||
static const String farDetection = "assets/icons/far_detection.svg";
|
||||
static const String sceneChildUnlock = "assets/icons/scene_child_unlock.svg";
|
||||
static const String acFanAuto = "assets/icons/ac_fan_auto.svg";
|
||||
static const String childLock = "assets/icons/child_lock.svg";
|
||||
static const String factoryReset = "assets/icons/factory_reset.svg";
|
||||
static const String acCooling = "assets/icons/ac_cooling.svg";
|
||||
static const String sceneChildLock = "assets/icons/scene_child_lock.svg";
|
||||
static const String celsiusDegrees = "assets/icons/celsius_degrees.svg";
|
||||
static const String masterState = "assets/icons/master_state.svg";
|
||||
static const String acPower = "assets/icons/ac_power.svg";
|
||||
'assets/icons/sesitivity_operation_icon.svg';
|
||||
static const String motionDetection = 'assets/icons/motion_detection.svg';
|
||||
static const String freezing = 'assets/icons/freezing.svg';
|
||||
static const String indicator = 'assets/icons/indicator.svg';
|
||||
static const String sceneRefresh = 'assets/icons/scene_refresh.svg';
|
||||
static const String temperature = 'assets/icons/tempreture.svg';
|
||||
static const String acFanHigh = 'assets/icons/ac_fan_high.svg';
|
||||
static const String fanSpeed = 'assets/icons/fan_speed.svg';
|
||||
static const String acFanLow = 'assets/icons/ac_fan_low.svg';
|
||||
static const String sensitivity = 'assets/icons/sensitivity.svg';
|
||||
static const String lightCountdown = 'assets/icons/light_countdown.svg';
|
||||
static const String farDetection = 'assets/icons/far_detection.svg';
|
||||
static const String sceneChildUnlock = 'assets/icons/scene_child_unlock.svg';
|
||||
static const String acFanAuto = 'assets/icons/ac_fan_auto.svg';
|
||||
static const String childLock = 'assets/icons/child_lock.svg';
|
||||
static const String factoryReset = 'assets/icons/factory_reset.svg';
|
||||
static const String acCooling = 'assets/icons/ac_cooling.svg';
|
||||
static const String sceneChildLock = 'assets/icons/scene_child_lock.svg';
|
||||
static const String celsiusDegrees = 'assets/icons/celsius_degrees.svg';
|
||||
static const String masterState = 'assets/icons/master_state.svg';
|
||||
static const String acPower = 'assets/icons/ac_power.svg';
|
||||
static const String farDetectionFunction =
|
||||
"assets/icons/far_detection_function.svg";
|
||||
static const String nobodyTime = "assets/icons/nobody_time.svg";
|
||||
'assets/icons/far_detection_function.svg';
|
||||
static const String nobodyTime = 'assets/icons/nobody_time.svg';
|
||||
|
||||
// Automation functions
|
||||
static const String tempPasswordUnlock =
|
||||
"assets/icons/automation_functions/temp_password_unlock.svg";
|
||||
'assets/icons/automation_functions/temp_password_unlock.svg';
|
||||
static const String doorlockNormalOpen =
|
||||
"assets/icons/automation_functions/doorlock_normal_open.svg";
|
||||
'assets/icons/automation_functions/doorlock_normal_open.svg';
|
||||
static const String doorbell =
|
||||
"assets/icons/automation_functions/doorbell.svg";
|
||||
'assets/icons/automation_functions/doorbell.svg';
|
||||
static const String remoteUnlockViaApp =
|
||||
"assets/icons/automation_functions/remote_unlock_via_app.svg";
|
||||
'assets/icons/automation_functions/remote_unlock_via_app.svg';
|
||||
static const String doubleLock =
|
||||
"assets/icons/automation_functions/double_lock.svg";
|
||||
'assets/icons/automation_functions/double_lock.svg';
|
||||
static const String selfTestResult =
|
||||
"assets/icons/automation_functions/self_test_result.svg";
|
||||
'assets/icons/automation_functions/self_test_result.svg';
|
||||
static const String lockAlarm =
|
||||
"assets/icons/automation_functions/lock_alarm.svg";
|
||||
'assets/icons/automation_functions/lock_alarm.svg';
|
||||
static const String presenceState =
|
||||
"assets/icons/automation_functions/presence_state.svg";
|
||||
'assets/icons/automation_functions/presence_state.svg';
|
||||
static const String currentTemp =
|
||||
"assets/icons/automation_functions/current_temp.svg";
|
||||
'assets/icons/automation_functions/current_temp.svg';
|
||||
static const String presence =
|
||||
"assets/icons/automation_functions/presence.svg";
|
||||
'assets/icons/automation_functions/presence.svg';
|
||||
static const String residualElectricity =
|
||||
"assets/icons/automation_functions/residual_electricity.svg";
|
||||
'assets/icons/automation_functions/residual_electricity.svg';
|
||||
static const String hijackAlarm =
|
||||
"assets/icons/automation_functions/hijack_alarm.svg";
|
||||
'assets/icons/automation_functions/hijack_alarm.svg';
|
||||
static const String passwordUnlock =
|
||||
"assets/icons/automation_functions/password_unlock.svg";
|
||||
'assets/icons/automation_functions/password_unlock.svg';
|
||||
static const String remoteUnlockRequest =
|
||||
"assets/icons/automation_functions/remote_unlock_req.svg";
|
||||
'assets/icons/automation_functions/remote_unlock_req.svg';
|
||||
static const String cardUnlock =
|
||||
"assets/icons/automation_functions/card_unlock.svg";
|
||||
static const String motion = "assets/icons/automation_functions/motion.svg";
|
||||
'assets/icons/automation_functions/card_unlock.svg';
|
||||
static const String motion = 'assets/icons/automation_functions/motion.svg';
|
||||
static const String fingerprintUnlock =
|
||||
"assets/icons/automation_functions/fingerprint_unlock.svg";
|
||||
'assets/icons/automation_functions/fingerprint_unlock.svg';
|
||||
|
||||
// Presence Sensor Assets
|
||||
static const String sensorMotionIcon = "assets/icons/sensor_motion_ic.svg";
|
||||
static const String sensorMotionIcon = 'assets/icons/sensor_motion_ic.svg';
|
||||
static const String sensorPresenceIcon =
|
||||
"assets/icons/sensor_presence_ic.svg";
|
||||
static const String sensorVacantIcon = "assets/icons/sensor_vacant_ic.svg";
|
||||
'assets/icons/sensor_presence_ic.svg';
|
||||
static const String sensorVacantIcon = 'assets/icons/sensor_vacant_ic.svg';
|
||||
static const String illuminanceRecordIcon =
|
||||
"assets/icons/illuminance_record_ic.svg";
|
||||
'assets/icons/illuminance_record_ic.svg';
|
||||
static const String presenceRecordIcon =
|
||||
"assets/icons/presence_record_ic.svg";
|
||||
'assets/icons/presence_record_ic.svg';
|
||||
static const String helpDescriptionIcon =
|
||||
"assets/icons/help_description_ic.svg";
|
||||
'assets/icons/help_description_ic.svg';
|
||||
|
||||
static const String lightPulp = "assets/icons/light_pulb.svg";
|
||||
static const String acDevice = "assets/icons/ac_device.svg";
|
||||
static const String acAirConditioner = "assets/icons/ac_air.svg";
|
||||
static const String acSun = "assets/icons/ac_sun.svg";
|
||||
static const String lightPulp = 'assets/icons/light_pulb.svg';
|
||||
static const String acDevice = 'assets/icons/ac_device.svg';
|
||||
static const String acAirConditioner = 'assets/icons/ac_air.svg';
|
||||
static const String acSun = 'assets/icons/ac_sun.svg';
|
||||
|
||||
//assets/icons/3GangSwitch.svg
|
||||
static const String gangSwitch = "assets/icons/3GangSwitch.svg";
|
||||
static const String gangSwitch = 'assets/icons/3GangSwitch.svg';
|
||||
//assets/icons/AC.svg
|
||||
static const String ac = "assets/icons/AC.svg";
|
||||
static const String ac = 'assets/icons/AC.svg';
|
||||
//assets/icons/Curtain.svg
|
||||
static const String curtain = "assets/icons/Curtain.svg";
|
||||
static const String curtain = 'assets/icons/Curtain.svg';
|
||||
//assets/icons/doorLock.svg
|
||||
static const String doorLock = "assets/icons/doorLock.svg";
|
||||
static const String doorLock = 'assets/icons/doorLock.svg';
|
||||
//assets/icons/Gateway.svg
|
||||
static const String gateway = "assets/icons/Gateway.svg";
|
||||
static const String gateway = 'assets/icons/Gateway.svg';
|
||||
//assets/icons/Light.svg
|
||||
static const String lightBulb = "assets/icons/Light.svg";
|
||||
static const String lightBulb = 'assets/icons/Light.svg';
|
||||
//assets/icons/sensors.svg
|
||||
static const String sensors = "assets/icons/sensors.svg";
|
||||
static const String sensors = 'assets/icons/sensors.svg';
|
||||
|
||||
//assets/icons/door_un_look_ic.svg
|
||||
static const String doorUnlock = 'assets/icons/door_un_look_ic.svg';
|
||||
@ -175,7 +175,7 @@ class Assets {
|
||||
static const String Gang1SwitchIcon = 'assets/icons/1_Gang_switch_icon.svg';
|
||||
static const String DoorLockIcon = 'assets/icons/door_lock.svg';
|
||||
static const String SmartGatewayIcon = 'assets/icons/smart_gateway_icon.svg';
|
||||
static const String curtainIcon = "assets/images/curtain.svg";
|
||||
static const String curtainIcon = 'assets/images/curtain.svg';
|
||||
static const String unlock = 'assets/icons/unlock_ic.svg';
|
||||
static const String firmware = 'assets/icons/firmware.svg';
|
||||
//assets/images/scheduling.svg
|
||||
@ -227,12 +227,12 @@ class Assets {
|
||||
//assets/icons/2gang.svg
|
||||
static const String twoGang = 'assets/icons/2gang.svg';
|
||||
|
||||
static const String frequencyIcon = "assets/icons/frequency_icon.svg";
|
||||
static const String voltMeterIcon = "assets/icons/volt_meter_icon.svg";
|
||||
static const String powerActiveIcon = "assets/icons/power_active_icon.svg";
|
||||
static const String searchIcon = "assets/icons/search_icon.svg";
|
||||
static const String voltageIcon = "assets/icons/voltage_icon.svg";
|
||||
static const String speedoMeter = "assets/icons/speedo_meter.svg";
|
||||
static const String frequencyIcon = 'assets/icons/frequency_icon.svg';
|
||||
static const String voltMeterIcon = 'assets/icons/volt_meter_icon.svg';
|
||||
static const String powerActiveIcon = 'assets/icons/power_active_icon.svg';
|
||||
static const String searchIcon = 'assets/icons/search_icon.svg';
|
||||
static const String voltageIcon = 'assets/icons/voltage_icon.svg';
|
||||
static const String speedoMeter = 'assets/icons/speedo_meter.svg';
|
||||
//assets/icons/account_setting.svg
|
||||
static const String accountSetting = 'assets/icons/account_setting.svg';
|
||||
|
||||
@ -284,99 +284,99 @@ class Assets {
|
||||
|
||||
// Assets for functions_icons
|
||||
static const String assetsSensitivityFunction =
|
||||
"assets/icons/functions_icons/sensitivity.svg";
|
||||
'assets/icons/functions_icons/sensitivity.svg';
|
||||
static const String assetsSensitivityOperationIcon =
|
||||
"assets/icons/functions_icons/sesitivity_operation_icon.svg";
|
||||
'assets/icons/functions_icons/sesitivity_operation_icon.svg';
|
||||
static const String assetsAcPower =
|
||||
"assets/icons/functions_icons/ac_power.svg";
|
||||
'assets/icons/functions_icons/ac_power.svg';
|
||||
static const String assetsAcPowerOFF =
|
||||
"assets/icons/functions_icons/ac_power_off.svg";
|
||||
'assets/icons/functions_icons/ac_power_off.svg';
|
||||
static const String assetsChildLock =
|
||||
"assets/icons/functions_icons/child_lock.svg";
|
||||
'assets/icons/functions_icons/child_lock.svg';
|
||||
static const String assetsFreezing =
|
||||
"assets/icons/functions_icons/freezing.svg";
|
||||
'assets/icons/functions_icons/freezing.svg';
|
||||
static const String assetsFanSpeed =
|
||||
"assets/icons/functions_icons/fan_speed.svg";
|
||||
'assets/icons/functions_icons/fan_speed.svg';
|
||||
static const String assetsAcCooling =
|
||||
"assets/icons/functions_icons/ac_cooling.svg";
|
||||
'assets/icons/functions_icons/ac_cooling.svg';
|
||||
static const String assetsAcHeating =
|
||||
"assets/icons/functions_icons/ac_heating.svg";
|
||||
'assets/icons/functions_icons/ac_heating.svg';
|
||||
static const String assetsCelsiusDegrees =
|
||||
"assets/icons/functions_icons/celsius_degrees.svg";
|
||||
'assets/icons/functions_icons/celsius_degrees.svg';
|
||||
static const String assetsTempreture =
|
||||
"assets/icons/functions_icons/tempreture.svg";
|
||||
'assets/icons/functions_icons/tempreture.svg';
|
||||
static const String assetsAcFanLow =
|
||||
"assets/icons/functions_icons/ac_fan_low.svg";
|
||||
'assets/icons/functions_icons/ac_fan_low.svg';
|
||||
static const String assetsAcFanMiddle =
|
||||
"assets/icons/functions_icons/ac_fan_middle.svg";
|
||||
'assets/icons/functions_icons/ac_fan_middle.svg';
|
||||
static const String assetsAcFanHigh =
|
||||
"assets/icons/functions_icons/ac_fan_high.svg";
|
||||
'assets/icons/functions_icons/ac_fan_high.svg';
|
||||
static const String assetsAcFanAuto =
|
||||
"assets/icons/functions_icons/ac_fan_auto.svg";
|
||||
'assets/icons/functions_icons/ac_fan_auto.svg';
|
||||
static const String assetsSceneChildLock =
|
||||
"assets/icons/functions_icons/scene_child_lock.svg";
|
||||
'assets/icons/functions_icons/scene_child_lock.svg';
|
||||
static const String assetsSceneChildUnlock =
|
||||
"assets/icons/functions_icons/scene_child_unlock.svg";
|
||||
'assets/icons/functions_icons/scene_child_unlock.svg';
|
||||
static const String assetsSceneRefresh =
|
||||
"assets/icons/functions_icons/scene_refresh.svg";
|
||||
'assets/icons/functions_icons/scene_refresh.svg';
|
||||
static const String assetsLightCountdown =
|
||||
"assets/icons/functions_icons/light_countdown.svg";
|
||||
'assets/icons/functions_icons/light_countdown.svg';
|
||||
static const String assetsFarDetection =
|
||||
"assets/icons/functions_icons/far_detection.svg";
|
||||
'assets/icons/functions_icons/far_detection.svg';
|
||||
static const String assetsFarDetectionFunction =
|
||||
"assets/icons/functions_icons/far_detection_function.svg";
|
||||
'assets/icons/functions_icons/far_detection_function.svg';
|
||||
static const String assetsIndicator =
|
||||
"assets/icons/functions_icons/indicator.svg";
|
||||
'assets/icons/functions_icons/indicator.svg';
|
||||
static const String assetsMotionDetection =
|
||||
"assets/icons/functions_icons/motion_detection.svg";
|
||||
'assets/icons/functions_icons/motion_detection.svg';
|
||||
static const String assetsMotionlessDetection =
|
||||
"assets/icons/functions_icons/motionless_detection.svg";
|
||||
'assets/icons/functions_icons/motionless_detection.svg';
|
||||
static const String assetsNobodyTime =
|
||||
"assets/icons/functions_icons/nobody_time.svg";
|
||||
'assets/icons/functions_icons/nobody_time.svg';
|
||||
static const String assetsFactoryReset =
|
||||
"assets/icons/functions_icons/factory_reset.svg";
|
||||
'assets/icons/functions_icons/factory_reset.svg';
|
||||
static const String assetsMasterState =
|
||||
"assets/icons/functions_icons/master_state.svg";
|
||||
'assets/icons/functions_icons/master_state.svg';
|
||||
static const String assetsSwitchAlarmSound =
|
||||
"assets/icons/functions_icons/switch_alarm_sound.svg";
|
||||
'assets/icons/functions_icons/switch_alarm_sound.svg';
|
||||
static const String assetsResetOff =
|
||||
"assets/icons/functions_icons/reset_off.svg";
|
||||
'assets/icons/functions_icons/reset_off.svg';
|
||||
|
||||
// Assets for automation_functions
|
||||
static const String assetsCardUnlock =
|
||||
"assets/icons/functions_icons/automation_functions/card_unlock.svg";
|
||||
'assets/icons/functions_icons/automation_functions/card_unlock.svg';
|
||||
static const String assetsDoorbell =
|
||||
"assets/icons/functions_icons/automation_functions/doorbell.svg";
|
||||
'assets/icons/functions_icons/automation_functions/doorbell.svg';
|
||||
static const String assetsDoorlockNormalOpen =
|
||||
"assets/icons/functions_icons/automation_functions/doorlock_normal_open.svg";
|
||||
'assets/icons/functions_icons/automation_functions/doorlock_normal_open.svg';
|
||||
static const String assetsDoubleLock =
|
||||
"assets/icons/functions_icons/automation_functions/double_lock.svg";
|
||||
'assets/icons/functions_icons/automation_functions/double_lock.svg';
|
||||
static const String assetsFingerprintUnlock =
|
||||
"assets/icons/functions_icons/automation_functions/fingerprint_unlock.svg";
|
||||
'assets/icons/functions_icons/automation_functions/fingerprint_unlock.svg';
|
||||
static const String assetsHijackAlarm =
|
||||
"assets/icons/functions_icons/automation_functions/hijack_alarm.svg";
|
||||
'assets/icons/functions_icons/automation_functions/hijack_alarm.svg';
|
||||
static const String assetsLockAlarm =
|
||||
"assets/icons/functions_icons/automation_functions/lock_alarm.svg";
|
||||
'assets/icons/functions_icons/automation_functions/lock_alarm.svg';
|
||||
static const String assetsPasswordUnlock =
|
||||
"assets/icons/functions_icons/automation_functions/password_unlock.svg";
|
||||
'assets/icons/functions_icons/automation_functions/password_unlock.svg';
|
||||
static const String assetsRemoteUnlockReq =
|
||||
"assets/icons/functions_icons/automation_functions/remote_unlock_req.svg";
|
||||
'assets/icons/functions_icons/automation_functions/remote_unlock_req.svg';
|
||||
static const String assetsRemoteUnlockViaApp =
|
||||
"assets/icons/functions_icons/automation_functions/remote_unlock_via_app.svg";
|
||||
'assets/icons/functions_icons/automation_functions/remote_unlock_via_app.svg';
|
||||
static const String assetsResidualElectricity =
|
||||
"assets/icons/functions_icons/automation_functions/residual_electricity.svg";
|
||||
'assets/icons/functions_icons/automation_functions/residual_electricity.svg';
|
||||
static const String assetsTempPasswordUnlock =
|
||||
"assets/icons/functions_icons/automation_functions/temp_password_unlock.svg";
|
||||
'assets/icons/functions_icons/automation_functions/temp_password_unlock.svg';
|
||||
static const String assetsSelfTestResult =
|
||||
"assets/icons/functions_icons/automation_functions/self_test_result.svg";
|
||||
'assets/icons/functions_icons/automation_functions/self_test_result.svg';
|
||||
static const String assetsPresence =
|
||||
"assets/icons/functions_icons/automation_functions/presence.svg";
|
||||
'assets/icons/functions_icons/automation_functions/presence.svg';
|
||||
static const String assetsMotion =
|
||||
"assets/icons/functions_icons/automation_functions/motion.svg";
|
||||
'assets/icons/functions_icons/automation_functions/motion.svg';
|
||||
static const String assetsCurrentTemp =
|
||||
"assets/icons/functions_icons/automation_functions/current_temp.svg";
|
||||
'assets/icons/functions_icons/automation_functions/current_temp.svg';
|
||||
static const String assetsPresenceState =
|
||||
"assets/icons/functions_icons/automation_functions/presence_state.svg";
|
||||
'assets/icons/functions_icons/automation_functions/presence_state.svg';
|
||||
//assets/icons/routine/automation.svg
|
||||
static const String automation = 'assets/icons/routine/automation.svg';
|
||||
static const String searchIconUser = 'assets/icons/search_icon_user.svg';
|
||||
|
@ -22,13 +22,13 @@ class StringsManager {
|
||||
static const String on = 'ON';
|
||||
static const String off = 'OFF';
|
||||
static const String timer = 'Timer';
|
||||
static const String dimmerAndColor = "Dimmer & color";
|
||||
static const String recentlyUsed = "Recently used colors";
|
||||
static const String lightingModes = "Lighting modes";
|
||||
static const String doze = "Doze";
|
||||
static const String relax = "Relax";
|
||||
static const String reading = "Reading";
|
||||
static const String energizing = "Energizing";
|
||||
static const String dimmerAndColor = 'Dimmer & color';
|
||||
static const String recentlyUsed = 'Recently used colors';
|
||||
static const String lightingModes = 'Lighting modes';
|
||||
static const String doze = 'Doze';
|
||||
static const String relax = 'Relax';
|
||||
static const String reading = 'Reading';
|
||||
static const String energizing = 'Energizing';
|
||||
static const String createScene = 'Create Scene';
|
||||
static const String tapToRun = 'Launch: Tap - To - Run';
|
||||
static const String turnOffAllLights =
|
||||
@ -36,8 +36,8 @@ class StringsManager {
|
||||
static const String whenDeviceStatusChanges = 'When device status changes';
|
||||
static const String whenUnusualActivityIsDetected =
|
||||
'Example: when an unusual activity is detected.';
|
||||
static const String functions = "Functions";
|
||||
static const String firstLaunch = "firstLaunch";
|
||||
static const String functions = 'Functions';
|
||||
static const String firstLaunch = 'firstLaunch';
|
||||
static const String deleteScene = 'Delete Scene';
|
||||
static const String deleteAutomation = 'Delete Automation';
|
||||
static const String projectKey = 'selected_project_uuid';
|
||||
|
@ -43,20 +43,20 @@ enum DeviceType {
|
||||
*/
|
||||
|
||||
Map<String, DeviceType> devicesTypesMap = {
|
||||
"AC": DeviceType.AC,
|
||||
"GW": DeviceType.Gateway,
|
||||
"CPS": DeviceType.CeilingSensor,
|
||||
"DL": DeviceType.DoorLock,
|
||||
"WPS": DeviceType.WallSensor,
|
||||
"3G": DeviceType.ThreeGang,
|
||||
"2G": DeviceType.TwoGang,
|
||||
"1G": DeviceType.OneGang,
|
||||
"CUR": DeviceType.Curtain,
|
||||
"WH": DeviceType.WH,
|
||||
'AC': DeviceType.AC,
|
||||
'GW': DeviceType.Gateway,
|
||||
'CPS': DeviceType.CeilingSensor,
|
||||
'DL': DeviceType.DoorLock,
|
||||
'WPS': DeviceType.WallSensor,
|
||||
'3G': DeviceType.ThreeGang,
|
||||
'2G': DeviceType.TwoGang,
|
||||
'1G': DeviceType.OneGang,
|
||||
'CUR': DeviceType.Curtain,
|
||||
'WH': DeviceType.WH,
|
||||
'DS': DeviceType.DoorSensor,
|
||||
"1GT": DeviceType.OneGang,
|
||||
"2GT": DeviceType.TwoGang,
|
||||
"3GT": DeviceType.ThreeGang,
|
||||
'1GT': DeviceType.OneGang,
|
||||
'2GT': DeviceType.TwoGang,
|
||||
'3GT': DeviceType.ThreeGang,
|
||||
'GD': DeviceType.GarageDoor,
|
||||
'WL': DeviceType.WaterLeak,
|
||||
'NCPS': DeviceType.NCPS,
|
||||
|
@ -22,14 +22,14 @@ extension BuildContextExt on BuildContext {
|
||||
required VoidCallback onConfirm,
|
||||
VoidCallback? onDismiss,
|
||||
bool? hideConfirmButton,
|
||||
final double? dialogWidth,
|
||||
double? dialogWidth,
|
||||
TextStyle? titleStyle,
|
||||
String? onDismissText,
|
||||
String? onConfirmText,
|
||||
Color? onDismissColor,
|
||||
Color? onConfirmColor,
|
||||
}) {
|
||||
showDialog(
|
||||
showDialog<void>(
|
||||
context: this,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
@ -74,58 +74,59 @@ extension BuildContextExt on BuildContext {
|
||||
width: double.infinity,
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
hideConfirmButton != true
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: onDismiss ??
|
||||
() {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Center(
|
||||
child: Text(
|
||||
onDismissText ?? 'Cancel',
|
||||
style: context.textTheme.bodyMedium!.copyWith(
|
||||
color: onDismissColor ??
|
||||
ColorsManager.greyColor),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 50,
|
||||
width: 1,
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: onConfirm,
|
||||
child: Center(
|
||||
child: Text(
|
||||
onConfirmText ?? 'Confirm',
|
||||
style: context.textTheme.bodyMedium!.copyWith(
|
||||
color: onConfirmColor ??
|
||||
ColorsManager.primaryColorWithOpacity),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
||||
child: GestureDetector(
|
||||
onTap: onDismiss ??
|
||||
() {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Cancel',
|
||||
style: context.textTheme.bodyMedium!
|
||||
.copyWith(color: ColorsManager.greyColor),
|
||||
),
|
||||
if (hideConfirmButton != true)
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: onDismiss ??
|
||||
() {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Center(
|
||||
child: Text(
|
||||
onDismissText ?? 'Cancel',
|
||||
style: context.textTheme.bodyMedium!.copyWith(
|
||||
color:
|
||||
onDismissColor ?? ColorsManager.greyColor),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 50,
|
||||
width: 1,
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: onConfirm,
|
||||
child: Center(
|
||||
child: Text(
|
||||
onConfirmText ?? 'Confirm',
|
||||
style: context.textTheme.bodyMedium!.copyWith(
|
||||
color: onConfirmColor ??
|
||||
ColorsManager.primaryColorWithOpacity),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
else
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
||||
child: GestureDetector(
|
||||
onTap: onDismiss ??
|
||||
() {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Cancel',
|
||||
style: context.textTheme.bodyMedium!
|
||||
.copyWith(color: ColorsManager.greyColor),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -5,8 +5,8 @@ String formatDateTime(DateTime? dateTime) {
|
||||
if (dateTime == null) {
|
||||
return '-';
|
||||
}
|
||||
final DateFormat dateFormatter = DateFormat('dd/MM/yyyy');
|
||||
final DateFormat timeFormatter = DateFormat('HH:mm');
|
||||
final dateFormatter = DateFormat('dd/MM/yyyy');
|
||||
final timeFormatter = DateFormat('HH:mm');
|
||||
|
||||
return '${dateFormatter.format(dateTime)} ${timeFormatter.format(dateTime)}';
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import 'dart:convert';
|
||||
|
||||
String decodeBase64(String str) {
|
||||
//'-', '+' 62nd char of encoding, '_', '/' 63rd char of encoding
|
||||
String output = str.replaceAll('-', '+').replaceAll('_', '/');
|
||||
var output = str.replaceAll('-', '+').replaceAll('_', '/');
|
||||
switch (output.length % 4) {
|
||||
// Pad with trailing '='
|
||||
case 0: // No pad chars in this case
|
||||
|
@ -1,52 +1,52 @@
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
class SharedPreferencesHelper {
|
||||
static saveStringToSP(String key, String value) async {
|
||||
static Future<void> saveStringToSP(String key, String value) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setString(key, value);
|
||||
}
|
||||
|
||||
static saveBoolToSP(String key, bool value) async {
|
||||
static Future<void> saveBoolToSP(String key, bool value) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setBool(key, value);
|
||||
}
|
||||
|
||||
static saveIntToSP(String key, int value) async {
|
||||
static Future<void> saveIntToSP(String key, int value) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setInt(key, value);
|
||||
}
|
||||
|
||||
static saveDoubleToSP(String key, double value) async {
|
||||
static Future<void> saveDoubleToSP(String key, double value) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setDouble(key, value);
|
||||
}
|
||||
|
||||
static saveStringListToSP(String key, List<String> value) async {
|
||||
static Future<void> saveStringListToSP(String key, List<String> value) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setStringList(key, value);
|
||||
}
|
||||
|
||||
static Future<String> readStringFromSP(String key) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
String value = prefs.getString(key) ?? '';
|
||||
final value = prefs.getString(key) ?? '';
|
||||
return value;
|
||||
}
|
||||
|
||||
static Future<bool?> readBoolFromSP(String key) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
bool? value = prefs.getBool(key);
|
||||
final value = prefs.getBool(key);
|
||||
return value;
|
||||
}
|
||||
|
||||
static Future<int> readIntFromSP(String key) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
int value = prefs.getInt(key) ?? 0;
|
||||
final value = prefs.getInt(key) ?? 0;
|
||||
return value;
|
||||
}
|
||||
|
||||
static Future<List<String>> readStringListFromSP(String key) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
List<String>? value = prefs.getStringList(key) ?? [];
|
||||
final value = prefs.getStringList(key) ?? [];
|
||||
return value;
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,3 @@ class NavigationService {
|
||||
static GlobalKey<ScaffoldMessengerState>? snackbarKey =
|
||||
GlobalKey<ScaffoldMessengerState>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@ import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/navigation_service.dart';
|
||||
|
||||
class CustomSnackBar {
|
||||
static displaySnackBar(String message) {
|
||||
static void displaySnackBar(String message) {
|
||||
final key = NavigationService.snackbarKey;
|
||||
if (key != null) {
|
||||
final snackBar = SnackBar(content: Text(message));
|
||||
@ -12,9 +12,9 @@ class CustomSnackBar {
|
||||
}
|
||||
}
|
||||
|
||||
static redSnackBar(String message) {
|
||||
static void redSnackBar(String message) {
|
||||
final key = NavigationService.snackbarKey;
|
||||
BuildContext? currentContext = key?.currentContext;
|
||||
final currentContext = key?.currentContext;
|
||||
if (key != null && currentContext != null) {
|
||||
final snackBar = SnackBar(
|
||||
padding: const EdgeInsets.all(16),
|
||||
@ -30,10 +30,8 @@ class CustomSnackBar {
|
||||
),
|
||||
Text(
|
||||
message,
|
||||
style: Theme.of(currentContext)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.green),
|
||||
style: Theme.of(currentContext).textTheme.bodySmall!.copyWith(
|
||||
fontSize: 14, fontWeight: FontWeight.w500, color: Colors.green),
|
||||
)
|
||||
]),
|
||||
);
|
||||
@ -41,9 +39,9 @@ class CustomSnackBar {
|
||||
}
|
||||
}
|
||||
|
||||
static greenSnackBar(String message) {
|
||||
static void greenSnackBar(String message) {
|
||||
final key = NavigationService.snackbarKey;
|
||||
BuildContext? currentContext = key?.currentContext;
|
||||
final currentContext = key?.currentContext;
|
||||
if (key != null && currentContext != null) {
|
||||
final snackBar = SnackBar(
|
||||
padding: const EdgeInsets.all(16),
|
||||
@ -59,10 +57,8 @@ class CustomSnackBar {
|
||||
),
|
||||
Text(
|
||||
message,
|
||||
style: Theme.of(currentContext)
|
||||
.textTheme
|
||||
.bodySmall!
|
||||
.copyWith(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.green),
|
||||
style: Theme.of(currentContext).textTheme.bodySmall!.copyWith(
|
||||
fontSize: 14, fontWeight: FontWeight.w500, color: Colors.green),
|
||||
)
|
||||
]),
|
||||
);
|
||||
|
@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
|
||||
import 'color_manager.dart';
|
||||
|
||||
InputDecoration? textBoxDecoration({bool suffixIcon = false, double radios = 8}) =>
|
||||
InputDecoration? textBoxDecoration(
|
||||
{bool suffixIcon = false, double radios = 8}) =>
|
||||
InputDecoration(
|
||||
focusColor: ColorsManager.grayColor,
|
||||
suffixIcon: suffixIcon ? const Icon(Icons.search) : null,
|
||||
@ -34,7 +34,7 @@ InputDecoration? textBoxDecoration({bool suffixIcon = false, double radios = 8})
|
||||
BoxDecoration containerDecoration = BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.3),
|
||||
color: Colors.grey.withValues(alpha: 0.3),
|
||||
spreadRadius: 2,
|
||||
blurRadius: 4,
|
||||
offset: const Offset(0, 5), // changes position of shadow
|
||||
@ -46,7 +46,7 @@ BoxDecoration containerDecoration = BoxDecoration(
|
||||
BoxDecoration containerWhiteDecoration = BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.3),
|
||||
color: Colors.grey.withValues(alpha: 0.3),
|
||||
spreadRadius: 2,
|
||||
blurRadius: 4,
|
||||
offset: const Offset(0, 5), // changes position of shadow
|
||||
@ -59,7 +59,7 @@ BoxDecoration subSectionContainerDecoration = BoxDecoration(
|
||||
color: ColorsManager.whiteColors,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
color: Colors.black.withValues(alpha: 0.1),
|
||||
blurRadius: 10,
|
||||
spreadRadius: 1,
|
||||
offset: const Offset(0, 2),
|
||||
@ -70,7 +70,7 @@ BoxDecoration subSectionContainerDecoration = BoxDecoration(
|
||||
final secondarySection = BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
color: Colors.black.withValues(alpha: 0.1),
|
||||
spreadRadius: 1,
|
||||
blurRadius: 7,
|
||||
offset: const Offset(0, 10),
|
||||
|
@ -34,7 +34,7 @@ final myTheme = ThemeData(
|
||||
}),
|
||||
trackColor: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.selected)) {
|
||||
return ColorsManager.blueColor.withOpacity(0.5);
|
||||
return ColorsManager.blueColor.withValues(alpha: 0.5);
|
||||
}
|
||||
return ColorsManager.whiteColors;
|
||||
}),
|
||||
|
@ -1,10 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:syncrow_web/pages/auth/bloc/auth_bloc.dart';
|
||||
import 'package:syncrow_web/pages/auth/model/user_model.dart';
|
||||
import 'package:syncrow_web/pages/common/bloc/project_manager.dart';
|
||||
import 'package:syncrow_web/pages/common/buttons/default_button.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
@ -66,9 +64,9 @@ class _UserDropdownMenuState extends State<UserDropdownMenu> {
|
||||
}
|
||||
|
||||
Future<void> _showPopupMenu(BuildContext context) async {
|
||||
final RenderBox overlay =
|
||||
Overlay.of(context).context.findRenderObject() as RenderBox;
|
||||
final RelativeRect position = RelativeRect.fromRect(
|
||||
final overlay =
|
||||
Overlay.of(context).context.findRenderObject()! as RenderBox;
|
||||
final position = RelativeRect.fromRect(
|
||||
Rect.fromLTRB(
|
||||
overlay.size.width,
|
||||
75,
|
||||
@ -106,7 +104,7 @@ class _UserDropdownMenuState extends State<UserDropdownMenu> {
|
||||
child: ListTile(
|
||||
leading: SvgPicture.asset(Assets.userManagement),
|
||||
title: Text(
|
||||
"User Management",
|
||||
'User Management',
|
||||
style: context.textTheme.bodyMedium,
|
||||
),
|
||||
),
|
||||
@ -255,7 +253,7 @@ class _UserDropdownMenuState extends State<UserDropdownMenu> {
|
||||
child: ListTile(
|
||||
leading: SvgPicture.asset(Assets.signOut),
|
||||
title: Text(
|
||||
"Log Out",
|
||||
'Log Out',
|
||||
style: context.textTheme.bodyMedium,
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user