flutter/examples/platform_view
Loïc Sharma 86135b7774
[macOS] Migrate @NSApplicationMain attribute to @main (#146848)
This migrates Flutter to use the `@main` attribute introduced in Swift 5.3. The `@NSApplicationMain` attribute is deprecated and will be removed in Swift 6. See: https://github.com/apple/swift-evolution/blob/main/proposals/0383-deprecate-uiapplicationmain-and-nsapplicationmain.md

This change is split into two commits:

1. a508d3e503 - This updates the macOS app template and adds a migration to replace `@NSApplicationMain` uses with `@main`. 
2. f43482786e - I ran `flutter run -d macos` on each Flutter macOS app in this repository to verify the app migrates and launches successfully.

Follow-up to https://github.com/flutter/flutter/pull/146707
Fixes https://github.com/flutter/flutter/issues/143044
2024-04-18 03:08:36 +00:00
..
android Reland "Bump to AGP 8.1/Gradle 8.3 (almost) everywhere" (#146307) 2024-04-05 19:09:20 +00:00
assets
ios [iOS] Fix naming in platform_view example (#144247) 2024-02-27 22:49:09 +00:00
lib Implement switch expressions in examples/ and animation/ (#139882) 2023-12-11 22:56:04 +00:00
linux Add Linux implementation of the platform view example (#123731) 2023-07-11 15:45:46 +12:00
macos [macOS] Migrate @NSApplicationMain attribute to @main (#146848) 2024-04-18 03:08:36 +00:00
windows [Windows] Drop support for Windows 7/8 apps in template (#146668) 2024-04-12 01:07:20 +00:00
pubspec.yaml Bump meta to 1.14.0 (#146925) 2024-04-17 15:25:51 -07:00
README.md ✒ Spell Check All .md Files Related to Flutter 💙 (#61564) 2020-07-22 18:23:47 -07:00

Example of switching between full-screen Flutter and Platform View

This project demonstrates how to bring up a full-screen iOS/Android view from a full-screen Flutter view along with passing data back and forth between the two.

On iOS, we use a CocoaPods dependency to add a Material Design button, and so pod install needs to be invoked in the ios/ folder before flutter run:

pushd ios/ ; pod install ; popd
flutter run