velocity_bloc
簡約且易用的狀態管理,靈感來自 Dart 泛型的 Bloc。
一個受 Dart 泛型啟發的缺失的 Bloc 狀態管理外掛。
^9.0.0^2.0.7{"sdk":"flutter"}^9.0.0{"sdk":"flutter"}^5.0.0以下為英文專案原文快照,最新內容請造訪 GitHub。
codersangam - velocity_bloc stars - velocity_bloc forks - velocity_bloc GitHub release License issues - velocity_bloc
In the pubspec.yaml of your flutter project, add the following dependency:
dependencies:
...
velocity_bloc: <latest_version>
In your library add the following import:
import 'package:velocity_bloc/velocity_bloc.dart';
.onUpdateData(dynamic data) - updates the bloc with new data on states.
.onFailedResponse(String error) - holds the failed responses/exceptions as String.
VelocityInitialState - Initial state of the bloc.
VelocityUpdateState - Loaded/Updated state of the bloc.
VelocityFailedState - Failed/Error state of the bloc.
For help getting started with Flutter, view the online documentation.
Released under MIT by @codersangam.