generateWidget method
Implementation
@override
Widget generateWidget(DragAndDropBuilderParameters params) {
var contents = <Widget>[];
if (header != null) {
contents.add(Flexible(child: header!));
}
Widget intrinsicHeight = IntrinsicHeight(
child: Row(
mainAxisAlignment: horizontalAlignment,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: _generateDragAndDropListInnerContents(params),
),
);
if (params.axis == Axis.horizontal) {
intrinsicHeight = SizedBox(
width: params.listWidth,
child: intrinsicHeight,
);
}
if (params.listInnerDecoration != null) {
intrinsicHeight = Container(
decoration: params.listInnerDecoration,
child: intrinsicHeight,
);
}
contents.add(intrinsicHeight);
if (footer != null) {
contents.add(Flexible(child: footer!));
}
return Container(
key: key,
width: params.axis == Axis.vertical
? double.infinity
: params.listWidth - params.listPadding!.horizontal,
decoration: decoration ?? params.listDecoration,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: verticalAlignment,
children: contents,
),
);
}