Add id aparameter to concatenating methods.

This commit is contained in:
Ryan Heise 2020-09-26 19:51:30 +10:00
parent 1552eebe83
commit ab6c8b2a8a
1 changed files with 13 additions and 1 deletions

View File

@ -244,15 +244,18 @@ class DisposeResponse {
} }
class ConcatenatingInsertAllRequest { class ConcatenatingInsertAllRequest {
final String id;
final int index; final int index;
final List<AudioSourceMessage> children; final List<AudioSourceMessage> children;
ConcatenatingInsertAllRequest({ ConcatenatingInsertAllRequest({
@required this.id,
@required this.index, @required this.index,
@required this.children, @required this.children,
}); });
Map<dynamic, dynamic> toMap() => { Map<dynamic, dynamic> toMap() => {
'id': id,
'index': index, 'index': index,
'children': children.map((child) => child.toMap()).toList(), 'children': children.map((child) => child.toMap()).toList(),
}; };
@ -264,15 +267,18 @@ class ConcatenatingInsertAllResponse {
} }
class ConcatenatingRemoveRangeRequest { class ConcatenatingRemoveRangeRequest {
final String id;
final int startIndex; final int startIndex;
final int endIndex; final int endIndex;
ConcatenatingRemoveRangeRequest({ ConcatenatingRemoveRangeRequest({
@required this.id,
@required this.startIndex, @required this.startIndex,
@required this.endIndex, @required this.endIndex,
}); });
Map<dynamic, dynamic> toMap() => { Map<dynamic, dynamic> toMap() => {
'id': id,
'startIndex': startIndex, 'startIndex': startIndex,
'endIndex': endIndex, 'endIndex': endIndex,
}; };
@ -284,12 +290,18 @@ class ConcatenatingRemoveRangeResponse {
} }
class ConcatenatingMoveRequest { class ConcatenatingMoveRequest {
final String id;
final int currentIndex; final int currentIndex;
final int newIndex; final int newIndex;
ConcatenatingMoveRequest({this.currentIndex, this.newIndex}); ConcatenatingMoveRequest({
@required this.id,
@required this.currentIndex,
@required this.newIndex,
});
Map<dynamic, dynamic> toMap() => { Map<dynamic, dynamic> toMap() => {
'id': id,
'currentIndex': currentIndex, 'currentIndex': currentIndex,
'newIndex': newIndex, 'newIndex': newIndex,
}; };