FIX_search center alignment
This commit is contained in:
parent
f3443261f9
commit
613c8d3392
@ -51,6 +51,8 @@ class ThemedSearchField extends HookWidget {
|
|||||||
final boxDecoration = BoxDecoration(borderRadius: BorderRadius.circular(2));
|
final boxDecoration = BoxDecoration(borderRadius: BorderRadius.circular(2));
|
||||||
|
|
||||||
final inputDecoration = InputDecoration(
|
final inputDecoration = InputDecoration(
|
||||||
|
isDense: true,
|
||||||
|
contentPadding: const EdgeInsets.symmetric(horizontal: 15), // 2. Remove vertical padding to let it center
|
||||||
filled: true,
|
filled: true,
|
||||||
fillColor: backgroundColor ?? Colors.white,
|
fillColor: backgroundColor ?? Colors.white,
|
||||||
// contentPadding: const EdgeInsets.symmetric(vertical: 12, horizontal: 15),
|
// contentPadding: const EdgeInsets.symmetric(vertical: 12, horizontal: 15),
|
||||||
@ -99,8 +101,10 @@ class ThemedSearchField extends HookWidget {
|
|||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
onChanged: onChanged,
|
onChanged: onChanged,
|
||||||
|
textAlignVertical: TextAlignVertical.center, // 4. This centers the typing text and hint
|
||||||
decoration: inputDecoration,
|
decoration: inputDecoration,
|
||||||
validator: validator,
|
validator: validator,
|
||||||
|
style: GoogleFonts.poppins(fontSize: 12), // Keep text size appropriate for height 30
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user