1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00
Files
samples/platform_view_swift
Eric Windmill fe4156713f Move experimental (#2680)
Removes the remaining samples in `experimental`. They're now in the
flutter/demos repository.

*List which issues are fixed by this PR. For larger changes, raising an
issue first helps
reduce redundant work.*

#2520 

## Pre-launch Checklist

- [x] I read the [Flutter Style Guide] _recently_, and have followed its
advice.
- [x] I signed the [CLA].
- [x] I read the [Contributors Guide].
- [x] I have added sample code updates to the [changelog].
- [x] I updated/added relevant documentation (doc comments with `///`).
2025-07-08 10:25:41 -04:00
..
2020-01-14 06:14:13 +10:00
2025-02-12 18:08:01 -05:00
2025-07-08 10:25:41 -04:00
2025-02-12 18:08:01 -05:00
2021-03-17 14:12:13 +11:00

platform_view_swift

A Flutter sample app that combines a native iOS UIViewController with a full-screen Flutter view.

Goals for this sample

  • Show a simple technique for combining native and Flutter views.

The important bits

lib/main.dart

The Flutter part of the application is quite simple, and all the action takes place in a single file.

ios/Runner/PlatformViewController.swift and AppDelegate.swift

These files contain the Swift code responsible for setting up a platform channel, launching a native UIViewController, and returning control to Flutter when finished.

Questions/issues

If you have a general question about Flutter, the best places to go are:

If you run into an issue with the sample itself, please file an issue in the main Flutter repo.