Visitar URL original
Pigeon : Support for asynchronous methods/Functions by xsahil03x · Pull Request #201 · flutter/packages · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added a compilation test.
  • Loading branch information
gaaclarke committed Sep 29, 2020
commit 8f20a396a1e49f34443401efce3ab055a80082f3
21 changes: 21 additions & 0 deletions packages/pigeon/pigeons/async_handlers.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2020 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:pigeon/pigeon.dart';

class Value {
int number;
}

@HostApi()
abstract class Api2Host {
@async
Value calculate(Value value);
}

@FlutterApi()
abstract class Api2Flutter {
@async
Value calculate(Value value);
}
3 changes: 3 additions & 0 deletions packages/pigeon/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ test_pigeon_android ./pigeons/void_arg_host.dart
test_pigeon_android ./pigeons/void_arg_flutter.dart
test_pigeon_android ./pigeons/list.dart
test_pigeon_android ./pigeons/all_datatypes.dart
test_pigeon_android ./pigeons/async_handlers.dart
test_pigeon_ios ./pigeons/message.dart
test_pigeon_ios ./pigeons/host2flutter.dart
test_pigeon_ios ./pigeons/voidhost.dart
Expand All @@ -99,6 +100,8 @@ test_pigeon_ios ./pigeons/void_arg_host.dart
test_pigeon_ios ./pigeons/void_arg_flutter.dart
test_pigeon_ios ./pigeons/list.dart
test_pigeon_ios ./pigeons/all_datatypes.dart
# Not implemented yet.
# test_pigeon_ios ./pigeons/async_handlers.dart

###############################################################################
# Mock handler flutter tests.
Expand Down