Skip to content

Commit 96b49aa

Browse files
authored
[macOS] Add flutter_view example. (#111326)
1 parent 5f9ad01 commit 96b49aa

File tree

23 files changed

+1467
-0
lines changed

23 files changed

+1467
-0
lines changed

.ci.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,6 +2502,16 @@ targets:
25022502
["devicelab", "hostonly"]
25032503
task_name: flutter_gallery_macos__start_up
25042504

2505+
- name: Mac flutter_view_macos__start_up
2506+
bringup: true # New target https://github.com/flutter/flutter/issues/109633
2507+
presubmit: false
2508+
recipe: devicelab/devicelab_drone
2509+
timeout: 60
2510+
properties:
2511+
tags: >
2512+
["devicelab", "hostonly"]
2513+
task_name: flutter_view_macos__start_up
2514+
25052515
- name: Mac framework_tests_libraries
25062516
recipe: flutter/flutter_drone
25072517
timeout: 60

TESTOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@
249249
/dev/devicelab/bin/tasks/web_benchmarks_html.dart @yjbanov @flutter/web
250250
/dev/devicelab/bin/tasks/windows_home_scroll_perf__timeline_summary.dart @jonahwilliams @flutter/engine
251251
/dev/devicelab/bin/tasks/windows_startup_test.dart @loic-sharma @flutter/desktop
252+
/dev/devicelab/bin/tasks/complex_layout_macos__compile.dart @a-wallen @flutter/desktop
253+
/dev/devicelab/bin/tasks/flutter_gallery_macos__compile.dart @a-wallen @flutter/desktop
254+
/dev/devicelab/bin/tasks/flutter_view_macos__start_up.dart @a-wallen @flutter/desktop
252255

253256
## Host only framework tests
254257
# Linux analyze
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright 2014 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'package:flutter_devicelab/framework/devices.dart';
6+
import 'package:flutter_devicelab/framework/framework.dart';
7+
import 'package:flutter_devicelab/tasks/perf_tests.dart';
8+
9+
Future<void> main() async {
10+
deviceOperatingSystem = DeviceOperatingSystem.macos;
11+
await task(createFlutterViewStartupTest());
12+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="21208.1" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
3+
<dependencies>
4+
<deployment identifier="macosx"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21208.1"/>
6+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
7+
</dependencies>
8+
<scenes>
9+
<!--Flutter View Controller-->
10+
<scene sceneID="MPq-6h-HP0">
11+
<objects>
12+
<viewController id="7GY-dJ-cew" userLabel="Flutter View Controller" customClass="FlutterViewController" sceneMemberID="viewController">
13+
<view key="view" id="eEt-A6-Jxk">
14+
<rect key="frame" x="0.0" y="0.0" width="450" height="404"/>
15+
<autoresizingMask key="autoresizingMask"/>
16+
</view>
17+
</viewController>
18+
<customObject id="eTc-YD-UwH" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
19+
</objects>
20+
<point key="canvasLocation" x="287" y="704"/>
21+
</scene>
22+
<!--Main View Controller-->
23+
<scene sceneID="OoP-iw-RGx">
24+
<objects>
25+
<viewController storyboardIdentifier="MainViewController" id="Zco-B0-Eo5" customClass="MainViewController" customModule="flutter_view" customModuleProvider="target" sceneMemberID="viewController">
26+
<view key="view" id="yo2-24-9SJ">
27+
<rect key="frame" x="0.0" y="0.0" width="913" height="683"/>
28+
<autoresizingMask key="autoresizingMask"/>
29+
<subviews>
30+
<stackView distribution="fill" orientation="horizontal" alignment="top" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vIi-fL-74a">
31+
<rect key="frame" x="0.0" y="0.0" width="913" height="683"/>
32+
<subviews>
33+
<containerView translatesAutoresizingMaskIntoConstraints="NO" id="NLg-mU-To9">
34+
<rect key="frame" x="0.0" y="1" width="450" height="682"/>
35+
<connections>
36+
<segue destination="fkR-dw-CPc" kind="embed" identifier="NativeViewControllerSegue" id="JOW-cD-XX0"/>
37+
</connections>
38+
</containerView>
39+
<containerView translatesAutoresizingMaskIntoConstraints="NO" id="AGJ-Cf-BSz">
40+
<rect key="frame" x="458" y="1" width="455" height="682"/>
41+
<connections>
42+
<segue destination="7GY-dJ-cew" kind="embed" identifier="FlutterViewControllerSegue" id="0Il-tC-ptk"/>
43+
</connections>
44+
</containerView>
45+
</subviews>
46+
<constraints>
47+
<constraint firstItem="AGJ-Cf-BSz" firstAttribute="height" secondItem="NLg-mU-To9" secondAttribute="height" id="5bU-7q-KyD"/>
48+
<constraint firstItem="AGJ-Cf-BSz" firstAttribute="width" secondItem="NLg-mU-To9" secondAttribute="width" multiplier="1.01111" id="PQE-oI-RoL"/>
49+
</constraints>
50+
<visibilityPriorities>
51+
<integer value="1000"/>
52+
<integer value="1000"/>
53+
</visibilityPriorities>
54+
<customSpacing>
55+
<real value="3.4028234663852886e+38"/>
56+
<real value="3.4028234663852886e+38"/>
57+
</customSpacing>
58+
</stackView>
59+
</subviews>
60+
<constraints>
61+
<constraint firstAttribute="bottom" secondItem="vIi-fL-74a" secondAttribute="bottom" id="ORj-Up-bVE"/>
62+
<constraint firstAttribute="trailing" secondItem="vIi-fL-74a" secondAttribute="trailing" id="XqL-pC-rc8"/>
63+
<constraint firstItem="vIi-fL-74a" firstAttribute="leading" secondItem="yo2-24-9SJ" secondAttribute="leading" id="kXT-6f-V55"/>
64+
<constraint firstItem="vIi-fL-74a" firstAttribute="top" secondItem="yo2-24-9SJ" secondAttribute="top" id="ws7-M4-M5U"/>
65+
</constraints>
66+
</view>
67+
</viewController>
68+
<customObject id="RER-RE-Ii7" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
69+
</objects>
70+
<point key="canvasLocation" x="13.5" y="26.5"/>
71+
</scene>
72+
<!--Native View Controller-->
73+
<scene sceneID="6te-4i-Zpy">
74+
<objects>
75+
<viewController id="fkR-dw-CPc" userLabel="Native View Controller" customClass="NativeViewController" customModule="flutter_view" customModuleProvider="target" sceneMemberID="viewController">
76+
<view key="view" id="lMy-hx-gLK">
77+
<rect key="frame" x="0.0" y="0.0" width="450" height="404"/>
78+
<autoresizingMask key="autoresizingMask"/>
79+
<subviews>
80+
<stackView distribution="fillProportionally" orientation="vertical" alignment="leading" spacing="0.0" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bEP-zh-PC4">
81+
<rect key="frame" x="0.0" y="0.0" width="450" height="404"/>
82+
<subviews>
83+
<customView translatesAutoresizingMaskIntoConstraints="NO" id="7vK-z0-I0z" userLabel="Top">
84+
<rect key="frame" x="0.0" y="70" width="450" height="334"/>
85+
<subviews>
86+
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ic4-Iq-BCT">
87+
<rect key="frame" x="207" y="163" width="4" height="16"/>
88+
<textFieldCell key="cell" lineBreakMode="clipping" id="EHZ-Ff-uN9">
89+
<font key="font" metaFont="system" size="17"/>
90+
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
91+
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
92+
</textFieldCell>
93+
</textField>
94+
</subviews>
95+
<constraints>
96+
<constraint firstItem="ic4-Iq-BCT" firstAttribute="centerX" secondItem="7vK-z0-I0z" secondAttribute="centerX" id="edj-sZ-5O7"/>
97+
<constraint firstItem="ic4-Iq-BCT" firstAttribute="centerY" secondItem="7vK-z0-I0z" secondAttribute="centerY" id="v3Q-Xa-flH"/>
98+
</constraints>
99+
</customView>
100+
<customView autoresizesSubviews="NO" translatesAutoresizingMaskIntoConstraints="NO" id="O0r-UF-j95" userLabel="Bottom">
101+
<rect key="frame" x="0.0" y="0.0" width="450" height="70"/>
102+
<subviews>
103+
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Ocn-t9-rHR">
104+
<rect key="frame" x="18" y="20" width="100" height="35"/>
105+
<textFieldCell key="cell" lineBreakMode="clipping" title="macOS" id="TOF-2b-RIY">
106+
<font key="font" metaFont="system" size="30"/>
107+
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
108+
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
109+
</textFieldCell>
110+
</textField>
111+
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uyM-Dx-MIG">
112+
<rect key="frame" x="375" y="14" width="55" height="57"/>
113+
<constraints>
114+
<constraint firstAttribute="height" constant="55" id="2Zv-ge-8fE"/>
115+
<constraint firstAttribute="width" constant="55" id="bQo-k1-1eM"/>
116+
</constraints>
117+
<buttonCell key="cell" type="smallSquare" title="+" bezelStyle="smallSquare" alignment="center" lineBreakMode="truncatingTail" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="az3-aa-8jC">
118+
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
119+
<font key="font" metaFont="system" size="18"/>
120+
</buttonCell>
121+
<connections>
122+
<action selector="handleIncrement:" target="fkR-dw-CPc" id="7k2-NW-4LI"/>
123+
</connections>
124+
</button>
125+
</subviews>
126+
<constraints>
127+
<constraint firstItem="Ocn-t9-rHR" firstAttribute="leading" secondItem="O0r-UF-j95" secondAttribute="leading" constant="20" symbolic="YES" id="KhQ-Xf-SiD"/>
128+
<constraint firstAttribute="trailing" secondItem="uyM-Dx-MIG" secondAttribute="trailing" constant="20" symbolic="YES" id="LFX-ph-6nb"/>
129+
<constraint firstAttribute="bottom" secondItem="Ocn-t9-rHR" secondAttribute="bottom" constant="20" symbolic="YES" id="Ofu-fn-RDS"/>
130+
<constraint firstAttribute="height" constant="70" id="V41-3J-PYi"/>
131+
<constraint firstAttribute="bottom" secondItem="uyM-Dx-MIG" secondAttribute="bottom" constant="15" id="Xfq-yS-emb"/>
132+
</constraints>
133+
</customView>
134+
</subviews>
135+
<visibilityPriorities>
136+
<integer value="1000"/>
137+
<integer value="1000"/>
138+
</visibilityPriorities>
139+
<customSpacing>
140+
<real value="3.4028234663852886e+38"/>
141+
<real value="3.4028234663852886e+38"/>
142+
</customSpacing>
143+
</stackView>
144+
</subviews>
145+
<constraints>
146+
<constraint firstItem="bEP-zh-PC4" firstAttribute="top" secondItem="lMy-hx-gLK" secondAttribute="top" id="6Fg-dO-Yhl"/>
147+
<constraint firstItem="bEP-zh-PC4" firstAttribute="leading" secondItem="lMy-hx-gLK" secondAttribute="leading" id="ZiX-CF-CPT"/>
148+
<constraint firstAttribute="bottom" secondItem="bEP-zh-PC4" secondAttribute="bottom" id="doI-ip-Pbz"/>
149+
<constraint firstAttribute="trailing" secondItem="bEP-zh-PC4" secondAttribute="trailing" id="jrN-ON-H5M"/>
150+
</constraints>
151+
</view>
152+
<connections>
153+
<outlet property="incrementLabel" destination="ic4-Iq-BCT" id="M3U-fC-vbY"/>
154+
</connections>
155+
</viewController>
156+
<customObject id="v3R-qm-QoP" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
157+
</objects>
158+
<point key="canvasLocation" x="-218" y="704"/>
159+
</scene>
160+
</scenes>
161+
</document>

0 commit comments

Comments
 (0)