| // Copyright 2014 The Flutter Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| import Flutter | |
| import FlutterPluginRegistrant | |
| import UIKit | |
| @main | |
| class AppDelegate: FlutterAppDelegate, | |
| FlutterImplicitEngineDelegate | |
| { | |
| func didInitializeImplicitFlutterEngine( | |
| _ engineBridge: FlutterImplicitEngineBridge | |
| ) { | |
| GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry) | |
| let batteryChannel = FlutterMethodChannel( | |
| name: "samples.flutter.dev/battery", | |
| binaryMessenger: engineBridge.applicationRegistrar.messenger() | |
| ) | |
| } | |
| override func application( | |
| _ application: UIApplication, | |
| didFinishLaunchingWithOptions launchOptions: [UIApplication | |
| .LaunchOptionsKey: Any]? | |
| ) -> Bool { | |
| return super.application( | |
| application, | |
| didFinishLaunchingWithOptions: launchOptions | |
| ) | |
| } | |
| } |