push factory reset logic and call for all devices

This commit is contained in:
ashrafzarkanisala
2024-09-22 21:56:17 +03:00
parent 3a28f0ef9a
commit 2955533209
31 changed files with 481 additions and 35 deletions

View File

@ -6,36 +6,41 @@ import 'package:syncrow_web/utils/constants/assets.dart';
import 'package:syncrow_web/utils/extension/build_context_x.dart';
class FactoryResetWidget extends StatelessWidget {
const FactoryResetWidget({super.key, required String deviceId});
const FactoryResetWidget({super.key, required this.callFactoryReset});
final Null Function() callFactoryReset;
@override
Widget build(BuildContext context) {
return DeviceControlsContainer(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
ClipOval(
child: Container(
color: ColorsManager.whiteColors,
height: 60,
width: 60,
child: Padding(
padding: const EdgeInsets.all(12.0),
child: SvgPicture.asset(
Assets.factoryReset,
fit: BoxFit.cover,
child: GestureDetector(
onTap: callFactoryReset,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
ClipOval(
child: Container(
color: ColorsManager.whiteColors,
height: 60,
width: 60,
child: Padding(
padding: const EdgeInsets.all(12.0),
child: SvgPicture.asset(
Assets.factoryReset,
fit: BoxFit.cover,
),
),
)),
Text(
'Factory Reset',
style: context.textTheme.titleMedium!.copyWith(
fontWeight: FontWeight.w400,
color: ColorsManager.blackColor,
),
),
)),
Text(
'Factory Reset',
style: context.textTheme.titleMedium!.copyWith(
fontWeight: FontWeight.w400,
color: ColorsManager.blackColor,
),
),
],
],
),
),
);
}