Tasks
This commit is contained in:
parent
ed7fa02d63
commit
059d02e63c
|
|
@ -124,7 +124,9 @@ class _TaskEditState extends State<TaskEdit>
|
|||
),
|
||||
),
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
|
||||
floatingActionButton: FloatingActionButton(
|
||||
floatingActionButton: task.isInvoiced || task.isDeleted
|
||||
? SizedBox()
|
||||
: FloatingActionButton(
|
||||
backgroundColor: Theme.of(context).primaryColorDark,
|
||||
onPressed: () {
|
||||
viewModel.onFabPressed();
|
||||
|
|
|
|||
|
|
@ -68,8 +68,9 @@ class _TaskViewState extends State<TaskView> {
|
|||
List<Widget> _buildView() {
|
||||
final widgets = <Widget>[
|
||||
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<TaskView> {
|
|||
},
|
||||
),
|
||||
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,
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue