-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Missing export: ActivityState class is not publicly accessible
Description
The ActivityState class is used internally by the Activity class and is returned by Activity.stream, but it's not exported in the public API. This makes it impossible to properly type-annotate variables that need to reference ActivityState.
Current Behavior
When trying to use ActivityState in code:
import 'package:stream_feeds/stream_feeds.dart';
// This fails because ActivityState is not exported
late StreamSubscription<ActivityState> activityStateStream;The code fails to compile with an error indicating that ActivityState is undefined.
Expected Behavior
The ActivityState class should be publicly accessible since it's part of the public API contract of the Activity class (specifically its stream getter).
Root Cause
The ActivityState class is defined in /lib/src/state/activity_state.dart, but this file is not exported in /lib/src/state.dart.
The /lib/src/state.dart file currently exports:
state/activity.dart(which usesActivityStateinternally)- Various other state files
But it's missing:
state/activity_state.dart
Proposed Solution
Add the following export to /lib/src/state.dart:
export 'state/activity_state.dart';This would make ActivityState publicly accessible, consistent with how other state classes like FeedState are already exported.
Environment
- Package version:
stream_feeds ^0.3.1 - Dart SDK:
>=3.7.0 <4.0.0