diff --git a/lib/buzz_impl.dart b/lib/buzz_impl.dart index 8b07904..34a757b 100644 --- a/lib/buzz_impl.dart +++ b/lib/buzz_impl.dart @@ -19,7 +19,7 @@ void cleanBuzz() { abstract class IBuzzBase { AppEventBus get appEvents; CommandEventBus get commands; - UIEventBus get uiEvents; + UiEventBus get uiEvents; Navigator get navigator; @@ -42,7 +42,7 @@ class BuzzBase implements IBuzzBase { CommandEventBus get commands => EventBusHolder.of(); @override - UIEventBus get uiEvents => EventBusHolder.of(); + UiEventBus get uiEvents => EventBusHolder.of(); late Navigator _navigator; diff --git a/lib/infra/event_bus_holder.dart b/lib/infra/event_bus_holder.dart index a4319a8..02d2513 100644 --- a/lib/infra/event_bus_holder.dart +++ b/lib/infra/event_bus_holder.dart @@ -10,7 +10,7 @@ IEventBusHolder get EventBusHolder { _eventBusHolder ??= EventBusHolderImpl() ..addEventBus(AppEventBus()) ..addEventBus(CommandEventBus()) - ..addEventBus(UIEventBus()); + ..addEventBus(UiEventBus()); return _eventBusHolder!; } diff --git a/lib/infra/registries.dart b/lib/infra/registries.dart index 72245b0..437b1ad 100644 --- a/lib/infra/registries.dart +++ b/lib/infra/registries.dart @@ -17,9 +17,9 @@ abstract class ModuleBuzzRegistries extends _IModuleBuzzRegistries { List get uiEvents => const []; } -abstract class UiEventRegistry extends EventHandlerRegistry { +abstract class UiEventRegistry extends EventHandlerRegistry { UiEventRegistry({ - required Function(UIEvent) handler, + required Function(UiEvent) handler, }) : super(handler: handler); } diff --git a/lib/kinds/ui_events.dart b/lib/kinds/ui_events.dart index 8e0ece3..8473d41 100644 --- a/lib/kinds/ui_events.dart +++ b/lib/kinds/ui_events.dart @@ -1,26 +1,26 @@ import '../infra/typed_event_bus.dart'; -abstract class UIEvent {} +abstract class UiEvent {} -abstract class UIEventHandler extends TypedEventHandler { - void handle(UIEvent uiEvent); +abstract class UIEventHandler extends TypedEventHandler { + void handle(UiEvent uiEvent); } -class UIEventBus extends TypedEventBus { +class UiEventBus extends TypedEventBus { @override bool isTypeSupported(dynamic type) { - return type is UIEvent; + return type is UiEvent; } } -class OnTapped extends UIEvent {} +class OnTapped extends UiEvent {} enum OnScrollDirection { up, down, } -abstract class OnScroll extends UIEvent { +abstract class OnScroll extends UiEvent { OnScrollDirection get direction; } @@ -29,21 +29,21 @@ enum OnSwipeDirection { right, } -abstract class OnSwipe extends UIEvent { +abstract class OnSwipe extends UiEvent { OnSwipeDirection get direction; } -abstract class OnToggleChanged extends UIEvent { +abstract class OnToggleChanged extends UiEvent { bool get isEnabled; bool get isDisabled => !isEnabled; } -abstract class OnFocusChanged extends UIEvent { +abstract class OnFocusChanged extends UiEvent { bool get hasFocus; } -class OnValueChanged extends UIEvent {} +class OnValueChanged extends UiEvent {} -class OnValuePasted extends UIEvent {} +class OnValuePasted extends UiEvent {} -class OnValueCopied extends UIEvent {} +class OnValueCopied extends UiEvent {}