unfocus fields when tapping button

Minor cleanup [skip ci]
This commit is contained in:
OmarHatem
2025-01-17 16:31:57 +02:00
parent 1f37f6b756
commit 2fb07dd5d4
2 changed files with 4 additions and 26 deletions
+4 -1
View File
@@ -91,7 +91,10 @@ class LoadingPrimaryButton extends StatelessWidget {
width: double.infinity,
height: 52.0,
child: TextButton(
onPressed: (isLoading || isDisabled) ? null : onPressed,
onPressed: (isLoading || isDisabled) ? null : () {
FocusScope.of(context).unfocus();
onPressed.call();
},
style: ButtonStyle(
backgroundColor:
MaterialStateProperty.all(isDisabled ? color.withOpacity(0.5) : color),