Skip to content

Mohamed-Fadel/flutter-platform-channel-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Platform Channel Samples

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

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

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

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

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

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published