Add recording selector

As a proof of concept some widgets were seperated. The home screen now
links to this instead of the recording editor.
This commit is contained in:
Elias Projahn 2020-04-05 19:31:46 +02:00
parent a6d795ef3c
commit 0438296bcc
6 changed files with 308 additions and 4 deletions

View file

@ -0,0 +1,26 @@
import 'package:flutter/material.dart';
import '../backend.dart';
import '../database.dart';
class PersonText extends StatelessWidget {
final int personId;
PersonText(this.personId);
@override
Widget build(BuildContext context) {
final backend = Backend.of(context);
return StreamBuilder<Person>(
stream: backend.db.personById(personId).watchSingle(),
builder: (context, snapshot) {
if (snapshot.hasData) {
return Text('${snapshot.data.firstName} ${snapshot.data.lastName}');
} else {
return Container();
}
},
);
}
}