From 9394422547e799b49e4e4f18f12c29bf353e0f80 Mon Sep 17 00:00:00 2001 From: Adrian Samoticha Date: Sat, 19 Aug 2023 17:16:32 +0200 Subject: [PATCH] rename `onChangedStream` to `onChanged` --- lib/src/buttons/push_button.dart | 4 ++-- lib/src/utils/accent_color_listener.dart | 4 ++-- lib/src/utils/window_main_state_listener.dart | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/src/buttons/push_button.dart b/lib/src/buttons/push_button.dart index b94e1822..df0cf4fe 100644 --- a/lib/src/buttons/push_button.dart +++ b/lib/src/buttons/push_button.dart @@ -341,10 +341,10 @@ class PushButtonState extends State child: ConstrainedBox( constraints: widget.controlSize.constraints, child: StreamBuilder( - stream: AccentColorListener.instance.onChangedStream, + stream: AccentColorListener.instance.onChanged, builder: (context, _) { return StreamBuilder( - stream: WindowMainStateListener.instance.onChangedStream, + stream: WindowMainStateListener.instance.onChanged, builder: (context, _) { final Color backgroundColor = _getBackgroundColor(); diff --git a/lib/src/utils/accent_color_listener.dart b/lib/src/utils/accent_color_listener.dart index 08104c68..1a21c64b 100644 --- a/lib/src/utils/accent_color_listener.dart +++ b/lib/src/utils/accent_color_listener.dart @@ -14,7 +14,7 @@ import 'package:macos_ui/src/enums/accent_color.dart'; /// /// ```dart /// StreamBuilder( -/// stream: AccentColorListener.instance.onChangedStream, +/// stream: AccentColorListener.instance.onChanged, /// builder: (context, _) { /// final AccentColor? accentColor = /// AccentColorListener.instance.currentAccentColor; @@ -56,7 +56,7 @@ class AccentColorListener { /// Streams the user’s system accent color selection. /// /// Emits a new value whenever the system accent color selection changes. - Stream get onChangedStream => _accentColorStreamController.stream; + Stream get onChanged => _accentColorStreamController.stream; /// A stream subscription for the [SystemColorObserver] stream. StreamSubscription? _systemColorObserverStreamSubscription; diff --git a/lib/src/utils/window_main_state_listener.dart b/lib/src/utils/window_main_state_listener.dart index 74db47ef..ece89646 100644 --- a/lib/src/utils/window_main_state_listener.dart +++ b/lib/src/utils/window_main_state_listener.dart @@ -14,7 +14,7 @@ import 'package:macos_ui/macos_ui.dart'; /// /// ```dart /// StreamBuilder( -/// stream: WindowMainStateListener.instance.onChangedStream, +/// stream: WindowMainStateListener.instance.onChanged, /// builder: (context, _) { /// final bool isMainWindow /// = WindowMainStateListener.instance.isMainWindow; @@ -44,7 +44,7 @@ class WindowMainStateListener { /// A stream of the window’s main state. Emits a new value whenever the state /// changes. - Stream get onChangedStream => _windowMainStateStreamController.stream; + Stream get onChanged => _windowMainStateStreamController.stream; /// Initializes the listener. This should only be called once. void _init() {