tbm98 / flutter-riverpod-live-templates

Some built-in live templates support developers to use Flutter Riverpod faster on Intellij based
33 stars 4 forks source link

Add statenotifier (Create StateNotifier template) #1

Closed HugoHeneault closed 4 years ago

HugoHeneault commented 4 years ago

It isn't from Riverpod but I use this one quite often and I think it is missing here :-)

HugoHeneault commented 4 years ago

Or maybe we can update StateNotifierProvider snippet to create the StateNotifier and its Provider?

class $name$Notifier extends StateNotifier<$result$> {
  $name$Notifier(): super($initialState$);

  $END$
}

final $name$Provider = StateNotifierProvider<$name$Notifier>((ref) => $name$Notifier());

which gives

class BalanceNotifier extends StateNotifier<double> {
  BalanceNotifier(): super(0.0);

}

final BalanceProvider = StateNotifierProvider<BalanceNotifier>((ref) => BalanceNotifier());
tbm98 commented 4 years ago

I think we should just create each of them independently.

HugoHeneault commented 4 years ago

Updated my PR :-)

Also would you add the hacktoberfest topic to this repo saying that you allows other devs to contribute to your repo while participating to it?

Thanks :)

tbm98 commented 4 years ago

Also would you add the hacktoberfest topic to this repo saying that you allows other devs to contribute to your repo while participating to it?

How to apply it ?

HugoHeneault commented 4 years ago

Also would you add the hacktoberfest topic to this repo saying that you allows other devs to contribute to your repo while participating to it?

How to apply it ?

They say "Maintainers can opt-in to participate by classifying their projects with the hacktoberfest topic.", it's on the main page in the about section:

image

tbm98 commented 4 years ago

Yes. I will try it 😁

Vào 19:30, Th 7, 10 thg 10, 2020 Hugo Heneault notifications@github.com đã viết:

Also would you add the hacktoberfest topic to this repo saying that you allows other devs to contribute to your repo while participating https://hacktoberfest.digitalocean.com/ to it?

How to apply it ?

They say "Maintainers can opt-in to participate by classifying their projects with the hacktoberfest topic.", it's on the main page in the about section:

[image: image] https://user-images.githubusercontent.com/4112256/95655079-23e6c380-0b05-11eb-9ab4-a46ebc89177f.png

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/tbm98/flutter-riverpod-live-templates/pull/1#issuecomment-706541965, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMRATJDBGZN75ZNKHZDHHADSKBHYHANCNFSM4SHX2T7A .