Add plugin and host registration to multiple_flutters example (#942)

pull/948/head
Jenn Magder 3 years ago committed by GitHub
parent eb74d3f380
commit 05a3263eb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,6 +2,14 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dev.flutter.multipleflutters">
<!-- Provide required visibility configuration for API level 30 and above -->
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https" />
</intent>
</queries>
<application
android:name=".App"
android:allowBackup="true"

@ -3,6 +3,7 @@
// found in the LICENSE file.
import Flutter
import FlutterPluginRegistrant
import Foundation
/// A FlutterViewController intended for the MyApp widget in the Flutter module.
@ -16,6 +17,7 @@ class SingleFlutterViewController: FlutterViewController, DataModelObserver {
init(withEntrypoint entryPoint: String?) {
let appDelegate: AppDelegate = UIApplication.shared.delegate as! AppDelegate
let newEngine = appDelegate.engines.makeEngine(withEntrypoint: entryPoint, libraryURI: nil)
GeneratedPluginRegistrant.register(with: newEngine)
super.init(engine: newEngine, nibName: nil, bundle: nil)
DataModel.shared.addObserver(observer: self)
}

@ -1,11 +1,11 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
# Copyright 2021 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.
flutter_application_path = '../multiple_flutters_module'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'MultipleFluttersIos' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
install_all_flutter_pods(flutter_application_path)
end

@ -2,13 +2,17 @@ PODS:
- Flutter (1.0.0)
- FlutterPluginRegistrant (0.0.1):
- Flutter
- url_launcher
- multiple_flutters_module (0.0.1):
- Flutter
- url_launcher (0.0.1):
- Flutter
DEPENDENCIES:
- Flutter (from `../multiple_flutters_module/.ios/Flutter/engine`)
- FlutterPluginRegistrant (from `../multiple_flutters_module/.ios/Flutter/FlutterPluginRegistrant`)
- multiple_flutters_module (from `../multiple_flutters_module/.ios/Flutter`)
- url_launcher (from `../multiple_flutters_module/.ios/.symlinks/plugins/url_launcher/ios`)
EXTERNAL SOURCES:
Flutter:
@ -17,12 +21,15 @@ EXTERNAL SOURCES:
:path: "../multiple_flutters_module/.ios/Flutter/FlutterPluginRegistrant"
multiple_flutters_module:
:path: "../multiple_flutters_module/.ios/Flutter"
url_launcher:
:path: "../multiple_flutters_module/.ios/.symlinks/plugins/url_launcher/ios"
SPEC CHECKSUMS:
Flutter: bdfa2e8fe0e2880a2c6a58a0b1a8675c262a07af
FlutterPluginRegistrant: 2afd5ea46d3a949472c9b7da6462d8fbf7d8b16e
FlutterPluginRegistrant: d0de10c7c4fc31cc6b676a5965b96100f7c035f7
multiple_flutters_module: fdf461a0e4225614d475110d85db6fd6de5aeff1
url_launcher: b6e016d912f04be9f5bf6e8e82dc599b7ba59649
PODFILE CHECKSUM: d7f39981f450db398859f05de2475ec53909a487
PODFILE CHECKSUM: 91c00dfcff6ea3b8d853bf0c2411672a01ca993c
COCOAPODS: 1.10.1
COCOAPODS: 1.11.2

@ -4,6 +4,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:url_launcher/url_launcher.dart' as launcher;
void main() => runApp(const MyApp(color: Colors.blue));
@ -90,6 +91,17 @@ class _MyHomePageState extends State<MyHomePage> {
},
child: const Text('Next'),
),
ElevatedButton(
onPressed: () async {
// Use the url_launcher plugin to open the Flutter docs in
// a browser.
const url = 'https://flutter.dev/docs';
if (await launcher.canLaunch(url)) {
launcher.launch(url);
}
},
child: const Text('Open Flutter Docs'),
),
],
),
),

@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.1"
version: "2.8.2"
boolean_selector:
dependency: transitive
description:
@ -21,7 +21,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
@ -74,6 +74,18 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
lints:
dependency: transitive
description:
@ -87,7 +99,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
meta:
dependency: transitive
description:
@ -102,6 +114,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
sky_engine:
dependency: transitive
description: flutter
@ -148,7 +167,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2"
version: "0.4.3"
typed_data:
dependency: transitive
description:
@ -156,12 +175,55 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.12"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"

@ -9,6 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
url_launcher: ^6.0.6
cupertino_icons: ^1.0.0

Loading…
Cancel
Save