brix_riverpod 2.0.0
brix_riverpod: ^2.0.0 copied to clipboard
Riverpod notifiers for every brix account screen: login, signup, email code, reset, profile and delete account, with immutable states and no Flutter objects inside.
2.0.0 #
Breaking: the notifiers follow the Riverpod docs and hold no Flutter objects (no form keys, text controllers, focus nodes or code boxes). The screen owns its fields and sends what is typed; the state is immutable (Equatable, copyWith).
- Removed
BrixAuthFormNotifier,BrixCodeEntryNotifier,initFields/disposeFieldsand everyformKey,...Controllerandboxesfield. - New input methods:
identifierChanged,passwordChanged,confirmPasswordChanged,currentPasswordChanged,newPasswordChanged. Typed values live in the state. - Code screens pass the code:
verify(code),submit(code),confirm(code).otpLengthgives the box count. Clear yourOtpCodeBoxeswhenfailedAttemptsgoes up. BrixProfileNotifier.save(update)takes the app's typed update;onUserLoadedandbuildUpdateare gone. Fill your form whenstate.userfirst arrives.BrixForgotPasswordNotifierhas its ownBrixForgotPasswordState.- Example:
ProviderScopeinstead of a globalProviderContainer; the login screen fills a prefilled email indidUpdateWidget.
Migration: make each screen a ConsumerStatefulWidget with its own GlobalKey<FormState> and controllers, wire onChanged to the new methods, validate the form, then call login(), signup(), submit() and so on.
- Docs: new README in the pub.dev format (short description first, features, usage, what is not included yet, the brix family with brix_bloc) and new screenshots.
1.0.0 #
BrixAuthFormNotifier: base Riverpod notifier for a brix form (form key, busy state, flow disposed with the provider).BrixLoginNotifierandBrixLoginState: login with remember me, password visibility and prefill.BrixSessionNotifier: start and logout on brixSessionFlow.BrixCodeEntryNotifierandOtpCodeBoxes: base for code screens (boxes, resend, boxes cleared on a rejected code).BrixOtpNotifier: signup code, submits on the last digit. State is the flow'sCodeEntryState.BrixSignupNotifierandBrixSignupState,BrixForgotPasswordNotifier,BrixResetPasswordNotifierandBrixResetPasswordState,BrixChangePasswordNotifierandBrixChangePasswordState. Unmet password rules live in the state.initFields/disposeFieldson the base notifiers for the app's own fields.BrixProfileNotifier: loads on start, fills the app's form, keeps unsaved typing during an avatar upload. State is the flow'sProfileState.BrixDeleteAccountNotifier: code, confirm and password modes, focus on the first box once the code is sent.isRequestingonCodeEntryState.- Example app on a demo backend (login, signup, code, forgot and reset password, logout) with an end-to-end test.
