build method

  1. @override
Widget build(
  1. BuildContext context,
  2. Group content
)
override

Builds the layout widget tree for the given content item.

This method is called by the content system to render the content item with the specified layout.

Implementation

@override
Widget build(BuildContext context, Group content) {
  final maxScreenHeight = MediaQuery.sizeOf(context).height * percentHeight;

  return GroupLayoutContainer(
    content: content,
    body: LimitedBox(
      maxHeight: maxScreenHeight,
      child: ListView.builder(
        padding: const EdgeInsets.all(4.0),
        itemCount: content.items.length,
        itemBuilder: (context, index) => VyuhBinding.instance.content
            .buildContent(context, content.items[index]),
      ),
    ),
  );
}