mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 10:47:25 +01:00
mobile: Update to new client API
The settings screen was refactored too.
This commit is contained in:
parent
4f7a99d2a1
commit
820ff7eadb
11 changed files with 286 additions and 163 deletions
|
|
@ -37,14 +37,15 @@ class PersonScreen extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
),
|
||||
body: StreamBuilder<List<Work>>(
|
||||
stream: backend.db.worksByComposer(person.id).watch(),
|
||||
body: FutureBuilder<List<WorkInfo>>(
|
||||
future: backend.db.getWorks(person.id),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.hasData) {
|
||||
return ListView.builder(
|
||||
itemCount: snapshot.data.length,
|
||||
itemBuilder: (context, index) {
|
||||
final work = snapshot.data[index];
|
||||
final work = snapshot.data[index].work;
|
||||
|
||||
return ListTile(
|
||||
title: Text(work.title),
|
||||
onTap: () async {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue