パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v2.0.8

isolator

Isolator は、BLoC、MobX、ChangeNotifier など、任意の種類の分離部分とフロントエンド部分を持つ二部構造の状態を簡単に作成できるパッケージです

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
123
いいね数
84
Pub ポイント
150

パッケージをインストール

flutter pub add isolator

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Isolator は、Flutter/Dart パッケージであり、2 コンポーネントの状態管理システムの作成を簡素化し、UI レイヤーから独立したロジック(例:BLoC、MobX、ChangeNotifier)を分離します。状態ロジックとプレゼンテーションを分離することで、クリーンアーキテクチャを実現し、再利用性とテスト性を高めます。このパッケージは、すべての主要プラットフォームで複数の状態管理ソリューションをサポートしており、スケーラブルなアプリケーションに最適です。最小限のセットアップで、開発者は構造的に状態を簡単に統合・管理できます。

用途

  • 再利用可能な状態ロジックの構築
  • UIをビジネスロジックから分離する
  • 状態コンポーネントを独立してテストする
  • 複数の状態管理パターンをサポートする
  • モジュール型アプリアーキテクチャの作成
  • 画面間での状態共有を簡素化する

主な機能

  • 2つのコンポーネントによる状態の分離
  • BLoC、MobX、ChangeNotifier のサポート
  • クロスプラットフォーム互換性
  • 既存のステートマネージャーとの簡単な統合
  • 軽量で最小限のボイラープレート
  • 組み込みテストサポート

適している対象

  • BLoC/MobX/ChangeNotifier を使用する開発者
  • クリーンアーキテクチャを採用するチーム
  • テスト可能な状態論理を必要とするプロジェクト
  • 複雑な状態が必要なアプリ
  • モジュール性を求めるFlutter開発者

注意事項

  • 状態管理パターンの理解が必要です
  • 中規模から大規模なアプリに最適
  • シンプルな利用ケースに対して複雑さを追加する可能性がある
  • 利用可能なドキュメントが限られている
  • 専用の状態ライブラリの完全な置き換えではない

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

License Pub

Isolator

Do you ever want to use isolates in your app, but think, that it is very complex? Or, maybe, you feel that your app has some lugs when you open some screen, which needs data from a backend? With the Isolator, all these problems go out. Have an always stable frame rate at 60 / 120 per second. Don't have any problems with UI-thread junks. And feel happy.


Demo of app, which using Isolator.

Source code of this app.


Description

Isolator is a package, which offer to you a simple way for creating two-component states with isolated part, named Backend and Frontend part in UI-isolate of any kind (BLoC, MobX, ChangeNotifier, and many others).

With Isolator you can use all benefits of isolate API without boilerplate code.

Also, Isolator works with Flutter Web, but without multi-threading (because Dart itself has no Web support for isolate API).

Main concepts

Frontend

Frontend - this is the first part of your two-classes logic component. It can use any state management as a base to update your UI: ChangeNotifier, Mobx, Bloc, and any another.

Frontend's mission is in calling Backend's methods, which must be registered through whenEventCome(SomeEvent).run(_someBackendMethod) method in Backend.

Also, Frontend can register its own message handlers in the same manner: whenEventCome(SomeEvent).run(someFrontendMethod) to react on Backend's messages.

And also you can subscribe on your Frontend to get notifications about new messages from the corresponding Backend.

Backend

Backend - this is the second part of the two-classes logic component. All Backend's will run in separated isolate and doesn't affect to UI-isolate. That means, that if you have CPU-heavy logic, big-data parsing or manipulating - you can do this in your Backend and your interface will not drop any frame at all!

Interactor

Interactor - it is an additional part of Backend, which is used to communicate between any Backends without affecting UI-isolate.

Other

You can run each Backend in its separate isolate, or you can run part of Backends in one isolate and another part in another isolate (with pool param).

If you want to know all possibilities of this package, please - investigate this project, which I made to show how Isolator can be used. Also, you can research the tests for the Isolator itself, which have examples for almost all API.

Articles about Isolator

And finally - at the moment I am writing several articles about using my Open Source packages in real projects and when they will be ready - I will attach links to this readme in order to explain in as much detail as possible how to get the most advantages out of this library and from others too.

Schema of interaction

Schema

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。