패키지, 저장소 및 앱 카테고리 검색

패키지 상세v2.0.8

isolator

Isolator는 BLoC, MobX, ChangeNotifier 등 다양한 유형의 격리된 부분과 프론트엔드 부분을 가진 두 구성 요소 상태를 간단하게 만들 수 있도록 도와주는 패키지입니다

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
123
좋아요
84
Pub 점수
150

패키지 설치

flutter pub add isolator

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Isolator는 두 구성 요소 상태 관리 시스템을 생성하는 것을 간소화하는 Flutter/Dart 패키지로, UI 계층에서 고립된 로직(예: BLoC, MobX, ChangeNotifier)을 분리합니다. 상태 로직과 표현을 분리함으로써 깔끔한 아키텍처를 가능하게 하며, 재사용성과 테스트 가능성도 향상시킵니다. 이 패키지는 모든 주요 플랫폼에서 다양한 상태 관리 솔루션을 지원하여 확장 가능한 애플리케이션에 이상적입니다. 최소한의 설정으로 개발자는 구조적으로 상태를 쉽게 통합하고 관리할 수 있습니다.

사용 사례

  • 재사용 가능한 상태 로직 빌드
  • 사용자 인터페이스를 비즈니스 로직에서 분리
  • 독립적으로 상태 컴포넌트 테스트하기
  • 여러 상태 관리 패턴 지원
  • 모듈러 앱 아키텍처 만들기
  • 화면 간 상태 공유를 단순화하기

주요 기능

  • 두 구성 요소 상태 분리
  • BLoC, MobX, ChangeNotifier 지원
  • 크로스 플랫폼 호환성
  • 기존 상태 관리자와의 간편한 통합
  • 경량이며 최소한의 보일러플레이트
  • 내장 테스트 지원

적합한 대상

  • BLoC/MobX/ChangeNotifier 사용 개발자
  • 클린 아키텍처를 채택하는 팀
  • 테스트 가능한 상태 로직이 필요한 프로젝트
  • 복잡한 상태가 필요한 앱
  • 모듈성을 찾는 플러터 개발자

고려 사항

  • 상태 관리 패턴에 대한 이해가 필요합니다
  • 중소에서 대규모 앱에 가장 적합
  • 간단한 사용 사례에 복잡성을 추가할 수 있음
  • 사용 가능한 문서가 제한적입니다
  • 전용 상태 라이브러리의 완전한 대체물이 아님

원본 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 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.