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

GitHub リポジトリandrea689/flutter_bloc_devtools

flutter_bloc_devtools

flutter_bloc のリモート DevTools。このパッケージはすべての Bloc(Cubit には対応していません)をリモート DevTools サーバーに接続し、実行時に Bloc の変更を確認できるようにします。

flutter_bloc_devtools のプロジェクト画像
スター
70
フォーク
15
最終プッシュ(UTC)
2021/12/30
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

Remote Devtools for flutter_bloc

Remote Devtools support for Blocs of flutter_bloc.

N.B. Cubit is not supported

Devtools Demo

Installation

Add the library to pubspec.yaml:

dependencies:
  flutter_bloc_devtools: ^0.1.0

BlocObserver configuration

Add RemoteDevToolsObserver to your Bloc.observer:

void main() async {
  final observer = RemoteDevToolsObserver('192.168.1.7:8000');
  await observer.connect();
  Bloc.observer = observer;

  runApp(const CounterApp());
}

Making your Events and States Mappable

Events and States have to implements Mappable:

class CounterState extends Equatable implements Mappable {
  final int counter;

  const CounterState({
    this.counter,
  });

  @override
  List<Object> get props => [
        counter,
      ];

  @override
  Map<String, dynamic> toMap() => {
        'counter': counter,
      };
}

Using remotedev

Use the Javascript Remote Devtools package. Start the remotedev server on your machine

npm install -g remotedev-server
remotedev --port 8000

Run your application. It will connect to the remotedev server. You can now debug your flutter_bloc application by opening up http://localhost:8000 in a web browser.

Examples

Andrea Valenzano GitHub avatar
GitHub 作者

Andrea Valenzano ↗

Software Engineer @ 3Bee - Flutter enthusiast

Catania
言語DartRubySwiftKotlinObjective-C

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 3 件

  • bloc^6.1.0
  • socketcluster_client^0.2.0
  • pedantic開発用^1.9.0

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗