diff --git a/packages/system/vyuh_core/lib/runtime/platform/default_platform_widget_builder.dart b/packages/system/vyuh_core/lib/runtime/platform/default_platform_widget_builder.dart index 5b30385e..750737a2 100644 --- a/packages/system/vyuh_core/lib/runtime/platform/default_platform_widget_builder.dart +++ b/packages/system/vyuh_core/lib/runtime/platform/default_platform_widget_builder.dart @@ -27,7 +27,7 @@ final defaultPlatformWidgetBuilder = PlatformWidgetBuilder( padding: EdgeInsets.all(8.0), child: Column( children: [ - CircularProgressIndicator(), + RepaintBoundary(child: CircularProgressIndicator()), PoweredByWidget(), ], ), @@ -123,9 +123,11 @@ class _DefaultRouteLoaderState extends State<_DefaultRouteLoader> { children: [ FractionallySizedBox( widthFactor: 0.5, - child: LinearProgressIndicator( - backgroundColor: progressColor.withOpacity(0.25), - color: progressColor, + child: RepaintBoundary( + child: LinearProgressIndicator( + backgroundColor: progressColor.withOpacity(0.25), + color: progressColor, + ), ), ), const PoweredByWidget(), diff --git a/packages/system/vyuh_feature_system/lib/content/group/grid_layout.dart b/packages/system/vyuh_feature_system/lib/content/group/grid_layout.dart index e1182af3..2befb5e8 100644 --- a/packages/system/vyuh_feature_system/lib/content/group/grid_layout.dart +++ b/packages/system/vyuh_feature_system/lib/content/group/grid_layout.dart @@ -15,10 +15,10 @@ final class GridGroupLayout extends LayoutConfiguration { @JsonKey(defaultValue: 1.0) final double aspectRatio; - final bool allowScroll; + final bool scrollable; GridGroupLayout( - {this.columns = 2, this.aspectRatio = 1.0, this.allowScroll = false}) + {this.columns = 2, this.aspectRatio = 1.0, this.scrollable = false}) : super(schemaType: schemaName); factory GridGroupLayout.fromJson(Map json) => @@ -30,7 +30,7 @@ final class GridGroupLayout extends LayoutConfiguration { final gridContent = GridView.builder( padding: EdgeInsets.zero, shrinkWrap: true, - physics: allowScroll + physics: scrollable ? const AlwaysScrollableScrollPhysics() : const NeverScrollableScrollPhysics(), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( @@ -56,7 +56,7 @@ final class GridGroupLayout extends LayoutConfiguration { padding: const EdgeInsets.only(left: 4.0, right: 4.0, bottom: 4.0), child: Text(content.description!, style: theme.textTheme.bodySmall), ), - if (allowScroll) Expanded(child: gridContent) else gridContent, + if (scrollable) Expanded(child: gridContent) else gridContent, ], ); } diff --git a/packages/system/vyuh_feature_system/lib/content/group/grid_layout.g.dart b/packages/system/vyuh_feature_system/lib/content/group/grid_layout.g.dart index 454ec544..1c24689a 100644 --- a/packages/system/vyuh_feature_system/lib/content/group/grid_layout.g.dart +++ b/packages/system/vyuh_feature_system/lib/content/group/grid_layout.g.dart @@ -10,5 +10,5 @@ GridGroupLayout _$GridGroupLayoutFromJson(Map json) => GridGroupLayout( columns: (json['columns'] as num?)?.toInt() ?? 2, aspectRatio: (json['aspectRatio'] as num?)?.toDouble() ?? 1.0, - allowScroll: json['allowScroll'] as bool? ?? false, + scrollable: json['scrollable'] as bool? ?? false, ); diff --git a/packages/system/vyuh_feature_system/lib/content/group/list_layout.dart b/packages/system/vyuh_feature_system/lib/content/group/list_layout.dart index c7290326..456bb862 100644 --- a/packages/system/vyuh_feature_system/lib/content/group/list_layout.dart +++ b/packages/system/vyuh_feature_system/lib/content/group/list_layout.dart @@ -23,27 +23,34 @@ final class ListGroupLayout extends LayoutConfiguration { @override Widget build(BuildContext context, Group content) { final theme = Theme.of(context); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - if (content.title != null) - Padding( - padding: const EdgeInsets.all(4.0), - child: Text(content.title!, style: theme.textTheme.titleMedium), - ), - if (content.description != null) - Padding( - padding: const EdgeInsets.only(left: 4.0, right: 4.0, bottom: 4.0), - child: Text(content.description!, style: theme.textTheme.bodySmall), - ), - Expanded( - child: ListView.builder( - itemCount: content.items.length, - itemBuilder: (context, index) => - vyuh.content.buildContent(context, content.items[index]), + final maxScreenHeight = MediaQuery.sizeOf(context).height * 0.8; + + return LimitedBox( + maxHeight: maxScreenHeight, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (content.title != null) + Padding( + padding: const EdgeInsets.all(4.0), + child: Text(content.title!, style: theme.textTheme.titleMedium), + ), + if (content.description != null) + Padding( + padding: + const EdgeInsets.only(left: 4.0, right: 4.0, bottom: 4.0), + child: + Text(content.description!, style: theme.textTheme.bodySmall), + ), + Expanded( + child: ListView.builder( + itemCount: content.items.length, + itemBuilder: (context, index) => + vyuh.content.buildContent(context, content.items[index]), + ), ), - ), - ], + ], + ), ); } }