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.