easy_channel 0.0.1 easy_channel: ^0.0.1 copied to clipboard
easy channel like socket, create write and read stream like http protocol.
import 'package:flutter/material.dart';
import 'package:easy_channel/easy_channel.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String _platformVersion = 'Unknown';
final _easyChannelPlugin = EasyChannel();
@override
void initState() {
super.initState();
_easyChannelPlugin.post('nav.call.request', {'sasa': 'asas'});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Text('Running on: $_platformVersion\n'),
),
),
);
}
}