Flutter State Management: Going from setState to Freezed & StateNotifier with Provider

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ต.ค. 2024

ความคิดเห็น • 34

  • @nipunmadan1989
    @nipunmadan1989 3 ปีที่แล้ว +12

    This must go on official flutter channel. Complex topic explained easily.

  • @dantong8934
    @dantong8934 3 ปีที่แล้ว +1

    Thanks for the tutorial. Very easy and deep understanding.

  • @aloussase
    @aloussase 5 หลายเดือนก่อน

    Im not sure when sealed classes came out, but today id think that is the way to go for modeling state

  • @ilmtvtamil
    @ilmtvtamil 3 ปีที่แล้ว +1

    why google didn't hire you yet?

  • @alejandrogonzalez5192
    @alejandrogonzalez5192 3 ปีที่แล้ว +1

    Hey Andrea, thanks for the tutorial!
    Would you suggest going for Freezed + StateNotifier for a production app?

  • @akashkashyap8756
    @akashkashyap8756 3 ปีที่แล้ว

    Great video... thanks for making this...

  • @BrendansReasons
    @BrendansReasons 3 ปีที่แล้ว

    explanation of maybeWhen at 19:30 was unclear to me

  • @SharpSangalli
    @SharpSangalli 3 ปีที่แล้ว

    Very helpful!

  • @ashishranjan7586
    @ashishranjan7586 3 ปีที่แล้ว

    a explaination video of movie app..🥺🥺

  • @BrendansReasons
    @BrendansReasons 3 ปีที่แล้ว

    you cut through the crap, thank you

  • @flaasher
    @flaasher 3 ปีที่แล้ว +1

    One of the best flutter channels ..... respect :)

  • @m.husnulaqib1458
    @m.husnulaqib1458 2 ปีที่แล้ว

    thanks

  • @sumayyariyas8564
    @sumayyariyas8564 3 ปีที่แล้ว

    Hi.. Could you please share a video how to integrate google fit to flutter app? Really want this.. Thanks in advance

  • @Nackenschelle
    @Nackenschelle 2 ปีที่แล้ว

    this is f***ing gold, highly appreciated!!

  • @julienlbrn
    @julienlbrn 3 ปีที่แล้ว

    👋🏻 Andrea! Thank you for this tutorial.
    At 14:26, I needed to import 'package:flutter/foundation.dart' at the top of the file to make the command line generate the .freezed file. How could it work for you without it?

  • @mohamedeltaher1611
    @mohamedeltaher1611 3 ปีที่แล้ว

    thank u

  • @meshkatshadik
    @meshkatshadik 3 ปีที่แล้ว

    How can a single StateNotifier class produce two/more different states?
    Or do I just need the same number of StateNotifier classes for each state?
    I'm stuck with this problem for around 3 days. Still stuck!

  • @ericchua3492
    @ericchua3492 3 ปีที่แล้ว

    I need some help.
    What if the behavior is this
    i. Load Profile if any
    ii. Edit Profile
    How do you construct the ProfileState and ProfiileModel? I am struggling to have both Load and Edit in the same StateNotifier and how to manage the State (freezed).
    The unexpected behavior
    i. load profile
    ii. tap on save
    iii. profile saved
    iv. profile is hidden (profile is already loaded, why can't it stays on the screen??? )
    my state freezed as below (not sure should I combine or mixed)
    @freezed
    abstract class EditProfileState with _$EditProfileState {
    // General
    const factory EditProfileState.error(String errorText) = _Error;
    // Edit
    const factory EditProfileState.loading() = _Loading;
    const factory EditProfileState.success() = _Success;
    // Load profile
    const factory EditProfileState.dataInitial() = _DataInitial;
    const factory EditProfileState.dataLoading() = _DataLoading;
    const factory EditProfileState.dataLoaded(User user) =
    _DataLoaded;
    }
    Do you have any sample codes to achieve the above? Thanks.

    • @CodeWithAndrea
      @CodeWithAndrea  3 ปีที่แล้ว

      I would think the states you need are:
      - noData
      - data(user)
      - loading
      - error
      Maybe you should load the initial data from your DB before showing the profile page? Then you can initialize your initial state with noData or data(user) accordingly.

    • @ericchua3492
      @ericchua3492 3 ปีที่แล้ว

      @@CodeWithAndrea if i want to edit the profile, upon success which state will it be? data (user) ?

  • @hameedhabeeblahi576
    @hameedhabeeblahi576 3 ปีที่แล้ว

    api key file is missing pl

  • @meansnada
    @meansnada 3 ปีที่แล้ว

    whats the theme you use? looks amazing

  • @bashiruibrahim8443
    @bashiruibrahim8443 3 ปีที่แล้ว

    Wow thank you Sir

  • @techhublearn1
    @techhublearn1 3 ปีที่แล้ว

    Sir does the courses on your site give certificate after completion?

    • @CodeWithAndrea
      @CodeWithAndrea  3 ปีที่แล้ว +1

      Yes, all courses come with a completion certificate.

  • @KraasRas
    @KraasRas 3 ปีที่แล้ว

    How did you made the screen cast video on the beginning of your great tutorial?

    • @CodeWithAndrea
      @CodeWithAndrea  3 ปีที่แล้ว +3

      Recorded the app with QuickTime, rendered with Rotato

    • @KraasRas
      @KraasRas 3 ปีที่แล้ว

      @@CodeWithAndrea Thank you. It looks really nice

  • @hameedhabeeblahi576
    @hameedhabeeblahi576 3 ปีที่แล้ว

    from the code on github, api key file is missing

    • @CodeWithAndrea
      @CodeWithAndrea  3 ปีที่แล้ว

      Read the instructions on the README on the GitHub repo

  • @faheemahmadofficial7701
    @faheemahmadofficial7701 3 ปีที่แล้ว +2

    dear brother please please please please please please make flutter series for beginners by using latest mini frameworks for like get tax and other and also teachers basic applications building instead of wasting time on dark