Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.1

* Fix plugin name in MethodChannel

## 1.0.0

Initial release
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ part of cloud_functions_platform_interface;
/// [CloudFunctionsPlatform] implementation that delegates to a [MethodChannel].
class MethodChannelCloudFunctions extends CloudFunctionsPlatform {
/// The [MethodChannel] to which calls will be delegated.
/// Note that this name must match the name used in the platform (iOS/Android)
/// plugin.
@visibleForTesting
static const MethodChannel channel = MethodChannel(
'plugins.flutter.io/cloud_functions',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I created this file, I was copying and modifying a different plugin and didn't understand exactly how MethodChannel names worked. The plugin I was cribbing from used a different naming convention, and I didn't catch the mistake. The unit tests only check to see that the MethodChannel gets invoked, not what the channel name is. Moreover, the actual iOS and Android implementations are in the cloud_functions plugin, not this platform interface plugin, meaning integration testing is problematic. This feels to me like an architecture problem -- like maybe the method channel implementation should be in the plugin with the platform implementations -- but there are ramifications that get complicated, and the "right thing" might wind up being a breaking change.

'cloud_functions',
);

/// Invokes the specified cloud function.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A common platform interface for the cloud_functions plugin.
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_functions/cloud_functions_platform_interface
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 1.0.0
version: 1.0.1

dependencies:
flutter:
Expand Down