formatted all files.

This commit is contained in:
Faris Armoush
2025-06-12 15:33:32 +03:00
parent 29959f567e
commit 04250ebc98
474 changed files with 5425 additions and 4338 deletions

View File

@ -4,7 +4,10 @@ import 'package:syncrow_web/utils/color_manager.dart';
class PresenceDisplayValue extends StatelessWidget {
const PresenceDisplayValue(
{super.key, required this.value, required this.postfix, required this.description});
{super.key,
required this.value,
required this.postfix,
required this.description});
final String value;
final String postfix;
@ -32,7 +35,9 @@ class PresenceDisplayValue extends StatelessWidget {
child: Text(
postfix,
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: ColorsManager.blackColor, fontSize: 16, fontWeight: FontWeight.w700),
color: ColorsManager.blackColor,
fontSize: 16,
fontWeight: FontWeight.w700),
),
),
],
@ -40,7 +45,9 @@ class PresenceDisplayValue extends StatelessWidget {
Text(
description,
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: ColorsManager.blackColor, fontWeight: FontWeight.w400, fontSize: 16),
color: ColorsManager.blackColor,
fontWeight: FontWeight.w400,
fontSize: 16),
),
],
),

View File

@ -1,10 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:syncrow_web/utils/constants/assets.dart';
import 'package:syncrow_web/utils/extension/build_context_x.dart';
import 'package:syncrow_web/pages/device_managment/ceiling_sensor/model/ceiling_sensor_model.dart';
import 'package:syncrow_web/pages/device_managment/shared/device_controls_container.dart';
import 'package:syncrow_web/utils/color_manager.dart';
import 'package:syncrow_web/pages/device_managment/ceiling_sensor/model/ceiling_sensor_model.dart';
import 'package:syncrow_web/utils/constants/assets.dart';
import 'package:syncrow_web/utils/extension/build_context_x.dart';
class PresenceSpaceType extends StatelessWidget {
const PresenceSpaceType({
@ -20,7 +20,7 @@ class PresenceSpaceType extends StatelessWidget {
@override
Widget build(BuildContext context) {
final Map<SpaceTypes, String> spaceTypeIcons = {
final spaceTypeIcons = <SpaceTypes, String>{
SpaceTypes.none: Assets.office,
SpaceTypes.parlour: Assets.parlour,
SpaceTypes.area: Assets.dyi,

View File

@ -4,7 +4,8 @@ import 'package:syncrow_web/pages/device_managment/shared/device_controls_contai
import 'package:syncrow_web/utils/color_manager.dart';
class PresenceStaticWidget extends StatelessWidget {
const PresenceStaticWidget({required this.icon, required this.description, super.key});
const PresenceStaticWidget(
{required this.icon, required this.description, super.key});
final String icon;
final String description;
@ -23,7 +24,9 @@ class PresenceStaticWidget extends StatelessWidget {
Text(
description,
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: ColorsManager.blackColor, fontWeight: FontWeight.w400, fontSize: 16),
color: ColorsManager.blackColor,
fontWeight: FontWeight.w400,
fontSize: 16),
),
],
),

View File

@ -25,7 +25,9 @@ class PresenceState extends StatelessWidget {
Text(
'Status:',
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: ColorsManager.blackColor, fontWeight: FontWeight.w400, fontSize: 10),
color: ColorsManager.blackColor,
fontWeight: FontWeight.w400,
fontSize: 10),
),
],
),
@ -41,7 +43,9 @@ class PresenceState extends StatelessWidget {
Text(
value,
style: Theme.of(context).textTheme.bodySmall!.copyWith(
color: ColorsManager.blackColor, fontWeight: FontWeight.w400, fontSize: 16),
color: ColorsManager.blackColor,
fontWeight: FontWeight.w400,
fontSize: 16),
),
],
),

View File

@ -48,7 +48,7 @@ class _PresenceUpdateDataState extends State<PresenceNoBodyTime> {
String _extractNumericValue(String value) {
if (value == 'none') return '0';
return value.replaceAll(RegExp(r'[a-zA-Z]'), '').trim();
return value.replaceAll(RegExp('[a-zA-Z]'), '').trim();
}
String _extractUnit(String value) {
@ -69,17 +69,17 @@ class _PresenceUpdateDataState extends State<PresenceNoBodyTime> {
}
void _incrementValue() {
int currentIndex = nobodyTimeRange.indexOf(_currentValue);
final currentIndex = nobodyTimeRange.indexOf(_currentValue);
if (currentIndex < nobodyTimeRange.length - 1) {
String newValue = nobodyTimeRange[currentIndex + 1];
final newValue = nobodyTimeRange[currentIndex + 1];
_onValueChanged(newValue);
}
}
void _decrementValue() {
int currentIndex = nobodyTimeRange.indexOf(_currentValue);
final currentIndex = nobodyTimeRange.indexOf(_currentValue);
if (currentIndex > 0) {
String newValue = nobodyTimeRange[currentIndex - 1];
final newValue = nobodyTimeRange[currentIndex - 1];
_onValueChanged(newValue);
}
}