mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 02:57:55 +00:00
Bug fixes
This commit is contained in:
@@ -160,19 +160,19 @@ class CeilingSensorInterface extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Flexible(child: BodySmall(text: 'Sports Para')),
|
||||
Flexible(
|
||||
child: BodyLarge(
|
||||
Flexible(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const BodySmall(text: 'Sports Para'),
|
||||
BodyLarge(
|
||||
text: '0',
|
||||
style: context.bodyLarge.copyWith(
|
||||
fontWeight: FontsManager.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
@@ -182,24 +182,23 @@ class CeilingSensorInterface extends StatelessWidget {
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Flexible(
|
||||
child: BodySmall(
|
||||
text: 'Detection Range',
|
||||
textOverflow: TextOverflow.ellipsis,
|
||||
)),
|
||||
Flexible(
|
||||
child: BodyLarge(
|
||||
Flexible(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const BodySmall(
|
||||
text: 'Detection Range',
|
||||
textOverflow: TextOverflow.ellipsis,
|
||||
),
|
||||
BodyLarge(
|
||||
text: '0.0M',
|
||||
textOverflow: TextOverflow.ellipsis,
|
||||
style: context.bodyLarge.copyWith(
|
||||
fontWeight: FontsManager.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
@@ -209,24 +208,23 @@ class CeilingSensorInterface extends StatelessWidget {
|
||||
color: ColorsManager.greyColor,
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Flexible(
|
||||
child: BodySmall(
|
||||
text: 'Movement',
|
||||
textOverflow: TextOverflow.ellipsis,
|
||||
)),
|
||||
Flexible(
|
||||
child: BodyLarge(
|
||||
Flexible(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const BodySmall(
|
||||
text: 'Movement',
|
||||
textOverflow: TextOverflow.ellipsis,
|
||||
),
|
||||
BodyLarge(
|
||||
text: 'none',
|
||||
textOverflow: TextOverflow.ellipsis,
|
||||
style: context.bodyLarge.copyWith(
|
||||
fontWeight: FontsManager.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
|
||||
@@ -55,7 +55,7 @@ class RoomPageSwitch extends StatelessWidget {
|
||||
Flexible(
|
||||
child: FittedBox(
|
||||
child: Text(
|
||||
device.name ?? "",
|
||||
device.type ?? "",
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 2,
|
||||
style: context.bodyLarge.copyWith(
|
||||
@@ -109,8 +109,7 @@ void showDeviceInterface(DeviceModel device, BuildContext context) {
|
||||
Navigator.push(
|
||||
context,
|
||||
PageRouteBuilder(
|
||||
pageBuilder: (context, animation1, animation2) => DoorInterface(doorLock: device))
|
||||
);
|
||||
pageBuilder: (context, animation1, animation2) => DoorInterface(doorLock: device)));
|
||||
// navigateToInterface(DoorInterface(doorlock: device), context);
|
||||
break;
|
||||
case DeviceType.Gateway:
|
||||
|
||||
@@ -48,6 +48,7 @@ class TimerScreen extends StatelessWidget {
|
||||
builder: (context, state) {
|
||||
Duration duration = Duration.zero;
|
||||
int countNum = 0;
|
||||
int tabNum = 0;
|
||||
if (state is UpdateTimerState) {
|
||||
countNum = state.seconds;
|
||||
} else if (state is TimerRunInProgress) {
|
||||
@@ -57,6 +58,10 @@ class TimerScreen extends StatelessWidget {
|
||||
} else if (state is LoadingNewSate) {
|
||||
countNum = 0;
|
||||
}
|
||||
|
||||
if (state is ChangeSlidingSegmentState) {
|
||||
tabNum = state.value;
|
||||
}
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
onPopInvoked: (didPop) {
|
||||
@@ -129,35 +134,38 @@ class TimerScreen extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
countNum > 0
|
||||
? BodyLarge(
|
||||
text: _formatDuration(countNum),
|
||||
fontColor: ColorsManager.slidingBlueColor,
|
||||
fontSize: 40,
|
||||
)
|
||||
: CupertinoTimerPicker(
|
||||
mode: CupertinoTimerPickerMode.hm,
|
||||
onTimerDurationChanged: (Duration newDuration) {
|
||||
duration = newDuration;
|
||||
},
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (state is LoadingNewSate) {
|
||||
return;
|
||||
}
|
||||
if (countNum > 0) {
|
||||
BlocProvider.of<ThreeGangBloc>(context).add(
|
||||
SetCounterValue(
|
||||
deviceCode: deviceCode, duration: Duration.zero));
|
||||
} else if (duration != Duration.zero) {
|
||||
BlocProvider.of<ThreeGangBloc>(context).add(
|
||||
SetCounterValue(
|
||||
deviceCode: deviceCode, duration: duration));
|
||||
}
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
countNum > 0 ? Assets.pauseIcon : Assets.playIcon))
|
||||
if (tabNum == 0)
|
||||
countNum > 0
|
||||
? BodyLarge(
|
||||
text: _formatDuration(countNum),
|
||||
fontColor: ColorsManager.slidingBlueColor,
|
||||
fontSize: 40,
|
||||
)
|
||||
: CupertinoTimerPicker(
|
||||
mode: CupertinoTimerPickerMode.hm,
|
||||
onTimerDurationChanged: (Duration newDuration) {
|
||||
duration = newDuration;
|
||||
},
|
||||
),
|
||||
if (tabNum == 0)
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (state is LoadingNewSate) {
|
||||
return;
|
||||
}
|
||||
if (countNum > 0) {
|
||||
BlocProvider.of<ThreeGangBloc>(context).add(
|
||||
SetCounterValue(
|
||||
deviceCode: deviceCode,
|
||||
duration: Duration.zero));
|
||||
} else if (duration != Duration.zero) {
|
||||
BlocProvider.of<ThreeGangBloc>(context).add(
|
||||
SetCounterValue(
|
||||
deviceCode: deviceCode, duration: duration));
|
||||
}
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
countNum > 0 ? Assets.pauseIcon : Assets.playIcon))
|
||||
],
|
||||
)));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user