-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplayback_event.dart
More file actions
21 lines (17 loc) · 922 Bytes
/
playback_event.dart
File metadata and controls
21 lines (17 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright 2022 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of 'playback_bloc.dart';
@Freezed()
class PlaybackEvent with _$PlaybackEvent {
const factory PlaybackEvent.togglePlayPause() = TogglePlayPause;
const factory PlaybackEvent.changeSong(Song song) = ChangeSong;
const factory PlaybackEvent.setVolume(double value) = SetVolume;
const factory PlaybackEvent.toggleMute() = ToggleMute;
/// Used to move to a specific timestamp in a song, likely because the user
/// has dragged the playback bar. Values should be between 0 and 1.
const factory PlaybackEvent.moveToInSong(double percent) = MoveToInSong;
/// Used to indicate incremental progress in the song that is currently
/// playing.
const factory PlaybackEvent.songProgress(Duration duration) = SongProgress;
}