Make person and work editor accessible

This commit is contained in:
Elias Projahn 2020-03-21 15:06:38 +01:00
parent 743e0db4cf
commit 319818a276
2 changed files with 34 additions and 0 deletions

View file

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import '../backend.dart';
import '../database.dart';
import '../editors/work.dart';
class WorkScreen extends StatelessWidget {
final Work work;
@ -17,6 +18,22 @@ class WorkScreen extends StatelessWidget {
return Scaffold(
appBar: AppBar(
title: Text(work.title),
actions: <Widget>[
IconButton(
icon: const Icon(Icons.edit),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => WorkEditor(
work: work,
),
fullscreenDialog: true,
),
);
},
),
],
),
body: StreamBuilder<List<Work>>(
stream: backend.db.workParts(work.id).watch(),