SpacingWidgetBuilder typedef
SpacingWidgetBuilder =
Widget Function(BuildContext context, List<SpacingType> spacingTypes)
A widget builder for creating certain spacing after widgets.
This spacing can be in the form of any widgets you like.
A List of SpacingType is provided to help inform the decision of what to build after the message (thread, difference in time between current and last message, default spacing, etc).
Example:
MessageListView(
spacingWidgetBuilder: (context, list) {
if(list.contains(SpacingType.defaultSpacing)) {
return SizedBox(height: 2.0,);
} else {
return SizedBox(height: 8.0,);
}
},
),
```dart
Implementation
typedef SpacingWidgetBuilder = Widget Function(
BuildContext context,
List<SpacingType> spacingTypes,
);