mirror of
https://github.com/flutter/samples.git
synced 2026-04-14 11:02:06 +00:00
[platform_channels] adds EventChannel implementation for iOS (#595)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user