2

I'm looking into InheritedWidget to learn and I want to know about the default InheritedWidgets provided by Flutter.

I've come to know that the MediaQuery class is by default InheritedWidget in Flutter and I'm guessing there are more of it.

If anyone knows about this then please do let me know.

Also will you please provide me the best example for InheritedWidget

Thank you

NøBi Mac
  • 505
  • 5
  • 15

1 Answers1

0

InheritedWidget Class is the default inherited widget provided by flutter. MediaQuery or other like widgets extend this widget to implement functioning.

IonicFireBaseApp
  • 925
  • 3
  • 10
  • Yes you are correct but i want to know about other widgets which are extending `InheritedWidget` by default in flutter. – NøBi Mac Oct 13 '22 at 13:04
  • 1
    BottomNavigationBarThemeButtonBarThemeCheckboxThemeCupertinoUserInterfaceLevelDataTableThemeDefaultAssetBundleDirectionalityDropdownButtonHideUnderlineFlexibleSpaceBarSettingsFocusTraversalOrderHeroControllerScopeInheritedModelInheritedNotifierInheritedThemeMediaQueryPrimaryScrollControllerRadioThemeScrollbarThemeScrollConfigurationSelectionRegistrarScopeSwitchThemeUnmanagedRestorationScope – IonicFireBaseApp Oct 13 '22 at 13:09
  • will you please give me reference from where you get this – NøBi Mac Oct 13 '22 at 13:30
  • https://api.flutter.dev/flutter/widgets/InheritedWidget-class.html down a bit to "implementors". – Randal Schwartz Oct 13 '22 at 16:00
  • You can also use your IDE to go to the "symbol" InheritedWidget, then "browse all references" to that class. – Randal Schwartz Oct 13 '22 at 16:03