diff --git a/lib/ui/task/edit/task_edit.dart b/lib/ui/task/edit/task_edit.dart index 773914d4b..ad2a9e486 100644 --- a/lib/ui/task/edit/task_edit.dart +++ b/lib/ui/task/edit/task_edit.dart @@ -124,7 +124,9 @@ class _TaskEditState extends State ), ), floatingActionButtonLocation: FloatingActionButtonLocation.endDocked, - floatingActionButton: FloatingActionButton( + floatingActionButton: task.isInvoiced || task.isDeleted + ? SizedBox() + : FloatingActionButton( backgroundColor: Theme.of(context).primaryColorDark, onPressed: () { viewModel.onFabPressed(); diff --git a/lib/ui/task/view/task_view.dart b/lib/ui/task/view/task_view.dart index 24bb053ac..851c9c8cb 100644 --- a/lib/ui/task/view/task_view.dart +++ b/lib/ui/task/view/task_view.dart @@ -68,8 +68,9 @@ class _TaskViewState extends State { List _buildView() { final widgets = [ TwoValueHeader( - backgroundColor: - task.isInvoiced ? Colors.green : task.isRunning ? Colors.blue : null, + backgroundColor: task.isInvoiced + ? Colors.green + : task.isRunning ? Colors.blue : null, label1: localization.duration, value1: formatDuration(task.calculateDuration), label2: localization.amount, @@ -197,15 +198,18 @@ class _TaskViewState extends State { }, ), floatingActionButton: Builder(builder: (BuildContext context) { - return FloatingActionButton( - backgroundColor: Theme.of(context).primaryColorDark, - onPressed: () => viewModel.onFabPressed(context), - child: Icon( - task.isRunning ? Icons.stop : Icons.play_arrow, - color: Colors.white, - ), - tooltip: task.isRunning ? localization.stop : localization.start, - ); + return task.isInvoiced || task.isDeleted + ? SizedBox() + : FloatingActionButton( + backgroundColor: Theme.of(context).primaryColorDark, + onPressed: () => viewModel.onFabPressed(context), + child: Icon( + task.isRunning ? Icons.stop : Icons.play_arrow, + color: Colors.white, + ), + tooltip: + task.isRunning ? localization.stop : localization.start, + ); }), ), );