Skip to content

Commit

Permalink
add more freezed states
Browse files Browse the repository at this point in the history
  • Loading branch information
lamarios committed Dec 11, 2023
1 parent 06c6f39 commit 66c0fee
Show file tree
Hide file tree
Showing 64 changed files with 4,371 additions and 2,563 deletions.
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ Future<void> main() async {
},
),
BlocProvider(
create: (context) => PlayerCubit(PlayerState(), context.read<SettingsCubit>()),
create: (context) => PlayerCubit(PlayerState.init(null), context.read<SettingsCubit>()),
),
BlocProvider(
create: (context) => DownloadManagerCubit(DownloadManagerState(), context.read<PlayerCubit>()),
create: (context) => DownloadManagerCubit(const DownloadManagerState(), context.read<PlayerCubit>()),
)
], child: const MyApp()));
}
Expand Down
6 changes: 3 additions & 3 deletions lib/player/models/mediaCommand.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ enum MediaCommandType {
}

class MediaCommand<T> {
MediaCommandType type;
T? value;
final MediaCommandType type;
final T? value;

MediaCommand(this.type, {this.value});
const MediaCommand(this.type, {this.value});
}

class SwitchVideoValue {
Expand Down
8 changes: 4 additions & 4 deletions lib/player/models/mediaEvent.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class MediaEvent<T> {
MediaEventType? type;
MediaState state;
T? value;
final MediaEventType? type;
final MediaState state;
final T? value;

MediaEvent({this.type, required this.state, this.value});
const MediaEvent({this.type, required this.state, this.value});
}

enum MediaEventType {
Expand Down
Loading

0 comments on commit 66c0fee

Please sign in to comment.