downgrade mobx to 2.1.3
This commit is contained in:
parent
0d84ada94b
commit
76646d6a76
7 changed files with 41 additions and 39 deletions
|
@ -51,38 +51,40 @@ class QueuePage extends StatelessWidget {
|
|||
),
|
||||
leadingWidth: 56 + HORIZONTAL_PADDING,
|
||||
toolbarHeight: 80.0,
|
||||
title: Observer(builder: (context) {
|
||||
final playable = audioStore.playableStream.value;
|
||||
final numAvailableSongs = audioStore.numAvailableSongs;
|
||||
title: Observer(
|
||||
builder: (context) {
|
||||
final playable = audioStore.playableStream.value;
|
||||
final numAvailableSongs = audioStore.numAvailableSongs;
|
||||
|
||||
Widget subTitle = Container();
|
||||
Widget subTitle = Container();
|
||||
|
||||
if (playable != null) {
|
||||
subTitle = Text(
|
||||
playable.repr(),
|
||||
maxLines: 1,
|
||||
if (playable != null) {
|
||||
subTitle = Text(
|
||||
playable.repr(),
|
||||
maxLines: 1,
|
||||
);
|
||||
}
|
||||
|
||||
String text = '${audioStore.queueLength} songs in queue';
|
||||
if (numAvailableSongs > 0) text += ', $numAvailableSongs more available';
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Currently playing'.toUpperCase(),
|
||||
style: TEXT_SMALL_HEADLINE,
|
||||
),
|
||||
subTitle,
|
||||
const SizedBox(height: 4.0),
|
||||
Text(
|
||||
text,
|
||||
style: TEXT_SMALL_SUBTITLE.copyWith(color: Colors.white70),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
String text = '${audioStore.queueLength} songs in queue';
|
||||
if (numAvailableSongs > 0) text += ', $numAvailableSongs more available';
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Currently playing'.toUpperCase(),
|
||||
style: TEXT_SMALL_HEADLINE,
|
||||
),
|
||||
subTitle,
|
||||
const SizedBox(height: 4.0),
|
||||
Text(
|
||||
text,
|
||||
style: TEXT_SMALL_SUBTITLE.copyWith(color: Colors.white70),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
},
|
||||
),
|
||||
centerTitle: false,
|
||||
actions: [
|
||||
Observer(
|
||||
|
|
|
@ -146,7 +146,7 @@ abstract class _AudioStore with Store {
|
|||
|
||||
@computed
|
||||
bool get hasNext =>
|
||||
(queueIndexStream.value != null && queueIndexStream.value! < _queue.length - 1) ||
|
||||
(queueIndexStream.value != null && queueIndexStream.value! < queueLength - 1) ||
|
||||
(loopModeStream.value ?? LoopMode.off) != LoopMode.off;
|
||||
|
||||
@computed
|
||||
|
|
|
@ -30,14 +30,14 @@ abstract class _QueuePageStore with Store {
|
|||
|
||||
@action
|
||||
void reset() {
|
||||
isSelected = List.generate(_audioStore.queue.length, (index) => false).asObservable();
|
||||
isSelected = List.generate(_audioStore.queueLength, (index) => false).asObservable();
|
||||
isMultiSelectEnabled = false;
|
||||
}
|
||||
|
||||
@action
|
||||
void toggleMultiSelect() {
|
||||
if (!isMultiSelectEnabled) {
|
||||
isSelected = List.generate(_audioStore.queue.length, (index) => false).asObservable();
|
||||
isSelected = List.generate(_audioStore.queueLength, (index) => false).asObservable();
|
||||
}
|
||||
isMultiSelectEnabled = !isMultiSelectEnabled;
|
||||
}
|
||||
|
@ -49,12 +49,12 @@ abstract class _QueuePageStore with Store {
|
|||
|
||||
@action
|
||||
void selectAll() {
|
||||
isSelected = List.generate(_audioStore.queue.length, (index) => true).asObservable();
|
||||
isSelected = List.generate(_audioStore.queueLength, (index) => true).asObservable();
|
||||
}
|
||||
|
||||
@action
|
||||
void deselectAll() {
|
||||
isSelected = List.generate(_audioStore.queue.length, (index) => false).asObservable();
|
||||
isSelected = List.generate(_audioStore.queueLength, (index) => false).asObservable();
|
||||
}
|
||||
|
||||
void dispose() {}
|
||||
|
|
|
@ -6,8 +6,8 @@ import '../../models/artist_model.dart';
|
|||
import '../../models/history_entry_model.dart';
|
||||
import '../../models/playlist_model.dart';
|
||||
import '../../models/smart_list_model.dart';
|
||||
import '../history_data_source.dart';
|
||||
import '../drift_database.dart';
|
||||
import '../history_data_source.dart';
|
||||
|
||||
part 'history_dao.g.dart';
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ import '../../models/home_widgets/history_model.dart';
|
|||
import '../../models/home_widgets/home_widget_model.dart';
|
||||
import '../../models/home_widgets/playlists_model.dart';
|
||||
import '../../models/home_widgets/shuffle_all_model.dart';
|
||||
import '../home_widget_data_source.dart';
|
||||
import '../drift_database.dart';
|
||||
import '../home_widget_data_source.dart';
|
||||
|
||||
part 'home_widget_dao.g.dart';
|
||||
|
||||
|
|
|
@ -524,10 +524,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: mobx
|
||||
sha256: "6738620307a424d2c9ad8b873f4dce391c44e9135eb4e75668ac8202fec7a9b8"
|
||||
sha256: "41f814e90db4d5fe1303efc570db837a56507832c08c4f0842320fa3d40c14cd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
version: "2.1.3"
|
||||
mobx_codegen:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
|
|
@ -24,7 +24,7 @@ dependencies:
|
|||
flutter_speed_dial: ^6.2.0 # MIT
|
||||
get_it: ^7.1.3 # MIT
|
||||
just_audio: ^0.9.18 # MIT
|
||||
mobx: ^2.0.1 # MIT
|
||||
mobx: 2.1.3 # MIT
|
||||
on_audio_query: ^2.6.1 # BSD 3
|
||||
palette_generator: ^0.3.3+2 # BSD 3
|
||||
path: ^1.8.0 # BSD 3
|
||||
|
|
Loading…
Add table
Reference in a new issue