TF-2676 Fix lost button at the bottom of identity editor

This commit is contained in:
dab246
2024-07-24 19:10:23 +07:00
committed by Dat H. Pham
parent ef995d115b
commit cc814f4b89
@@ -120,14 +120,13 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
const SizedBox(height: 12), const SizedBox(height: 12),
if (controller.isMobile(context)) if (controller.isMobile(context))
_buildActionButtonMobile(context) _buildActionButtonMobile(context)
else
_buildActionButtonDesktop(context)
]), ]),
), ),
); );
if (PlatformInfo.isWeb) { if (PlatformInfo.isWeb) {
return GestureDetector( return PointerInterceptor(
child: GestureDetector(
onTap: () => controller.clearFocusEditor(context), onTap: () => controller.clearFocusEditor(context),
child: ResponsiveWidget( child: ResponsiveWidget(
responsiveUtils: controller.responsiveUtils, responsiveUtils: controller.responsiveUtils,
@@ -151,7 +150,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
), ),
child: Column(children: [ child: Column(children: [
_buildHeaderView(context), _buildHeaderView(context),
Expanded(child: PointerInterceptor(child: bodyCreatorView)) Expanded(child: bodyCreatorView)
]), ]),
), ),
), ),
@@ -161,7 +160,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
backgroundColor: Colors.white, backgroundColor: Colors.white,
body: Column(children: [ body: Column(children: [
_buildHeaderView(context), _buildHeaderView(context),
Expanded(child: PointerInterceptor(child: bodyCreatorView)) Expanded(child: bodyCreatorView)
]) ])
), ),
tablet: Scaffold( tablet: Scaffold(
@@ -185,7 +184,9 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
borderRadius: const BorderRadius.all(Radius.circular(16)), borderRadius: const BorderRadius.all(Radius.circular(16)),
child: Column(children: [ child: Column(children: [
_buildHeaderView(context), _buildHeaderView(context),
Expanded(child: PointerInterceptor(child: bodyCreatorView)) Expanded(child: bodyCreatorView),
const SizedBox(height: 12),
_buildActionButtonDesktop(context)
]) ])
) )
) )
@@ -212,7 +213,9 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
borderRadius: const BorderRadius.all(Radius.circular(16)), borderRadius: const BorderRadius.all(Radius.circular(16)),
child: Column(children: [ child: Column(children: [
_buildHeaderView(context), _buildHeaderView(context),
Expanded(child: PointerInterceptor(child: bodyCreatorView)) Expanded(child: bodyCreatorView),
const SizedBox(height: 12),
_buildActionButtonDesktop(context)
]) ])
) )
) )
@@ -220,6 +223,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
) )
) )
), ),
),
); );
} else { } else {
return ResponsiveWidget( return ResponsiveWidget(
@@ -344,7 +348,9 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
height: controller.responsiveUtils.getSizeScreenHeight(context) * 0.8, height: controller.responsiveUtils.getSizeScreenHeight(context) * 0.8,
child: Column(children: [ child: Column(children: [
_buildHeaderView(context), _buildHeaderView(context),
Expanded(child: bodyCreatorView) Expanded(child: bodyCreatorView),
const SizedBox(height: 12),
_buildActionButtonDesktop(context)
]) ])
) )
), ),
@@ -484,7 +490,9 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
} }
Widget _buildActionButtonDesktop(BuildContext context) { Widget _buildActionButtonDesktop(BuildContext context) {
return Row( return Padding(
padding: const EdgeInsetsDirectional.symmetric(vertical: 12, horizontal: 24),
child: Row(
children: [ children: [
Expanded(child: _buildCheckboxIdentityDefault(context)), Expanded(child: _buildCheckboxIdentityDefault(context)),
const SizedBox(width: 12), const SizedBox(width: 12),
@@ -492,6 +500,7 @@ class IdentityCreatorView extends GetWidget<IdentityCreatorController>
const SizedBox(width: 12), const SizedBox(width: 12),
_buildSaveButton(context, width: 156) _buildSaveButton(context, width: 156)
], ],
),
); );
} }