mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 18:57:25 +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,15 +57,14 @@ class _TracksEditorState extends State<TracksEditor> {
|
||||||
body: ReorderableListView(
|
body: ReorderableListView(
|
||||||
header: Column(
|
header: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
recordingId != null
|
ListTile(
|
||||||
? RecordingTile(
|
title: recordingId != null
|
||||||
recordingId: recordingId,
|
? RecordingTile(
|
||||||
onTap: selectRecording,
|
recordingId: recordingId,
|
||||||
)
|
)
|
||||||
: ListTile(
|
: Text('Select recording'),
|
||||||
title: Text('Select recording'),
|
onTap: selectRecording,
|
||||||
onTap: selectRecording,
|
),
|
||||||
),
|
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text('Files'),
|
title: Text('Files'),
|
||||||
trailing: IconButton(
|
trailing: IconButton(
|
||||||
|
|
|
||||||
|
|
@ -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,35 +19,32 @@ 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,
|
),
|
||||||
),
|
child: Column(
|
||||||
child: Column(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: <Widget>[
|
||||||
children: <Widget>[
|
if (snapshot.hasData) ...[
|
||||||
if (snapshot.hasData) ...[
|
DefaultTextStyle(
|
||||||
DefaultTextStyle(
|
style: textTheme.subtitle1,
|
||||||
style: textTheme.subtitle1,
|
child: ComposersText(snapshot.data.work),
|
||||||
child: ComposersText(snapshot.data.work),
|
|
||||||
),
|
|
||||||
DefaultTextStyle(
|
|
||||||
style: textTheme.headline6,
|
|
||||||
child: WorkText(snapshot.data.work),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
const SizedBox(
|
|
||||||
height: 4.0,
|
|
||||||
),
|
),
|
||||||
DefaultTextStyle(
|
DefaultTextStyle(
|
||||||
style: textTheme.bodyText1,
|
style: textTheme.headline6,
|
||||||
child: PerformancesText(recordingId),
|
child: WorkText(snapshot.data.work),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
const SizedBox(
|
||||||
|
height: 4.0,
|
||||||
|
),
|
||||||
|
DefaultTextStyle(
|
||||||
|
style: textTheme.bodyText1,
|
||||||
|
child: PerformancesText(recordingId),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
onTap: onTap,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue