Flutter: Scoped Access with InheritedWidget
Andrea Bizzotto
@codewithandreaAbout
Tutorials about learning Flutter. Subscribe for regular videos covering all things Flutter, including state management, layouts, testing, and more. About me: I'm Andrea, and I created this channel to help you become a better Flutter developer. You can find more Flutter tutorials beyond my YouTube channel: Website: https://codewithandrea.com/ GitHub: https://github.com/bizz84 Flutter & Firebase Udemy Course (discount code included): https://nnbd.me/flutter-firebase
Latest Posts
Video Description
Full source code on GitHub: https://github.com/bizz84/coding-with-flutter-login-demo Sign up here for more videos: https://codewithandrea.com/ Flutter & Firebase Udemy Course (with discount code): https://codewithandrea.com/courses/flutter-firebase/ In this video I show how to use InheritedWidget to provide scoped access to dependencies within a widget tree. This is based on my previous Flutter & Firebase videos: https://youtu.be/u_Lyx8KJWpg Highlights: - How to create your own InheritedWidget subclasses - Comparison between constructor dependency injection and scoped access with InheritedWidget - Refactor an existing project to use InheritedWidget 00:00 - Intro 01:39 - Flutter Login Demo: project overview 05:08 - Widget tree diagrams 08:28 - Implement AuthProvider class extending InheritedWidget 13:13 - Refactor app to use new AuthProvider 19:07 - Summary Notes: - I'm using the iOS simulator, but you can open the Android emulator and run the same code. - To run the code on the demo, follow the instructions on the project README file to setup your own Firebase instance. If you need any help, just ask in the comments. I'll be happy to help. Feedback and suggestions on new tutorials are very welcome! This code was written with Flutter Beta 0.5.1, and is tested to work with Dart 2. Want more? Check out all my Flutter courses: 👇👇 https://codewithandrea.com/courses/ Thanks for watching!
Boost Flutter Skills Today
AI-recommended products based on this video

INIU 45W Power Bank, Ultra Small 10000mAh Portable Charger, USB C in&Out Fast Charging Battery Pack, Travel External Phone Powerbank Compatible with iPhone 16 15 Samsung S25 S24 Google Pixel iPad etc

Deeyaple USB C to Aux, 4FT/1.2M, Type C to 3.5mm Audio Cable Headphone Jack Cable for Car Mobile Phone, iPhone 16 15, iPad Pro, Samsung Galaxy S24 S23 S2010, Google Pixel,Oneplus Grey (1)

Magnetic Car Mount Air Vent Cell Phone Holder, Universal Vehicle Dash Dashboard Ac Airvent Cellphone Magic Stand with Clip Hook, for iPhone 16 15 Samsung Lenovo Google etc

blurams Security Camera, 2K Indoor Camera 360-degree Pet Camera for Home Security w/ Motion Tracking, Phone App, 2-Way Audio, IR Night Vision, Siren, Works with Alexa & Google Assistant,White

75Kpa Food Vacuum Sealer, 6-in-1 Dry/Moist Modes with Digital Timer, Compact Design, 10 Bags & Built-in Cutter (Sliver)










