nop 0.2.0+3 copy "nop: ^0.2.0+3" to clipboard
nop: ^0.2.0+3 copied to clipboard

Isolate 通信

Isolate. #

example


part 'isolate_event.g.dart';

@NopServerEvent()
@NopServerEventItem(serverName: 'isolate')
abstract class IsolateEvent implements FirstEvent, SecondEvent, ThirdEvent {}

@NopServerEventItem(serverName: 'first_isolate')
abstract class FirstEvent {
  FutureOr<bool?> workStatus();
  FutureOr<String?> getBookName(int id);
}

abstract class SecondEvent implements OtherEvents {
  Stream<String?> getStream();
}

@NopServerEventItem(
    serverName: 'third_isolate', connectToServer: ['first_isolate'])
abstract class ThirdEvent {
  // function
}

abstract class OtherEvents {
  void doOtherWrok();
}

dart run build_runner build --delete-conflicting-outputs
1
likes
120
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

Isolate 通信

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

characters, collection, equatable, meta

More

Packages that depend on nop