I have some kind of schedule table with hours by days
Widget _buildSchedule(ScheduleLoaded state) {
final List<Widget> days = state.range.days.map((DateTime day) {
return Column(
children:
_buildTimeSlots(day, state.timeSlots.toList()),
);
}).toList();
return ListView( scrollDirection: Axis.horizontal, children: days);
}
Now I'm trying to make it scrollable by verticale as well (separately by day or all screen)
Widget _buildSchedule(ScheduleLoaded state) {
final List<Widget> days = state.range.days.map((DateTime day) {
return ListView(
shrinkWrap: true,
physics: ClampingScrollPhysics(),
children: _buildTimeSlots(day, state.timeSlots.toList())
);
}).toList();
return ListView( scrollDirection: Axis.horizontal, children: days);
}
According to related answers on SO nested ListView with shrinkWrap
and ClampingScrollPhysics
should work, but the second version can't be rendered with error 'constraints.hasBoundedWidth': is not true.