Tasks
This commit is contained in:
parent
ed7fa02d63
commit
059d02e63c
|
|
@ -124,7 +124,9 @@ class _TaskEditState extends State<TaskEdit>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
|
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: task.isInvoiced || task.isDeleted
|
||||||
|
? SizedBox()
|
||||||
|
: FloatingActionButton(
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
viewModel.onFabPressed();
|
viewModel.onFabPressed();
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,9 @@ class _TaskViewState extends State<TaskView> {
|
||||||
List<Widget> _buildView() {
|
List<Widget> _buildView() {
|
||||||
final widgets = <Widget>[
|
final widgets = <Widget>[
|
||||||
TwoValueHeader(
|
TwoValueHeader(
|
||||||
backgroundColor:
|
backgroundColor: task.isInvoiced
|
||||||
task.isInvoiced ? Colors.green : task.isRunning ? Colors.blue : null,
|
? Colors.green
|
||||||
|
: task.isRunning ? Colors.blue : null,
|
||||||
label1: localization.duration,
|
label1: localization.duration,
|
||||||
value1: formatDuration(task.calculateDuration),
|
value1: formatDuration(task.calculateDuration),
|
||||||
label2: localization.amount,
|
label2: localization.amount,
|
||||||
|
|
@ -197,14 +198,17 @@ class _TaskViewState extends State<TaskView> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
floatingActionButton: Builder(builder: (BuildContext context) {
|
floatingActionButton: Builder(builder: (BuildContext context) {
|
||||||
return FloatingActionButton(
|
return task.isInvoiced || task.isDeleted
|
||||||
|
? SizedBox()
|
||||||
|
: FloatingActionButton(
|
||||||
backgroundColor: Theme.of(context).primaryColorDark,
|
backgroundColor: Theme.of(context).primaryColorDark,
|
||||||
onPressed: () => viewModel.onFabPressed(context),
|
onPressed: () => viewModel.onFabPressed(context),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
task.isRunning ? Icons.stop : Icons.play_arrow,
|
task.isRunning ? Icons.stop : Icons.play_arrow,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
tooltip: task.isRunning ? localization.stop : localization.start,
|
tooltip:
|
||||||
|
task.isRunning ? localization.stop : localization.start,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue