mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00

changed the method of generating assets to be more declrative when it comes to names of the assets. it now include the file path name e.g (asset in the path "assets/images/home-images/home.png" will be generated as this "String assetsImagesHomeImageshome = "path" ". this will be very helpful in the future when we want to orgnize the assets dir.
60 lines
1.8 KiB
Dart
60 lines
1.8 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/devices_cubit.dart';
|
|
import 'package:syncrow_app/features/devices/model/device_model.dart';
|
|
import 'package:syncrow_app/features/devices/view/widgets/ACs/ac_mode_control_unit.dart';
|
|
import 'package:syncrow_app/features/shared_widgets/default_container.dart';
|
|
import 'package:syncrow_app/generated/assets.dart';
|
|
|
|
class AcInterfaceControls extends StatelessWidget {
|
|
const AcInterfaceControls({
|
|
super.key,
|
|
required this.deviceModel,
|
|
});
|
|
|
|
final DeviceModel deviceModel;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return BlocBuilder<DevicesCubit, DevicesState>(
|
|
builder: (context, state) {
|
|
return Column(
|
|
children: [
|
|
ACModeControlUnit(acDevice: deviceModel),
|
|
const SizedBox(height: 10),
|
|
Row(
|
|
children: [
|
|
Flexible(
|
|
child: InkWell(
|
|
onTap: () {},
|
|
child: DefaultContainer(
|
|
height: 55,
|
|
child: Center(
|
|
child:
|
|
SvgPicture.asset(Assets.assetsIconsAutomatedClock),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(width: 10),
|
|
Flexible(
|
|
child: InkWell(
|
|
onTap: () {},
|
|
child: DefaultContainer(
|
|
height: 55,
|
|
child: Center(
|
|
child: SvgPicture.asset(Assets.assetsIconsLock),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
)
|
|
],
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|