Update to latest analyzer (w/ cleanup).

Bye-bye `@protected `trampolines! :)
This commit is contained in:
pq 2016-06-30 10:39:45 -07:00
parent fa7f271448
commit a417786d77
3 changed files with 5 additions and 8 deletions

View File

@ -465,9 +465,6 @@ abstract class StatelessWidget extends Widget {
/// inserted into the tree in multiple places at once.
@protected
Widget build(BuildContext context);
/// Trampoline to make the [build] closure library-accessible.
WidgetBuilder get _build => build;
}
/// A widget that has mutable state.
@ -2012,7 +2009,7 @@ abstract class ComponentElement extends BuildableElement {
/// Instantiation of [StatelessWidget]s.
class StatelessElement extends ComponentElement {
StatelessElement(StatelessWidget widget) : super(widget) {
_builder = widget._build;
_builder = widget.build;
}
@override
@ -2022,14 +2019,14 @@ class StatelessElement extends ComponentElement {
void update(StatelessWidget newWidget) {
super.update(newWidget);
assert(widget == newWidget);
_builder = widget._build;
_builder = widget.build;
_dirty = true;
rebuild();
}
@override
void _reassemble() {
_builder = widget._build;
_builder = widget.build;
super._reassemble();
}
}

View File

@ -10,7 +10,7 @@ dependencies:
# We don't actually depend on 'analyzer', but 'test' and 'flutter_tools' do.
# We pin the version of analyzer we depend on to avoid version skew across our
# packages.
analyzer: 0.27.4-alpha.14
analyzer: 0.27.4-alpha.15
flutter:
path: ../flutter

View File

@ -38,7 +38,7 @@ dependencies:
test: 0.12.13+5
# Pinned in flutter_test as well.
analyzer: 0.27.4-alpha.14
analyzer: 0.27.4-alpha.15
dev_dependencies:
mockito: ^0.11.0