flutter/examples/flutter_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 Add flutter_view sample (#8486) 2017-03-09 12:53:01 +01:00
ios Migrate Xcode projects last version checks to Xcode 15.1 (#140256) 2024-01-03 23:05:46 +00:00
lib Prepare examples for use_super_parameters (#100514) 2022-03-29 12:53:08 -07: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
.metadata Update outdated platform directories in examples (#91125) 2021-10-05 14:52:11 -07: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 embedding Flutter using FlutterView

This project demonstrates how to embed Flutter within an iOS or Android application. On iOS, the iOS and Flutter components are built with Xcode. On Android, the Android and Flutter components are built with Android Studio or Gradle.

You can read more about accessing platform and third-party services in Flutter.

iOS

You can open ios/Runner.xcworkspace in Xcode and build the project as usual.

Android

You can open android/ in Android Studio and build the project as usual.