1
0
mirror of https://github.com/flutter/samples.git synced 2026-04-14 19:13:16 +00:00

[platform_channels] adds EventChannel implementation for iOS (#595)

This commit is contained in:
Ayush Bherwani
2020-12-02 11:58:50 +05:30
committed by GitHub
parent 1edac4ca35
commit a29be3d45e
6 changed files with 66 additions and 7 deletions

View File

@@ -1,3 +1,7 @@
// Copyright 2020 The Flutter team. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import UIKit
import Flutter
@@ -39,6 +43,8 @@ import Flutter
}
}
FlutterEventChannel(name: "eventChannelDemo", binaryMessenger: flutterViewController.binaryMessenger).setStreamHandler(AccelerometerStreamHandler())
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}