Material design icons are defined to work at specific sizes: 18, 24, 36, 48.
The current API doesn't reflect that and just takes a size int. If an invalid
size is chosen an error is printed to the console and no icon shows up.
Fixes#1816
Focus.at() and company should be on Focus, not FocusState.
_notifyDescendants() was using the wrong runtimeType.
Let InheritedWidget update the descendants during build.
When you setState() during build, assert that you're not
markNeedsBuild()ing someone who isn't a descendant.
Typo in Widget.toString().
(These are changes cherry-picked from in-flight branches since they are
more independent and could be helpful even without those changes.)
- Change RouteBuilder's signature to take a single argument in which the
other fields are placed, so that we can keep iterating on those
arguments without having to break compatibility each time. Also, this
makes defining route builders much simpler (only one argument to
ignore rather than a variable number).
- Expose the next performance to RouteBuilders, since sometimes the
route itself might not be where it's used.
- Allow BuildContext to be used to walk children, just like it can for
ancestors
- Allow BuildContext to be used to get the Widget of the current
BuildContext
- Allow StatefulComponentElement to be referenced with a type
specialisation so that you don't have to cast when you know what the
type you're dealing with actually is.
Also, introduce Colors and Typography to hold the material colors and the
typography declarations. Previously we expected clients of these libraries to
import them into a namespace, but that doesn't play nice with re-exporting them
from material.dart.
This still leaves Flex and FlexDirection available. At some point once
people have transitioned to Row/Column we should rename Flex to _Flex
and stop reexporting FlexDirection from basic.dart.