Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/stac_core/lib/annotations/annotations.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
library;

export 'stac_screen.dart';
20 changes: 20 additions & 0 deletions packages/stac_core/lib/annotations/stac_screen.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/// Annotation to mark methods that return StacWidget instances.
///
/// This annotation is used to identify screen-level widgets in the Stac framework.
/// Methods that return StacWidget should be annotated with this to indicate
/// they represent screen definitions.
///
/// Example usage:
/// ```dart
/// @StacScreen(screenName: 'home')
/// StacWidget buildHomeScreen() {
/// return StacWidget(jsonData: {'type': 'scaffold', 'body': '...'});
/// }
/// ```
class StacScreen {
/// Creates a [StacScreen] annotation with the given screen name.
const StacScreen({required this.screenName});

/// The name identifier for this screen.
final String screenName;
}
1 change: 1 addition & 0 deletions packages/stac_core/lib/core/core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ library;

export 'stac_action.dart';
export 'stac_widget.dart';
export '../annotations/annotations.dart';
1 change: 1 addition & 0 deletions packages/stac_core/lib/stac_core.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
library;

export 'actions/actions.dart';
export 'annotations/annotations.dart';
export 'core/core.dart';
export 'foundation/foundation.dart';
export 'widgets/widgets.dart';