mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 01:35:23 +00:00
73 lines
2.4 KiB
Dart
73 lines
2.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_bloc.dart';
|
|
import 'package:syncrow_app/features/devices/bloc/acs_bloc/acs_state.dart';
|
|
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
|
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/text_widgets/body_large.dart';
|
|
import 'package:syncrow_app/utils/context_extension.dart';
|
|
import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
|
|
|
|
import 'package:syncrow_app/generated/assets.dart';
|
|
|
|
class ACTempWidget extends StatelessWidget {
|
|
const ACTempWidget(
|
|
this.deviceModel, {
|
|
super.key,
|
|
});
|
|
|
|
final DeviceModel deviceModel;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BlocBuilder<ACsBloc, AcsState>(
|
|
builder: (context, state) {
|
|
return DefaultContainer(
|
|
height: 60,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
children: <Widget>[
|
|
SizedBox.square(
|
|
dimension: 24,
|
|
child: InkWell(
|
|
onTap: () {
|
|
// DevicesCubit.getInstance()
|
|
// .setACTemp(DeviceModel, DeviceModel.temperature - 0.5);
|
|
},
|
|
child: SvgPicture.asset(
|
|
Assets.assetsIconsMinus,
|
|
),
|
|
),
|
|
),
|
|
BodyLarge(
|
|
// text: "${DeviceModel.temperature}° C",
|
|
text: '25 °C',
|
|
style: context.bodyLarge.copyWith(
|
|
color: ColorsManager.primaryColor.withOpacity(0.6),
|
|
fontSize: 23,
|
|
),
|
|
),
|
|
SizedBox.square(
|
|
dimension: 24,
|
|
child: InkWell(
|
|
onTap: () {
|
|
// DevicesCubit.getInstance()
|
|
// .setACTemp(DeviceModel, DeviceModel.temperature + 0.5);
|
|
},
|
|
child: SvgPicture.asset(
|
|
Assets.assetsIconsPlus,
|
|
height: 24,
|
|
width: 24,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|