mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 10:47: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(
|
||||
header: Column(
|
||||
children: <Widget>[
|
||||
recordingId != null
|
||||
? RecordingTile(
|
||||
recordingId: recordingId,
|
||||
onTap: selectRecording,
|
||||
)
|
||||
: ListTile(
|
||||
title: Text('Select recording'),
|
||||
onTap: selectRecording,
|
||||
),
|
||||
ListTile(
|
||||
title: recordingId != null
|
||||
? RecordingTile(
|
||||
recordingId: recordingId,
|
||||
)
|
||||
: Text('Select recording'),
|
||||
onTap: selectRecording,
|
||||
),
|
||||
ListTile(
|
||||
title: Text('Files'),
|
||||
trailing: IconButton(
|
||||
|
|
|
|||
|
|
@ -7,11 +7,9 @@ import 'texts.dart';
|
|||
|
||||
class RecordingTile extends StatelessWidget {
|
||||
final int recordingId;
|
||||
final void Function() onTap;
|
||||
|
||||
RecordingTile({
|
||||
this.recordingId,
|
||||
this.onTap,
|
||||
});
|
||||
|
||||
@override
|
||||
|
|
@ -21,35 +19,32 @@ class RecordingTile extends StatelessWidget {
|
|||
|
||||
return StreamBuilder<Recording>(
|
||||
stream: backend.db.recordingById(recordingId).watchSingle(),
|
||||
builder: (context, snapshot) => ListTile(
|
||||
title: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 8.0,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
if (snapshot.hasData) ...[
|
||||
DefaultTextStyle(
|
||||
style: textTheme.subtitle1,
|
||||
child: ComposersText(snapshot.data.work),
|
||||
),
|
||||
DefaultTextStyle(
|
||||
style: textTheme.headline6,
|
||||
child: WorkText(snapshot.data.work),
|
||||
),
|
||||
],
|
||||
const SizedBox(
|
||||
height: 4.0,
|
||||
builder: (context, snapshot) => Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 8.0,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
if (snapshot.hasData) ...[
|
||||
DefaultTextStyle(
|
||||
style: textTheme.subtitle1,
|
||||
child: ComposersText(snapshot.data.work),
|
||||
),
|
||||
DefaultTextStyle(
|
||||
style: textTheme.bodyText1,
|
||||
child: PerformancesText(recordingId),
|
||||
style: textTheme.headline6,
|
||||
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