You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
samples/platform_channels
Ayush Bherwani ed73e7a310
[platform_channels] adds iOS implementation for platform image demo (#575)
4 years ago
..
android [platform_channels] adds BasicMessageChannel Demo (#484) 5 years ago
assets [platform_channels] adds Platform Image demo (#475) 5 years ago
ios [platform_channels] adds iOS implementation for platform image demo (#575) 4 years ago
lib [platform_channels] adds BasicMessageChannel Demo (#484) 5 years ago
test [platform_channels] adds BasicMessageChannel Demo (#484) 5 years ago
.gitignore Initial Commit for PlaformChannel Sample App (#453) 5 years ago
.metadata Initial Commit for PlaformChannel Sample App (#453) 5 years ago
README.md [platform_channels] updates README (#496) 5 years ago
analysis_options.yaml Initial Commit for PlaformChannel Sample App (#453) 5 years ago
pubspec.lock Updates for Flutter 1.22 (#559) 4 years ago
pubspec.yaml [platform_channels] adds Platform Image demo (#475) 5 years ago

README.md

Platform Channel Samples

A sample app which demonstrates how to use MethodChannel, EventChannel, BasicMessageChannel and MessageCodec in Flutter.

This sample is currently being built. Not all platforms and functionality are in place.

Goals

  • Demonstrate how to use MethodChannel to invoke platform methods.
  • Demonstrate how to use EventChannel to listen continuous value changes from the platform.
  • Demonstrate how to use BasicMessageChanngel and MessageCodec to send messages of different types across the platform.

The important bits

Method Channel demo

Demonstrates how to implement a MethodChannel to increment and decrement a counter.

Event Channel demo

Demonstrates how to implement an EventChannel to listen to value changes from the Accelerometer sensor from native side.

Platform Image demo

Demonstrates how to implement a BasicMessageChannel using StandardMessageCodec to load an image from native asset.

Basic Message Channel demo

Demonstrates how to implement BasicMessageChannel using JSONMessageCodec, BinaryCodec and StringCodec to send and receive data about pets.

Questions/issues

If you have a general question about Platform Channels in Flutter, the best places to go are:

If you run into an issue with the sample itself, please file an issue here.