Skip to content

Commit c1eab96

Browse files
committed
Setup event channel foundation
1 parent f4800d4 commit c1eab96

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

flutter_module/channel/contract.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ abstract class ChannelModelEventApi {
160160
ModelEventData channelEvent();
161161
}
162162

163+
@EventChannelApi()
164+
abstract class ChannelModelEventApi {
165+
ModelStateData channelState();
166+
167+
ModelEventData channelEvent();
168+
}
169+
163170
@HostApi()
164171
abstract class ChannelMainModel {
165172
void resetEvent();

flutter_module/lib/generated/data_model.g.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ Stream<ModelStateData> channelState( {String instanceName = ''}) {
647647
return event as ModelStateData;
648648
});
649649
}
650-
650+
651651
Stream<ModelEventData> channelEvent( {String instanceName = ''}) {
652652
if (instanceName.isNotEmpty) {
653653
instanceName = '.$instanceName';
@@ -658,7 +658,7 @@ Stream<ModelEventData> channelEvent( {String instanceName = ''}) {
658658
return event as ModelEventData;
659659
});
660660
}
661-
661+
662662

663663
class ChannelMainModel {
664664
/// Constructor for [ChannelMainModel]. The [binaryMessenger] named argument is

0 commit comments

Comments
 (0)