🎨 Use feature based folder structure
This commit is contained in:
53
lib/core/services/event_bus.dart
Normal file
53
lib/core/services/event_bus.dart
Normal file
@@ -0,0 +1,53 @@
|
||||
import 'package:event_bus/event_bus.dart';
|
||||
|
||||
/// Global event bus instance for the application
|
||||
final eventBus = EventBus();
|
||||
|
||||
/// Event fired when a post is successfully created
|
||||
class PostCreatedEvent {
|
||||
final String? postId;
|
||||
final String? title;
|
||||
final String? content;
|
||||
|
||||
const PostCreatedEvent({this.postId, this.title, this.content});
|
||||
}
|
||||
|
||||
/// Event fired when chat rooms need to be refreshed
|
||||
class ChatRoomsRefreshEvent {
|
||||
const ChatRoomsRefreshEvent();
|
||||
}
|
||||
|
||||
/// Event fired when OIDC auth callback is received
|
||||
class OidcAuthCallbackEvent {
|
||||
final String challengeId;
|
||||
|
||||
const OidcAuthCallbackEvent(this.challengeId);
|
||||
}
|
||||
|
||||
/// Event fired to trigger the command palette
|
||||
class CommandPaletteTriggerEvent {
|
||||
const CommandPaletteTriggerEvent();
|
||||
}
|
||||
|
||||
/// Event fired to show the compose post sheet
|
||||
class ShowComposeSheetEvent {
|
||||
const ShowComposeSheetEvent();
|
||||
}
|
||||
|
||||
/// Event fired to show the notification sheet
|
||||
class ShowNotificationSheetEvent {
|
||||
const ShowNotificationSheetEvent();
|
||||
}
|
||||
|
||||
/// Event fired to show the thought sheet
|
||||
class ShowThoughtSheetEvent {
|
||||
final String? initialMessage;
|
||||
final List<Map<String, dynamic>> attachedMessages;
|
||||
final List<String> attachedPosts;
|
||||
|
||||
const ShowThoughtSheetEvent({
|
||||
this.initialMessage,
|
||||
this.attachedMessages = const [],
|
||||
this.attachedPosts = const [],
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user