Skip to content

Conversation

@akhil-ge0rge
Copy link
Contributor

@akhil-ge0rge akhil-ge0rge commented Jan 17, 2026

Description

This PR introduces support for stacSliverVisibility by adding a new widget model and its corresponding parser.

Related Issues

Closes #418

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code refactor
  • Build configuration change
  • Documentation
  • Chore

Summary by CodeRabbit

Release Notes

  • New Features

    • Added SliverVisibility widget support, enabling conditional visibility control for slivers within scrollable layouts with optional replacement widgets
    • New interactive gallery example demonstrating SliverVisibility functionality and configuration
  • Documentation

    • Added comprehensive documentation page covering the SliverVisibility widget, including properties, behavior, and usage examples

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 17, 2026

📝 Walkthrough

Walkthrough

This PR adds complete support for Flutter's SliverVisibility widget to the STAC framework, including a new model class, JSON parser, documentation page, example usage, and registration in the framework's parser service.

Changes

Cohort / File(s) Summary
Documentation
docs/docs.json, docs/widgets/sliver_visibility.mdx
Added navigation entry for the new widget and created comprehensive documentation page describing SliverVisibility properties, behavior, and examples.
Example Gallery
examples/stac_gallery/assets/json/home_screen.json, examples/stac_gallery/assets/json/sliver_visibility_example.json
Added list tile entry for SliverVisibility demo and created example JSON configuration showing usage with CustomScrollView.
Core Widget Model
packages/stac_core/lib/foundation/specifications/widget_type.dart, packages/stac_core/lib/widgets/sliver_visibility/stac_sliver_visibility.dart, packages/stac_core/lib/widgets/sliver_visibility/stac_sliver_visibility.g.dart, packages/stac_core/lib/widgets/widgets.dart
Added sliverVisibility enum value, created StacSliverVisibility model class with properties (sliver, replacementSliver, visible, maintain\* flags), generated JSON serialization, and exported through barrel file.
Parser Implementation
packages/stac/lib/src/parsers/widgets/stac_sliver_visibility/stac_sliver_visibility_parser.dart, packages/stac/lib/src/parsers/widgets/widgets.dart, packages/stac/lib/src/framework/stac_service.dart
Implemented StacSliverVisibilityParser to convert STAC models to Flutter SliverVisibility widgets, exported parser, and registered in StacService's parser list.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • divyanshub024
  • Potatomonsta

Poem

🐰 A sliver so sly, now visible or shy,
Our STAC framework grows with wings that fly,
From model to parser, the journey's divine,
SliverVisibility shines in its rightful design! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new SliverVisibility widget with parser, example, and documentation.
Linked Issues check ✅ Passed The PR fully implements the requirement from issue #418: creates StacSliverVisibility as a StacWidget implementation of Flutter's SliverVisibility with complete supporting infrastructure.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing SliverVisibility support: widget model, parser, enum type, documentation, examples, and necessary exports.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: create StacWidget implementation of SliverVisibility

1 participant