diff --git a/assets/icons/doorlock-assets/lockIcon.svg b/assets/icons/doorlock-assets/lockIcon.svg new file mode 100644 index 0000000..a78161c --- /dev/null +++ b/assets/icons/doorlock-assets/lockIcon.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/lib/features/devices/view/widgets/smart_door/door_button.dart b/lib/features/devices/view/widgets/smart_door/door_button.dart index be26e07..610ffad 100644 --- a/lib/features/devices/view/widgets/smart_door/door_button.dart +++ b/lib/features/devices/view/widgets/smart_door/door_button.dart @@ -1,7 +1,4 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:syncrow_app/generated/assets.dart'; import 'package:syncrow_app/utils/context_extension.dart'; @@ -49,9 +46,9 @@ class _DoorLockButtonState extends State Widget build(BuildContext context) { return Padding( padding: EdgeInsets.only( - right: context.width * 0.3 / 2, - left: context.width * 0.3 / 2, - bottom: context.width * 0.35 / 2, + right: context.width * 0.25 / 2, + left: context.width * 0.25 / 2, + bottom: context.width * 0.2 / 2, ), child: InkWell( overlayColor: MaterialStateProperty.all( @@ -76,8 +73,8 @@ class _DoorLockButtonState extends State } }, child: Container( - width: context.width * 0.55, - height: context.width * 0.55, + width: context.width * 06, + height: context.width * 0.6, margin: const EdgeInsets.all(10), decoration: const BoxDecoration( boxShadow: [ @@ -91,27 +88,54 @@ class _DoorLockButtonState extends State color: Color(0xFFEBECED), borderRadius: BorderRadius.all(Radius.circular(999)), ), - child: Stack( - alignment: Alignment.center, - children: [ - Padding( - padding: const EdgeInsets.all(25), - child: SizedBox.expand( - child: CircularProgressIndicator( - value: _animation.value, - backgroundColor: Colors.transparent, - valueColor: const AlwaysStoppedAnimation( - ColorsManager.primaryColor, + child: Padding( + padding: const EdgeInsets.all(25), + child: Stack( + alignment: Alignment.center, + children: [ + Container( + margin: const EdgeInsets.all(8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(999), + boxShadow: [ + BoxShadow( + color: Colors.white.withOpacity(0.5), + blurRadius: 30, + offset: const Offset(-5, -5), + blurStyle: BlurStyle.outer, + ), + BoxShadow( + color: Colors.black.withOpacity(0.14), + blurRadius: 25, + offset: const Offset(5, 5), + blurStyle: BlurStyle.outer, + ), + BoxShadow( + color: Colors.black.withOpacity(0.14), + blurRadius: 30, + offset: const Offset(5, 5), + blurStyle: BlurStyle.inner, + ), + ], + ), + child: Center( + child: SvgPicture.asset( + Assets.doorlockAssetsLockIcon, ), - strokeWidth: 10, ), ), - ), - SvgPicture.asset( - Assets.doorlockAssetsDoorlockButtonTwo, - fit: BoxFit.fill, - ), - ], + SizedBox.expand( + child: CircularProgressIndicator( + value: _animation.value, + strokeWidth: 15, + backgroundColor: Colors.transparent, + valueColor: const AlwaysStoppedAnimation( + ColorsManager.primaryColor), + ), + ) + ], + ), ), ), ), diff --git a/lib/features/devices/view/widgets/smart_door/door_grid.dart b/lib/features/devices/view/widgets/smart_door/door_grid.dart index 8341192..24a36cd 100644 --- a/lib/features/devices/view/widgets/smart_door/door_grid.dart +++ b/lib/features/devices/view/widgets/smart_door/door_grid.dart @@ -47,10 +47,6 @@ class DoorLockGrid extends StatelessWidget { child: SvgPicture.asset( doorLockButtons[index]['image'] as String, ), - - // Image( - // image: AssetImage(doorLockButtons[index]['image'] as String), - // ), ), const SizedBox( height: 15, diff --git a/lib/generated/assets.dart b/lib/generated/assets.dart index 5c61311..9ac87d4 100644 --- a/lib/generated/assets.dart +++ b/lib/generated/assets.dart @@ -73,6 +73,8 @@ class Assets { 'assets/icons/doorlock-assets/doorlock-button-one.svg'; static const String doorlockAssetsDoorlockButtonTwo = 'assets/icons/doorlock-assets/doorlock-button-two.svg'; + static const String doorlockAssetsLockIcon = + 'assets/icons/doorlock-assets/lockIcon.svg'; static const String doorlockAssetsMembersManagement = 'assets/icons/doorlock-assets/members-management.svg'; static const String doorlockAssetsSmartLinkage =