I have a DateTimeFormField
who's InkWell
height is way too much. I tried controlling it by putting a Container
with a fixed height above it but it didn't seem to do anything. I also tried it with a SizedBox
and still nothing. I do use a GridView.count
to build the fields side-by-side.
Here's my setup:
Expanded(
child: GridView.count(
crossAxisCount: 2,
padding: EdgeInsets.zero,
primary: false,
crossAxisSpacing: 10,
shrinkWrap: true,
children: formBloc.startEndTimeFields.map((field) {
return BlocBuilder(
bloc: field,
builder: (context, state) {
return Container(
height: 100,
child: DateTimeFormField(
formatter: DateFormat("HH:mm a"),
onlyTime: true,
label: "",
initialValue: DateTime.now(),
onSaved: (value) {
field.updateValue(value);
},
),
);
},
);
}).toList(),
),
),
I have a picture with the InkWell
clicked on to show you what it looks like.