Skip to content

Commit

Permalink
rename onChangedStream to onChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian-Samoticha committed Aug 19, 2023
1 parent 053befb commit 9394422
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/src/buttons/push_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,10 @@ class PushButtonState extends State<PushButton>
child: ConstrainedBox(
constraints: widget.controlSize.constraints,
child: StreamBuilder(
stream: AccentColorListener.instance.onChangedStream,
stream: AccentColorListener.instance.onChanged,
builder: (context, _) {
return StreamBuilder<bool>(
stream: WindowMainStateListener.instance.onChangedStream,
stream: WindowMainStateListener.instance.onChanged,
builder: (context, _) {
final Color backgroundColor = _getBackgroundColor();

Expand Down
4 changes: 2 additions & 2 deletions lib/src/utils/accent_color_listener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<void> get onChangedStream => _accentColorStreamController.stream;
Stream<void> get onChanged => _accentColorStreamController.stream;

/// A stream subscription for the [SystemColorObserver] stream.
StreamSubscription<void>? _systemColorObserverStreamSubscription;
Expand Down
4 changes: 2 additions & 2 deletions lib/src/utils/window_main_state_listener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -44,7 +44,7 @@ class WindowMainStateListener {

/// A stream of the window’s main state. Emits a new value whenever the state
/// changes.
Stream<bool> get onChangedStream => _windowMainStateStreamController.stream;
Stream<bool> get onChanged => _windowMainStateStreamController.stream;

/// Initializes the listener. This should only be called once.
void _init() {
Expand Down

0 comments on commit 9394422

Please sign in to comment.