build method

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

Builds the layout for the content item. This transforms the content into a Flutter Widget.

Implementation

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

  return GroupLayoutContainer(
    content: content,
    body: Container(
      height: maxScreenHeight,
      padding: const EdgeInsets.all(4.0),
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(4),
        border: Border.all(color: theme.colorScheme.outlineVariant),
      ),
      child: ListView.builder(
        itemCount: content.items.length,
        itemBuilder: (context, index) =>
            vyuh.content.buildContent(context, content.items[index]),
      ),
    ),
  );
}