Unverified Commit f1405552 authored by Hans Muller's avatar Hans Muller Committed by GitHub

Fixed an InheritedWidget doc typo (#25168)

parent 625a37b8
...@@ -1520,7 +1520,7 @@ abstract class ParentDataWidget<T extends RenderObjectWidget> extends ProxyWidge ...@@ -1520,7 +1520,7 @@ abstract class ParentDataWidget<T extends RenderObjectWidget> extends ProxyWidge
/// final Color color; /// final Color color;
/// ///
/// static FrogColor of(BuildContext context) { /// static FrogColor of(BuildContext context) {
/// return context.inheritFromWidgetOfExactType(FrogColor); /// return context.inheritFromWidgetOfExactType(FrogColor) as FrogColor;
/// } /// }
/// ///
/// @override /// @override
...@@ -1531,8 +1531,8 @@ abstract class ParentDataWidget<T extends RenderObjectWidget> extends ProxyWidge ...@@ -1531,8 +1531,8 @@ abstract class ParentDataWidget<T extends RenderObjectWidget> extends ProxyWidge
/// ///
/// The convention is to provide a static method `of` on the [InheritedWidget] /// The convention is to provide a static method `of` on the [InheritedWidget]
/// which does the call to [BuildContext.inheritFromWidgetOfExactType]. This /// which does the call to [BuildContext.inheritFromWidgetOfExactType]. This
/// allows the class to define its own fallback logic in the case of there not /// allows the class to define its own fallback logic in case there isn't
/// being a widget in scope. In the example above, the value returned will be /// a widget in scope. In the example above, the value returned will be
/// null in that case, but it could also have defaulted to a value. /// null in that case, but it could also have defaulted to a value.
/// ///
/// Sometimes, the `of` method returns the data rather than the inherited /// Sometimes, the `of` method returns the data rather than the inherited
......
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