Flutter State Management: Going from setState to Freezed & StateNotifier with Provider
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
Mixing UI and logic inside Flutter widgets is bad. Here's how to refactor a simple app for better separation of concerns, immutability, and type safety using Freezed & State Notifier. Written tutorial here: 👇👇 https://codewithandrea.com/videos/flutter-state-management-setstate-freezed-state-notifier-provider/ As a bonus, here's a movie app built to compare Provider, flutter_bloc and Riverpod: https://github.com/bizz84/movie_app_state_management_flutter CONTENTS: 00:00 - Intro 02:03 - Example Starter Project: Create Profile Page with setState 05:59 - ChangeNotifier implementation and its drawbacks 12:07 - Freezed package 15:47 - StateNotifier 16:55 - Using Freezed + StateNotifier + Provider 20:24 - Wrap Up 21:53 - Movie app on GitHub Join my FREE email course to become a Flutter expert with the best resources, at your own pace: https://codewithandrea.com/newsletter/ Want more? Check out all my Flutter courses: 👇👇 https://codewithandrea.com/courses/ Happy coding!
Boost Flutter Dev Setup
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

Car Carplay Woven Cable for iPhone 16 15 3.3FT USB A to USB C 3.2 Gen 2 Carplay Adapter Wire for iPhone 16 15 Pro Max, iPad Pro/Air, Samsung Galaxy S25/S24/S23/S22/S21 Google Pixel, Car Charger Cable

Google Pixel Buds Pro 2 - Noise Canceling Earbuds - Up to 31 Hour Battery Life with Charging Case - Bluetooth Headphones - Compatible with Android - Hazel

MOSISO Laptop Case 13 inch, 13 inch Laptop Sleeve Bag Compatible with MacBook Air 13 M4 M3 M2 M1 2025-2018 / Pro 13 M2 M1 2025-2016, Neoprene Computer Sleeve Bag with Small Case, Space Gray Global Recycled Standard

MOSISO Compatible with MacBook Air 13 inch Case 2021, 2020-2018 Release A2337 M1 A2179 A1932, Plastic Hard Shell&Keyboard Cover&Screen Film&Storage Bag for MacBook Air 13.3 inch Case, Crystal Clear

tomtoc 360° Protective Laptop Sleeve for 13-inch New MacBook Air M4/A3240 2025, M3/A3113, M2/A2681 M1/A2337 A2179 A1932, 13-inch MacBook Pro M2/A2686 M1/A2338, Water-Resistant Computer Case Bag Global Recycled Standard

MOSISO 13-14 inch Laptop Case, 13.3 inch Puffy Laptop Sleeve Compatible with MacBook Air 13 13.6 M4 M3 M2 M1/Pro 13/Pro 14,HP,Dell,ASUS, Lenovo, Polyester Horizontal Bag with Small Case, Rose Red Global Recycled Standard

Syntech USB C to USB Adapter Pack of 2 USB C Male to USB3 Female Adapter Compatible with MacBook Pro 2021 iMac iPad Mini 6/Pro MacBook Air 2020 and Other Type C or Thunderbolt 4/3 Devices Space Grey

ProCase Smart Case for iPad mini 7 A17 Pro 2024/ Mini 6 2021 8.3 Inch, Hard Back Cover for iPad mini 8.3" 7th Gen A2995/A2996/A2993/6th Gen A2567 A2568 A2569 -Navy

ProCase Smart Case for iPad mini 7 A17 Pro 2024/ Mini 6 2021 8.3 Inch, Hard Back Cover for iPad mini 8.3" 7th Gen A2995/A2996/A2993/6th Gen A2567 A2568 A2569 -Black

140W C to C Super Fast Charger,Compatible with MacBook Pro 16, 15, 14, 13 Inch, MacBook Air 13 Inch, iPad Pro 2021/2020/2019/2018, Lenovo and All Type C Devices 7.2ft

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black

Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

Cmokifuly GMK67 65% Mechanical Keyboard Kit Tri-Mode South-Facing RGB LED for 3/5pin Switches,66 Keys+1 Knob Hotswap Socket PCB Gasket Mounted Plate Gaming DIY Keyboard Kit (White)

5 Pcs Adult Keyboard Clicker Toys, Portable Mechanical Keyboard Keychain Toy, Decompression Toys, Funny Cube Key Button Stress Relief for Adults Present to Relief Pass Time

Asus ROG Azoth Wireless Mechanical Gaming Keyboard – 75% TKL, Tri-Mode Connectivity, Hot Swappable Pre-lubed ROG NX Snow Linear Switches, PBT Keycaps, RGB, OLED Display, PC/Mac Support - Black

TMKB 60% Mechanical Gaming Keyboard, Brown Tactile Switch, LED Backlight, Anti-Ghosting, Detachable USB-C, Double-Shot Keycaps, 61 Keys, Wired, White

UGREEN Revodok USB C Hub, 5-in-1 USB C Adapter with 4K HDMI, 100W Power Delivery, 3 USB A Data Ports, Multiport USB Hub for MacBook Pro/Air, iPad Pro, Surface, XPS, Thinkpad, Galaxy and More, Gray
![SAMSUNG EVO Select Micro SD-Memory-Card + Adapter, 128GB microSDXC 160MB/s Full HD & 4K UHD, UHS-I, U3, A2, V30, for Android Smartphones, Tablets, Nintendo-Switch (MB-ME128SA/AM) [Canada Version]](https://m.media-amazon.com/images/I/71lzXt4djxL._AC_UY654_FMwebp_QL65_.jpg)
SAMSUNG EVO Select Micro SD-Memory-Card + Adapter, 128GB microSDXC 160MB/s Full HD & 4K UHD, UHS-I, U3, A2, V30, for Android Smartphones, Tablets, Nintendo-Switch (MB-ME128SA/AM) [Canada Version]
![Samsung EVO Select Micro SD Memory Card + Adapter, 256GB microSDXC 160MB/s Full HD & 4K UHD, UHS-I, U3, A2, V30, for Android Smartphones, Tablets, Nintendo-Switch (MB-ME256SA/AM) [Canada Version]](https://m.media-amazon.com/images/I/71gQWJ9ufdL._AC_UL960_FMwebp_QL65_.jpg)









