Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
10f088e6
Unverified
Commit
10f088e6
authored
Sep 15, 2022
by
Alex Wallen
Committed by
GitHub
Sep 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation for `platform_view` example. (#111623)
parent
c03eef4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
MainFlutterWindow.swift
examples/platform_view/macos/Runner/MainFlutterWindow.swift
+6
-0
PlatformViewController.swift
...s/platform_view/macos/Runner/PlatformViewController.swift
+11
-0
No files found.
examples/platform_view/macos/Runner/MainFlutterWindow.swift
View file @
10f088e6
...
@@ -5,6 +5,12 @@
...
@@ -5,6 +5,12 @@
import
Cocoa
import
Cocoa
import
FlutterMacOS
import
FlutterMacOS
/**
The main application window.
Performs Flutter app initialization, and handles channel method calls over the
`samples.flutter.io/platform_view` channel.
*/
class
MainFlutterWindow
:
NSWindow
{
class
MainFlutterWindow
:
NSWindow
{
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
let
flutterViewController
=
FlutterViewController
.
init
()
let
flutterViewController
=
FlutterViewController
.
init
()
...
...
examples/platform_view/macos/Runner/PlatformViewController.swift
View file @
10f088e6
...
@@ -4,6 +4,17 @@
...
@@ -4,6 +4,17 @@
import
Cocoa
import
Cocoa
/**
`ViewControllers` in the xib can inherit from this class to communicate with
the flutter view for this application. ViewControllers that inherit from this
class should be displayed as a popover or modal, with a button that binds to
the IBAction `pop()`.
To get the value of the popover during close, pass a callback function as
the `dispose` parameter. The callback passed will have access to the
`PlatformViewController` and all of it's properties at close so that the `count`
can be passed back through the message channel if needed.
*/
class
PlatformViewController
:
NSViewController
{
class
PlatformViewController
:
NSViewController
{
var
count
:
Int
=
0
var
count
:
Int
=
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment