feat(stac): re-export stac_core through stac package#455
Conversation
Users no longer need to depend on both stac and stac_core. The stac package now fully re-exports stac_core via stac.dart and provides a separate stac_core.dart entry point for pure-Dart files processed by the Stac CLI without requiring the Flutter SDK.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdds a pure-Dart Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
examples/movie_app/lib/widgets/movie_carousel/movie_carousel.dart (1)
2-2: Usepackage:stac/stac.dartfor consistency with the rest of the Flutter app.All other files in the movie_app import from
package:stac/stac.dart(main.dart, default_stac_options.dart, and movie_carousel_parser.dart), while this file usespackage:stac/stac_core.dart. Aligning this import with the rest of the app maintains consistency across the Flutter application.♻️ Suggested change
-import 'package:stac/stac_core.dart'; +import 'package:stac/stac.dart';🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@examples/movie_app/lib/widgets/movie_carousel/movie_carousel.dart` at line 2, Replace the inconsistent import in movie_carousel.dart: change the current import of package:stac/stac_core.dart to package:stac/stac.dart so it matches other app files (e.g., main.dart, default_stac_options.dart, movie_carousel_parser.dart); update the import statement in the top of movie_carousel.dart accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@examples/movie_app/lib/widgets/movie_carousel/movie_carousel.dart`:
- Line 2: Replace the inconsistent import in movie_carousel.dart: change the
current import of package:stac/stac_core.dart to package:stac/stac.dart so it
matches other app files (e.g., main.dart, default_stac_options.dart,
movie_carousel_parser.dart); update the import statement in the top of
movie_carousel.dart accordingly.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
examples/movie_app/pubspec.lockis excluded by!**/*.lockexamples/stac_gallery/pubspec.lockis excluded by!**/*.lock
📒 Files selected for processing (26)
examples/movie_app/lib/default_stac_options.dartexamples/movie_app/lib/widgets/movie_carousel/movie_carousel.dartexamples/movie_app/pubspec.yamlexamples/movie_app/stac/app_theme.dartexamples/movie_app/stac/detail_screen.dartexamples/movie_app/stac/home_screen.dartexamples/movie_app/stac/onboarding_screen.dartexamples/stac_gallery/pubspec.yamlpackages/stac/lib/src/framework/stac_service.dartpackages/stac/lib/src/parsers/actions/stac_set_value/stac_set_value_action_parser.dartpackages/stac/lib/src/parsers/core/stac_action_parser.dartpackages/stac/lib/src/parsers/core/stac_widget_parser.dartpackages/stac/lib/src/parsers/foundation/decoration/stac_box_decoration_parser.dartpackages/stac/lib/src/parsers/widgets/stac_app_bar/stac_app_bar_parser.dartpackages/stac/lib/src/parsers/widgets/stac_badge/stac_badge_parser.dartpackages/stac/lib/src/parsers/widgets/stac_container/stac_container_parser.dartpackages/stac/lib/src/parsers/widgets/stac_image/stac_image_parser_io.dartpackages/stac/lib/src/parsers/widgets/stac_image/stac_image_parser_stub.dartpackages/stac/lib/src/parsers/widgets/stac_image/stac_image_parser_web.dartpackages/stac/lib/src/parsers/widgets/stac_inkwell/stac_inkwell_parser.dartpackages/stac/lib/src/parsers/widgets/stac_linear_progress_indicator/stac_linear_progress_indicator_parser.dartpackages/stac/lib/src/parsers/widgets/stac_switch/stac_switch_parser.dartpackages/stac/lib/src/parsers/widgets/stac_tool_tip/stac_tool_tip_parser.dartpackages/stac/lib/stac.dartpackages/stac/lib/stac_core.dartpackages/stac_core/lib/core/core.dart
💤 Files with no reviewable changes (14)
- packages/stac/lib/src/parsers/widgets/stac_app_bar/stac_app_bar_parser.dart
- packages/stac/lib/src/parsers/widgets/stac_image/stac_image_parser_io.dart
- packages/stac/lib/src/parsers/foundation/decoration/stac_box_decoration_parser.dart
- packages/stac/lib/src/parsers/core/stac_widget_parser.dart
- packages/stac/lib/src/parsers/widgets/stac_container/stac_container_parser.dart
- packages/stac/lib/src/parsers/widgets/stac_tool_tip/stac_tool_tip_parser.dart
- packages/stac/lib/src/parsers/widgets/stac_inkwell/stac_inkwell_parser.dart
- packages/stac/lib/src/parsers/widgets/stac_switch/stac_switch_parser.dart
- packages/stac/lib/src/parsers/widgets/stac_image/stac_image_parser_stub.dart
- packages/stac/lib/src/parsers/widgets/stac_linear_progress_indicator/stac_linear_progress_indicator_parser.dart
- packages/stac/lib/src/parsers/widgets/stac_image/stac_image_parser_web.dart
- packages/stac/lib/src/parsers/widgets/stac_badge/stac_badge_parser.dart
- packages/stac/lib/src/parsers/core/stac_action_parser.dart
- packages/stac/lib/src/parsers/actions/stac_set_value/stac_set_value_action_parser.dart
…heme - Changed import from 'package:stac/stac_core.dart' to 'package:stac/stac.dart' in movie_carousel.dart. - Updated import from 'package:stac/stac.dart' to 'package:stac/stac_core.dart' in app_theme.dart to reflect recent re-exports.
Users no longer need to depend on both stac and stac_core. The stac package now fully re-exports stac_core via stac.dart and provides a separate stac_core.dart entry point for pure-Dart files processed by the Stac CLI without requiring the Flutter SDK.
Description
stac_corethroughpackage:stac/stac.dart, replacing the previousshow StacTheme-only export. Users now only need to depend on thestacpackage.package:stac/stac_core.dartas a pure-Dart entry point forstac/screen and theme files processed by the Stac CLI without the Flutter SDK.StacOptionsfrom thestac_corebarrel (core.dart) so it no longer requires a direct sub-path import.stac_coreas a direct dependency from example apps (movie_app,stac_gallery) and migrate their imports.stac_coreimports from internal parser files that already importstac.dart.Migration
import 'package:stac_core/stac_core.dart'withimport 'package:stac/stac_core.dart'instac/screen files (pure Dart, no Flutter).import 'package:stac_core/...'withimport 'package:stac/stac.dart'inlib/Flutter files.stac_corefrom yourpubspec.yamldependencies.Test plan
movie_appbuilds and runs correctly on iOS/Androidstac_gallerybuilds and runs correctlypackage:stac/stac_core.dartstac_coreimports in example appsRelated Issues
Closes #451
Type of Change
Summary by CodeRabbit
New Features
Refactor