TF-1993 Fix has attachment checkbox is overflow once it be translated in russia
(cherry picked from commit 2987d29e261a8aa0f8bf79a9394cc2050d6c68c7)
This commit is contained in:
+31
-53
@@ -1,4 +1,7 @@
|
|||||||
import 'package:core/core.dart';
|
import 'package:core/presentation/extensions/color_extension.dart';
|
||||||
|
import 'package:core/presentation/utils/responsive_utils.dart';
|
||||||
|
import 'package:core/presentation/views/button/icon_button_web.dart';
|
||||||
|
import 'package:core/presentation/views/checkbox/labeled_checkbox.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -21,44 +24,26 @@ class AdvancedSearchFilterFormBottomView extends GetWidget<AdvancedFilterControl
|
|||||||
final responsiveUtils = Get.find<ResponsiveUtils>();
|
final responsiveUtils = Get.find<ResponsiveUtils>();
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(top: !responsiveUtils.isWebDesktop(context) ? 8 : 20),
|
||||||
top: _isMobileAndLandscapeTablet(context, responsiveUtils) ? 8 : 20),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (_isMobileAndLandscapeTablet(context, responsiveUtils))
|
Transform(
|
||||||
...[
|
transform: Matrix4.translationValues(-8.0, 0.0, 0.0),
|
||||||
_buildCheckboxHasAttachment(
|
child: _buildCheckboxHasAttachment(
|
||||||
context,
|
context,
|
||||||
currentFocusNode: focusManager?.attachmentCheckboxFocusNode,
|
currentFocusNode: focusManager?.attachmentCheckboxFocusNode,
|
||||||
nextFocusNode: focusManager?.searchButtonFocusNode),
|
nextFocusNode: focusManager?.searchButtonFocusNode),
|
||||||
const SizedBox(height: 24)
|
|
||||||
],
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: _isMobileAndLandscapeTablet(context, responsiveUtils)
|
|
||||||
? MainAxisAlignment.spaceEvenly
|
|
||||||
: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
if (!_isMobileAndLandscapeTablet(context, responsiveUtils))
|
|
||||||
Expanded(child: _buildCheckboxHasAttachment(
|
|
||||||
context,
|
|
||||||
currentFocusNode: focusManager?.attachmentCheckboxFocusNode,
|
|
||||||
nextFocusNode: focusManager?.searchButtonFocusNode)),
|
|
||||||
..._buildListButton(context, responsiveUtils),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
_buildListButton(context, responsiveUtils),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _buildListButton(
|
Widget _buildListButton(BuildContext context, ResponsiveUtils responsiveUtils) {
|
||||||
BuildContext context,
|
if (!responsiveUtils.isWebDesktop(context)) {
|
||||||
ResponsiveUtils responsiveUtils
|
return Row(children: [
|
||||||
) {
|
|
||||||
if (_isMobileAndLandscapeTablet(context, responsiveUtils)) {
|
|
||||||
return [
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: _buildButton(
|
child: _buildButton(
|
||||||
onAction: () {
|
onAction: () {
|
||||||
@@ -88,15 +73,16 @@ class AdvancedSearchFilterFormBottomView extends GetWidget<AdvancedFilterControl
|
|||||||
nextFocusNode: focusManager?.fromFieldFocusNode
|
nextFocusNode: focusManager?.fromFieldFocusNode
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
];
|
]);
|
||||||
} else {
|
} else {
|
||||||
return [
|
return Row(children: [
|
||||||
|
const Spacer(),
|
||||||
_buildButton(
|
_buildButton(
|
||||||
onAction: () {
|
onAction: () {
|
||||||
controller.cleanSearchFilter(context);
|
controller.cleanSearchFilter(context);
|
||||||
popBack();
|
popBack();
|
||||||
},
|
},
|
||||||
colorButton: Colors.white,
|
colorButton: Colors.transparent,
|
||||||
colorText: AppColor.colorContentEmail,
|
colorText: AppColor.colorContentEmail,
|
||||||
text: AppLocalizations.of(context).clearFilter,
|
text: AppLocalizations.of(context).clearFilter,
|
||||||
context: context,
|
context: context,
|
||||||
@@ -118,7 +104,7 @@ class AdvancedSearchFilterFormBottomView extends GetWidget<AdvancedFilterControl
|
|||||||
currentFocusNode: focusManager?.searchButtonFocusNode,
|
currentFocusNode: focusManager?.searchButtonFocusNode,
|
||||||
nextFocusNode: focusManager?.fromFieldFocusNode
|
nextFocusNode: focusManager?.fromFieldFocusNode
|
||||||
),
|
),
|
||||||
];
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,25 +156,17 @@ class AdvancedSearchFilterFormBottomView extends GetWidget<AdvancedFilterControl
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: buildButtonWrapText(
|
child: buildButtonWrapText(
|
||||||
text,
|
text,
|
||||||
focusNode: currentFocusNode,
|
focusNode: currentFocusNode,
|
||||||
radius: 10,
|
radius: 10,
|
||||||
height: 44,
|
height: 44,
|
||||||
minWidth: minWidth,
|
minWidth: minWidth,
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
color: colorText,
|
color: colorText,
|
||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
bgColor: colorButton,
|
bgColor: colorButton,
|
||||||
onTap: onAction),
|
onTap: onAction),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _isMobileAndLandscapeTablet(
|
|
||||||
BuildContext context,
|
|
||||||
ResponsiveUtils responsive
|
|
||||||
) {
|
|
||||||
return responsive.isMobile(context) ||
|
|
||||||
responsive.landscapeTabletSupported(context);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+24
-25
@@ -21,31 +21,30 @@ class AdvancedSearchFilterOverlay extends StatelessWidget {
|
|||||||
return PointerInterceptor(
|
return PointerInterceptor(
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||||
child: Padding(
|
child: Container(
|
||||||
padding: const EdgeInsets.only(top: 4, bottom: 16, right: 22),
|
constraints: BoxConstraints(
|
||||||
child: Container(
|
maxHeight: _getHeightOverlay(context, responsiveUtils),
|
||||||
constraints: BoxConstraints(
|
),
|
||||||
maxHeight: _getHeightOverlay(context, responsiveUtils),
|
width: maxWidth ?? 660,
|
||||||
),
|
margin: const EdgeInsetsDirectional.only(top: 4, bottom: 16, end: 22),
|
||||||
width: maxWidth ?? 660,
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
padding: const EdgeInsets.all(32),
|
decoration: BoxDecoration(
|
||||||
decoration: BoxDecoration(
|
color: Colors.white,
|
||||||
color: Colors.white,
|
borderRadius: BorderRadius.circular(16),
|
||||||
borderRadius: BorderRadius.circular(16),
|
boxShadow: const [
|
||||||
boxShadow: const [
|
BoxShadow(
|
||||||
BoxShadow(
|
color: AppColor.colorShadowComposer,
|
||||||
color: AppColor.colorShadowComposer,
|
blurRadius: 32,
|
||||||
blurRadius: 32,
|
offset: Offset.zero),
|
||||||
offset: Offset.zero),
|
BoxShadow(
|
||||||
BoxShadow(
|
color: AppColor.colorDropShadow,
|
||||||
color: AppColor.colorDropShadow,
|
blurRadius: 4,
|
||||||
blurRadius: 4,
|
offset: Offset.zero),
|
||||||
offset: Offset.zero),
|
]
|
||||||
]),
|
),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
padding: const EdgeInsets.only(right: 16),
|
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 24),
|
||||||
child: AdvancedSearchInputForm(),
|
child: AdvancedSearchInputForm(),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user