mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 18:57:25 +01:00
Remove seperate role repesentation
The role and instrument tables have been merged into one (the instrument table). There are not that many roles that aren't instruments and it is much simpler to mange this way. The role editor and role selector have been removed and the instrument related UI parts have been modified accordingly.
This commit is contained in:
parent
24f2022930
commit
99e4711cfc
8 changed files with 57 additions and 172 deletions
|
|
@ -3,17 +3,17 @@ import 'package:flutter/material.dart';
|
|||
import '../backend.dart';
|
||||
import '../database.dart';
|
||||
import '../editors/person.dart';
|
||||
import '../selectors/role.dart';
|
||||
|
||||
import 'instruments.dart';
|
||||
|
||||
// TODO: Allow selecting and adding ensembles.
|
||||
// TODO: Allow selecting instruments as roles.
|
||||
class PerformerSelector extends StatefulWidget {
|
||||
@override
|
||||
_PerformerSelectorState createState() => _PerformerSelectorState();
|
||||
}
|
||||
|
||||
class _PerformerSelectorState extends State<PerformerSelector> {
|
||||
Role role;
|
||||
Instrument role;
|
||||
Person person;
|
||||
|
||||
@override
|
||||
|
|
@ -41,9 +41,9 @@ class _PerformerSelectorState extends State<PerformerSelector> {
|
|||
Material(
|
||||
elevation: 2.0,
|
||||
child: ListTile(
|
||||
title: Text('Role'),
|
||||
title: Text('Instrument/Role'),
|
||||
subtitle:
|
||||
Text(role != null ? role.name : 'Select role or instrument'),
|
||||
Text(role != null ? role.name : 'Select instrument/role'),
|
||||
trailing: IconButton(
|
||||
icon: const Icon(Icons.delete),
|
||||
onPressed: () {
|
||||
|
|
@ -53,10 +53,10 @@ class _PerformerSelectorState extends State<PerformerSelector> {
|
|||
},
|
||||
),
|
||||
onTap: () async {
|
||||
final Role newRole = await Navigator.push(
|
||||
final Instrument newRole = await Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => RoleSelector(),
|
||||
builder: (context) => InstrumentsSelector(),
|
||||
fullscreenDialog: true,
|
||||
));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue