Merge remote-tracking branch 'origin/feature/edit-task' into feature/edit-task

This commit is contained in:
kolaente 2019-05-25 08:10:15 +02:00
commit 26a55bb247
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 46 additions and 55 deletions

View File

@ -9,19 +9,17 @@ clone:
steps:
- name: build
image: adamantium/flutter
image: vikunja/flutter-build
pull: true
commands:
- apt-get update && apt-get install make # We do this here to not have to deal with updating the image itself
- flutter packages get
- make format-check
- make build-debug
- name: test
image: adamantium/flutter
image: vikunja/flutter-build
pull: true
commands:
- apt-get update && apt-get install make # We do this here to not have to deal with updating the image itself
- flutter packages get
- make test
@ -47,10 +45,9 @@ clone:
steps:
# Because drone separates the pipelines, we have to add the build step to this pipeline. This is double code, we should change it at some point if possible.
- name: build
image: adamantium/flutter
image: vikunja/flutter-build
pull: true
commands:
- apt-get update && apt-get install make # We do this here to not have to deal with updating the image itself
- flutter packages get
- make build-all
- mkdir apks
@ -92,10 +89,9 @@ clone:
steps:
# Because drone separates the pipelines, we have to add the build step to this pipeline. This is double code, we should change it at some point if possible.
- name: build
image: adamantium/flutter
image: vikunja/flutter-build
pull: true
commands:
- apt-get update && apt-get install make # We do this here to not have to deal with updating the image itself
- flutter packages get
- make build-all
- mkdir apks

View File

@ -42,50 +42,37 @@ class _ListPageState extends State<ListPage> {
tasks.addAll(_loadingTasks.map(_buildLoadingTile));
return Scaffold(
appBar: AppBar(
title: new Text(_list.title),
actions: <Widget>[
IconButton(
icon: Icon(Icons.edit),
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ListEditPage(
list: _list,
))))
],
),
body: !this._loading
? RefreshIndicator(
onRefresh: _loadList,
child: _list.tasks.length > 0
? ListView(
padding: EdgeInsets.symmetric(vertical: 8.0),
children:
ListTile.divideTiles(context: context, tiles: tasks)
.toList(),
)
: Center(child: Text('This list is empty.')),
)
: Center(child: CircularProgressIndicator()),
floatingActionButton: Builder(
builder: (context) => FloatingActionButton(
//onPressed: () => _addItemDialog(context), child: Icon(Icons.add)),
onPressed: () {
print('test');
setState(() {
tasks = null;
});
},
child: Icon(Icons.add),
),
));
}
List<Widget> _listTasks() {
var tasks = (_list?.tasks?.map(_buildTile) ?? []).toList();
tasks.addAll(_loadingTasks.map(_buildLoadingTile));
return tasks;
appBar: AppBar(
title: new Text(_list.title),
actions: <Widget>[
IconButton(
icon: Icon(Icons.edit),
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ListEditPage(
list: _list,
))))
],
),
body: !this._loading
? RefreshIndicator(
onRefresh: _loadList,
child: _list.tasks.length > 0
? ListView(
padding: EdgeInsets.symmetric(vertical: 8.0),
children:
ListTile.divideTiles(context: context, tiles: tasks)
.toList(),
)
: Center(child: Text('This list is empty.')),
)
: Center(child: CircularProgressIndicator()),
floatingActionButton: Builder(
builder: (context) => FloatingActionButton(
onPressed: () => _addItemDialog(context), child: Icon(Icons.add)),
),
);
}
TaskTile _buildTile(Task task) {

View File

@ -191,12 +191,20 @@ class _TaskEditPageState extends State<TaskEditPage> {
_reminderDates.add(null);
var currentIndex = _reminderDates.length - 1;
setState(
() => _reminderInputs.add(VikunjaDateTimePicker(
// FIXME: Why does putting this into a row fails?
setState(() => _reminderInputs.add(Row(
children: <Widget>[
VikunjaDateTimePicker(
label: 'Reminder',
onSaved: (reminder) =>
_reminderDates[currentIndex] = reminder,
)));
),
GestureDetector(
onTap: () => print('tapped'),
child: Icon(Icons.close),
)
],
)));
}),
InputDecorator(
isEmpty: _priority == null,