From f14055529b17df7eb694e17d73477b013db5f817 Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Tue, 11 Dec 2018 09:53:45 -0800 Subject: [PATCH] Fixed an InheritedWidget doc typo (#25168) --- packages/flutter/lib/src/widgets/framework.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index 391f0be9b4..f70f9e9f43 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -1520,7 +1520,7 @@ abstract class ParentDataWidget extends ProxyWidge /// final Color color; /// /// static FrogColor of(BuildContext context) { -/// return context.inheritFromWidgetOfExactType(FrogColor); +/// return context.inheritFromWidgetOfExactType(FrogColor) as FrogColor; /// } /// /// @override @@ -1531,8 +1531,8 @@ abstract class ParentDataWidget extends ProxyWidge /// /// The convention is to provide a static method `of` on the [InheritedWidget] /// which does the call to [BuildContext.inheritFromWidgetOfExactType]. This -/// allows the class to define its own fallback logic in the case of there not -/// being a widget in scope. In the example above, the value returned will be +/// allows the class to define its own fallback logic in case there isn't +/// 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. /// /// Sometimes, the `of` method returns the data rather than the inherited