mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 10:47:25 +01:00
Add comment field to recording
This commit is contained in:
parent
e9f0bd03e7
commit
4decd17875
2 changed files with 19 additions and 1 deletions
|
|
@ -32,7 +32,8 @@ CREATE TABLE ensembles (
|
|||
|
||||
CREATE TABLE recordings (
|
||||
id INTEGER NOT NULL PRIMARY KEY,
|
||||
work INTEGER REFERENCES works(id)
|
||||
work INTEGER REFERENCES works(id),
|
||||
comment TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE performances (
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ class RecordingEditor extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _RecordingEditorState extends State<RecordingEditor> {
|
||||
final commentController = TextEditingController();
|
||||
|
||||
Work work;
|
||||
List<PerformanceModel> performances = [];
|
||||
|
||||
|
|
@ -59,6 +61,7 @@ class _RecordingEditorState extends State<RecordingEditor> {
|
|||
final recording = Recording(
|
||||
id: widget.recording?.id ?? generateId(),
|
||||
work: work.id,
|
||||
comment: commentController.text,
|
||||
);
|
||||
|
||||
await backend.db.updateRecording(recording, performances);
|
||||
|
|
@ -79,6 +82,20 @@ class _RecordingEditorState extends State<RecordingEditor> {
|
|||
subtitle: Text('Select work'),
|
||||
onTap: selectWork,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 16.0,
|
||||
right: 16.0,
|
||||
top: 0.0,
|
||||
bottom: 16.0,
|
||||
),
|
||||
child: TextField(
|
||||
controller: commentController,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Comment',
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text('Performers'),
|
||||
trailing: IconButton(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue