dartfmt pass

This commit is contained in:
anthonycicc 2018-05-19 14:52:54 -04:00
parent 07000c1709
commit c8a56f706c
4 changed files with 14 additions and 20 deletions

View file

@ -12,8 +12,7 @@ class Entry {
date = DateTime.parse(json['date']),
whatYouDid = json['whatyoudid'];
Map<String, dynamic> toJson() =>
{
Map<String, dynamic> toJson() => {
'id': id,
'date': date.toString(),
'whatyoudid': whatYouDid,

View file

@ -38,5 +38,4 @@ class FileLoader {
throw OSError("File not found");
}
}
}

View file

@ -39,7 +39,8 @@ class _NoZeroDaysState extends State<NoZeroDays> {
}
}
setState(() => _zerodayslist.add(new Entry(highestID + 1, date, whatyoudid)));
setState(
() => _zerodayslist.add(new Entry(highestID + 1, date, whatyoudid)));
_save();
}
@ -167,20 +168,16 @@ class _NoZeroDaysState extends State<NoZeroDays> {
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return new Scaffold(
appBar: new AppBar(
title: new Text(widget.title),
actions: <Widget>[
appBar: new AppBar(title: new Text(widget.title), actions: <Widget>[
new IconButton(icon: new Icon(Icons.save), onPressed: _save),
new IconButton(icon: new Icon(Icons.file_upload), onPressed: _load),
]
),
]),
body: new Scaffold(body: new ListView.builder(
itemBuilder: (context, entry) {
f.checkForFile().then((value) {
if (value) {
_load();
}
else {
} else {
f.writeFile("");
}
});

View file

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:nomorezerodays/NoZeroDays.dart';