1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

[platform_channels] adds EventChannel Demo (#462)

This commit is contained in:
Ayush Bherwani
2020-06-13 05:28:43 +05:30
committed by GitHub
parent 084c532ac0
commit 87c9cfa995
6 changed files with 225 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:platform_channels/src/event_channel_demo.dart';
import 'package:platform_channels/src/method_channel_demo.dart';
void main() {
@@ -15,6 +16,7 @@ class PlatformChannelSample extends StatelessWidget {
return MaterialApp(
routes: {
'/methodChannelDemo': (context) => MethodChannelDemo(),
'/eventChannelDemo': (context) => EventChannelDemo(),
},
title: 'Platform Channel Sample',
home: HomePage(),
@@ -33,9 +35,13 @@ class DemoInfo {
List<DemoInfo> demoList = [
DemoInfo(
'MethodChannelDemo',
'MethodChannel Demo',
'/methodChannelDemo',
),
DemoInfo(
'EventChannel Demo',
'/eventChannelDemo',
)
];
class HomePage extends StatelessWidget {