mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-27 03:07:26 +01:00
Recording tile: Remove onTap callback
This commit is contained in:
parent
c8bf158985
commit
3f98037160
2 changed files with 29 additions and 35 deletions
|
|
@ -57,13 +57,12 @@ class _TracksEditorState extends State<TracksEditor> {
|
||||||
body: ReorderableListView(
|
body: ReorderableListView(
|
||||||
header: Column(
|
header: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
recordingId != null
|
ListTile(
|
||||||
|
title: recordingId != null
|
||||||
? RecordingTile(
|
? RecordingTile(
|
||||||
recordingId: recordingId,
|
recordingId: recordingId,
|
||||||
onTap: selectRecording,
|
|
||||||
)
|
)
|
||||||
: ListTile(
|
: Text('Select recording'),
|
||||||
title: Text('Select recording'),
|
|
||||||
onTap: selectRecording,
|
onTap: selectRecording,
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,9 @@ import 'texts.dart';
|
||||||
|
|
||||||
class RecordingTile extends StatelessWidget {
|
class RecordingTile extends StatelessWidget {
|
||||||
final int recordingId;
|
final int recordingId;
|
||||||
final void Function() onTap;
|
|
||||||
|
|
||||||
RecordingTile({
|
RecordingTile({
|
||||||
this.recordingId,
|
this.recordingId,
|
||||||
this.onTap,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -21,8 +19,7 @@ class RecordingTile extends StatelessWidget {
|
||||||
|
|
||||||
return StreamBuilder<Recording>(
|
return StreamBuilder<Recording>(
|
||||||
stream: backend.db.recordingById(recordingId).watchSingle(),
|
stream: backend.db.recordingById(recordingId).watchSingle(),
|
||||||
builder: (context, snapshot) => ListTile(
|
builder: (context, snapshot) => Padding(
|
||||||
title: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
vertical: 8.0,
|
vertical: 8.0,
|
||||||
),
|
),
|
||||||
|
|
@ -49,8 +46,6 @@ class RecordingTile extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: onTap,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue