Commit 2873880f authored by Adam Barth's avatar Adam Barth

Fix analyzer warnings

parent 89c11447
...@@ -124,7 +124,7 @@ class FitnessApp extends App { ...@@ -124,7 +124,7 @@ class FitnessApp extends App {
name: '/settings', name: '/settings',
builder: (navigator, route) => new SettingsFragment( builder: (navigator, route) => new SettingsFragment(
navigator: navigator, navigator: navigator,
userData: _userData as UserData, userData: _userData,
updater: settingsUpdater updater: settingsUpdater
) )
), ),
......
...@@ -28,14 +28,6 @@ class SettingsFragment extends StatefulComponent { ...@@ -28,14 +28,6 @@ class SettingsFragment extends StatefulComponent {
updater(backup: value ? BackupMode.enabled : BackupMode.disabled); updater(backup: value ? BackupMode.enabled : BackupMode.disabled);
} }
void _goalWeightChanged(double value) {
assert(updater != null);
setState(() {
optimism = value ? StockMode.optimistic : StockMode.pessimistic;
});
sendUpdates();
}
Widget buildToolBar() { Widget buildToolBar() {
return new ToolBar( return new ToolBar(
left: new IconButton( left: new IconButton(
......
...@@ -70,30 +70,18 @@ void main() { ...@@ -70,30 +70,18 @@ void main() {
test("should throw when inserting multiple elements", () { test("should throw when inserting multiple elements", () {
doc.appendChild(doc.createElement("div")); doc.appendChild(doc.createElement("div"));
var oldChild = doc.appendChild(doc.createText(" text ")); doc.appendChild(doc.createText(" text "));
expect(childElementCount(doc), equals(1)); expect(childElementCount(doc), equals(1));
var newChild = doc.createElement("div"); doc.createElement("div");
// expect(() {
// doc.replaceChild(newChild, 0);
// }, throws);
// expect(() {
// doc.insertBefore(newChild, oldChild);
// }, throws);
}); });
test("should throw when inserting multiple elements with a fragment", () { test("should throw when inserting multiple elements with a fragment", () {
var oldChild = doc.appendChild(doc.createElement("div")); doc.appendChild(doc.createElement("div"));
expect(childElementCount(doc), equals(1)); expect(childElementCount(doc), equals(1));
var fragment = doc.createDocumentFragment(); var fragment = doc.createDocumentFragment();
fragment.appendChild(doc.createText(" text ")); fragment.appendChild(doc.createText(" text "));
fragment.appendChild(doc.createElement("div")); fragment.appendChild(doc.createElement("div"));
fragment.appendChild(doc.createElement("div")); fragment.appendChild(doc.createElement("div"));
fragment.appendChild(doc.createText(" ")); fragment.appendChild(doc.createText(" "));
// expect(() {
// doc.replaceChild(fragment, 0);
// }, throws);
// expect(() {
// doc.insertBefore(fragment, oldChild);
// }, throws);
}); });
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment