├── .gitignore
├── .metadata
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── interactive_viewer
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── images
├── board1500.png
├── india_chennai_flower_market.png
├── letter.png
├── screen_shot.png
└── tall.jpg
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── builder_page.dart
├── childSize
│ ├── boundary_size_page.dart
│ └── child_size.dart
├── controller
│ └── controller_page.dart
├── double_tap
│ └── double_tap_page.dart
├── game
│ ├── game_page.dart
│ ├── transformations_demo.dart
│ ├── transformations_demo_board.dart
│ ├── transformations_demo_color_picker.dart
│ └── transformations_demo_edit_board_point.dart
├── helpers.dart
├── image
│ └── image_page.dart
├── jump
│ └── jump_page.dart
├── main.dart
├── middle
│ └── middle_page.dart
├── rotate
│ └── rotate_page.dart
└── table
│ └── table_page.dart
├── macos
├── .gitignore
├── Flutter
│ ├── Flutter-Debug.xcconfig
│ ├── Flutter-Release.xcconfig
│ └── GeneratedPluginRegistrant.swift
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── app_icon_1024.png
│ │ ├── app_icon_128.png
│ │ ├── app_icon_16.png
│ │ ├── app_icon_256.png
│ │ ├── app_icon_32.png
│ │ ├── app_icon_512.png
│ │ └── app_icon_64.png
│ ├── Base.lproj
│ └── MainMenu.xib
│ ├── Configs
│ ├── AppInfo.xcconfig
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── Warnings.xcconfig
│ ├── DebugProfile.entitlements
│ ├── Info.plist
│ ├── MainFlutterWindow.swift
│ └── Release.entitlements
├── pubspec.lock
├── pubspec.yaml
├── test
└── widget_test.dart
└── web
├── favicon.png
├── icons
├── Icon-192.png
└── Icon-512.png
├── index.html
└── manifest.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Exceptions to above rules.
44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
45 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 1663b8dc530c59817db10b54c09bc7d5801d2330
8 | channel: gesture-transformable-2
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter InteractiveViewer Demos
2 |
3 | This project contains a couple of examples of using InteractiveViewer. Run the
4 | whole project to see a list of examples, and look for the source code in lib/.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.example.interactive_viewer"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | }
47 |
48 | buildTypes {
49 | release {
50 | // TODO: Add your own signing config for the release build.
51 | // Signing with the debug keys for now, so `flutter run --release` works.
52 | signingConfig signingConfigs.debug
53 | }
54 | }
55 | }
56 |
57 | flutter {
58 | source '../..'
59 | }
60 |
61 | dependencies {
62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
63 | }
64 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
23 |
27 |
32 |
36 |
37 |
38 |
39 |
40 |
41 |
43 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/interactive_viewer/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.interactive_viewer
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
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 | include ':app'
6 |
7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
8 | def properties = new Properties()
9 |
10 | assert localPropertiesFile.exists()
11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
12 |
13 | def flutterSdkPath = properties.getProperty("flutter.sdk")
14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
16 |
--------------------------------------------------------------------------------
/images/board1500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/images/board1500.png
--------------------------------------------------------------------------------
/images/india_chennai_flower_market.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/images/india_chennai_flower_market.png
--------------------------------------------------------------------------------
/images/letter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/images/letter.png
--------------------------------------------------------------------------------
/images/screen_shot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/images/screen_shot.png
--------------------------------------------------------------------------------
/images/tall.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/images/tall.jpg
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
97 | );
98 | path = Runner;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | 97C146ED1CF9000F007C117D /* Runner */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 | buildPhases = (
108 | 9740EEB61CF901F6004384FC /* Run Script */,
109 | 97C146EA1CF9000F007C117D /* Sources */,
110 | 97C146EB1CF9000F007C117D /* Frameworks */,
111 | 97C146EC1CF9000F007C117D /* Resources */,
112 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
114 | );
115 | buildRules = (
116 | );
117 | dependencies = (
118 | );
119 | name = Runner;
120 | productName = Runner;
121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
122 | productType = "com.apple.product-type.application";
123 | };
124 | /* End PBXNativeTarget section */
125 |
126 | /* Begin PBXProject section */
127 | 97C146E61CF9000F007C117D /* Project object */ = {
128 | isa = PBXProject;
129 | attributes = {
130 | LastUpgradeCheck = 1020;
131 | ORGANIZATIONNAME = "";
132 | TargetAttributes = {
133 | 97C146ED1CF9000F007C117D = {
134 | CreatedOnToolsVersion = 7.3.1;
135 | LastSwiftMigration = 1100;
136 | };
137 | };
138 | };
139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
140 | compatibilityVersion = "Xcode 9.3";
141 | developmentRegion = en;
142 | hasScannedForEncodings = 0;
143 | knownRegions = (
144 | en,
145 | Base,
146 | );
147 | mainGroup = 97C146E51CF9000F007C117D;
148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
149 | projectDirPath = "";
150 | projectRoot = "";
151 | targets = (
152 | 97C146ED1CF9000F007C117D /* Runner */,
153 | );
154 | };
155 | /* End PBXProject section */
156 |
157 | /* Begin PBXResourcesBuildPhase section */
158 | 97C146EC1CF9000F007C117D /* Resources */ = {
159 | isa = PBXResourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXResourcesBuildPhase section */
170 |
171 | /* Begin PBXShellScriptBuildPhase section */
172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173 | isa = PBXShellScriptBuildPhase;
174 | buildActionMask = 2147483647;
175 | files = (
176 | );
177 | inputPaths = (
178 | );
179 | name = "Thin Binary";
180 | outputPaths = (
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | shellPath = /bin/sh;
184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185 | };
186 | 9740EEB61CF901F6004384FC /* Run Script */ = {
187 | isa = PBXShellScriptBuildPhase;
188 | buildActionMask = 2147483647;
189 | files = (
190 | );
191 | inputPaths = (
192 | );
193 | name = "Run Script";
194 | outputPaths = (
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | shellPath = /bin/sh;
198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199 | };
200 | /* End PBXShellScriptBuildPhase section */
201 |
202 | /* Begin PBXSourcesBuildPhase section */
203 | 97C146EA1CF9000F007C117D /* Sources */ = {
204 | isa = PBXSourcesBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
209 | );
210 | runOnlyForDeploymentPostprocessing = 0;
211 | };
212 | /* End PBXSourcesBuildPhase section */
213 |
214 | /* Begin PBXVariantGroup section */
215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
216 | isa = PBXVariantGroup;
217 | children = (
218 | 97C146FB1CF9000F007C117D /* Base */,
219 | );
220 | name = Main.storyboard;
221 | sourceTree = "";
222 | };
223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
224 | isa = PBXVariantGroup;
225 | children = (
226 | 97C147001CF9000F007C117D /* Base */,
227 | );
228 | name = LaunchScreen.storyboard;
229 | sourceTree = "";
230 | };
231 | /* End PBXVariantGroup section */
232 |
233 | /* Begin XCBuildConfiguration section */
234 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
235 | isa = XCBuildConfiguration;
236 | buildSettings = {
237 | ALWAYS_SEARCH_USER_PATHS = NO;
238 | CLANG_ANALYZER_NONNULL = YES;
239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
240 | CLANG_CXX_LIBRARY = "libc++";
241 | CLANG_ENABLE_MODULES = YES;
242 | CLANG_ENABLE_OBJC_ARC = YES;
243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
244 | CLANG_WARN_BOOL_CONVERSION = YES;
245 | CLANG_WARN_COMMA = YES;
246 | CLANG_WARN_CONSTANT_CONVERSION = YES;
247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INFINITE_RECURSION = YES;
252 | CLANG_WARN_INT_CONVERSION = YES;
253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
258 | CLANG_WARN_STRICT_PROTOTYPES = YES;
259 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
260 | CLANG_WARN_UNREACHABLE_CODE = YES;
261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
263 | COPY_PHASE_STRIP = NO;
264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
265 | ENABLE_NS_ASSERTIONS = NO;
266 | ENABLE_STRICT_OBJC_MSGSEND = YES;
267 | GCC_C_LANGUAGE_STANDARD = gnu99;
268 | GCC_NO_COMMON_BLOCKS = YES;
269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
271 | GCC_WARN_UNDECLARED_SELECTOR = YES;
272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
273 | GCC_WARN_UNUSED_FUNCTION = YES;
274 | GCC_WARN_UNUSED_VARIABLE = YES;
275 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
276 | MTL_ENABLE_DEBUG_INFO = NO;
277 | SDKROOT = iphoneos;
278 | SUPPORTED_PLATFORMS = iphoneos;
279 | TARGETED_DEVICE_FAMILY = "1,2";
280 | VALIDATE_PRODUCT = YES;
281 | };
282 | name = Profile;
283 | };
284 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
285 | isa = XCBuildConfiguration;
286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
287 | buildSettings = {
288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289 | CLANG_ENABLE_MODULES = YES;
290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
291 | ENABLE_BITCODE = NO;
292 | FRAMEWORK_SEARCH_PATHS = (
293 | "$(inherited)",
294 | "$(PROJECT_DIR)/Flutter",
295 | );
296 | INFOPLIST_FILE = Runner/Info.plist;
297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
298 | LIBRARY_SEARCH_PATHS = (
299 | "$(inherited)",
300 | "$(PROJECT_DIR)/Flutter",
301 | );
302 | PRODUCT_BUNDLE_IDENTIFIER = com.example.interactiveViewer;
303 | PRODUCT_NAME = "$(TARGET_NAME)";
304 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
305 | SWIFT_VERSION = 5.0;
306 | VERSIONING_SYSTEM = "apple-generic";
307 | };
308 | name = Profile;
309 | };
310 | 97C147031CF9000F007C117D /* Debug */ = {
311 | isa = XCBuildConfiguration;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
316 | CLANG_CXX_LIBRARY = "libc++";
317 | CLANG_ENABLE_MODULES = YES;
318 | CLANG_ENABLE_OBJC_ARC = YES;
319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
320 | CLANG_WARN_BOOL_CONVERSION = YES;
321 | CLANG_WARN_COMMA = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_EMPTY_BODY = YES;
326 | CLANG_WARN_ENUM_CONVERSION = YES;
327 | CLANG_WARN_INFINITE_RECURSION = YES;
328 | CLANG_WARN_INT_CONVERSION = YES;
329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
330 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_STRICT_PROTOTYPES = YES;
335 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
336 | CLANG_WARN_UNREACHABLE_CODE = YES;
337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
339 | COPY_PHASE_STRIP = NO;
340 | DEBUG_INFORMATION_FORMAT = dwarf;
341 | ENABLE_STRICT_OBJC_MSGSEND = YES;
342 | ENABLE_TESTABILITY = YES;
343 | GCC_C_LANGUAGE_STANDARD = gnu99;
344 | GCC_DYNAMIC_NO_PIC = NO;
345 | GCC_NO_COMMON_BLOCKS = YES;
346 | GCC_OPTIMIZATION_LEVEL = 0;
347 | GCC_PREPROCESSOR_DEFINITIONS = (
348 | "DEBUG=1",
349 | "$(inherited)",
350 | );
351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
353 | GCC_WARN_UNDECLARED_SELECTOR = YES;
354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
355 | GCC_WARN_UNUSED_FUNCTION = YES;
356 | GCC_WARN_UNUSED_VARIABLE = YES;
357 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
358 | MTL_ENABLE_DEBUG_INFO = YES;
359 | ONLY_ACTIVE_ARCH = YES;
360 | SDKROOT = iphoneos;
361 | TARGETED_DEVICE_FAMILY = "1,2";
362 | };
363 | name = Debug;
364 | };
365 | 97C147041CF9000F007C117D /* Release */ = {
366 | isa = XCBuildConfiguration;
367 | buildSettings = {
368 | ALWAYS_SEARCH_USER_PATHS = NO;
369 | CLANG_ANALYZER_NONNULL = YES;
370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
371 | CLANG_CXX_LIBRARY = "libc++";
372 | CLANG_ENABLE_MODULES = YES;
373 | CLANG_ENABLE_OBJC_ARC = YES;
374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
375 | CLANG_WARN_BOOL_CONVERSION = YES;
376 | CLANG_WARN_COMMA = YES;
377 | CLANG_WARN_CONSTANT_CONVERSION = YES;
378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
380 | CLANG_WARN_EMPTY_BODY = YES;
381 | CLANG_WARN_ENUM_CONVERSION = YES;
382 | CLANG_WARN_INFINITE_RECURSION = YES;
383 | CLANG_WARN_INT_CONVERSION = YES;
384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
389 | CLANG_WARN_STRICT_PROTOTYPES = YES;
390 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
391 | CLANG_WARN_UNREACHABLE_CODE = YES;
392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
394 | COPY_PHASE_STRIP = NO;
395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
396 | ENABLE_NS_ASSERTIONS = NO;
397 | ENABLE_STRICT_OBJC_MSGSEND = YES;
398 | GCC_C_LANGUAGE_STANDARD = gnu99;
399 | GCC_NO_COMMON_BLOCKS = YES;
400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
402 | GCC_WARN_UNDECLARED_SELECTOR = YES;
403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
404 | GCC_WARN_UNUSED_FUNCTION = YES;
405 | GCC_WARN_UNUSED_VARIABLE = YES;
406 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
407 | MTL_ENABLE_DEBUG_INFO = NO;
408 | SDKROOT = iphoneos;
409 | SUPPORTED_PLATFORMS = iphoneos;
410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
411 | TARGETED_DEVICE_FAMILY = "1,2";
412 | VALIDATE_PRODUCT = YES;
413 | };
414 | name = Release;
415 | };
416 | 97C147061CF9000F007C117D /* Debug */ = {
417 | isa = XCBuildConfiguration;
418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
419 | buildSettings = {
420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
421 | CLANG_ENABLE_MODULES = YES;
422 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
423 | ENABLE_BITCODE = NO;
424 | FRAMEWORK_SEARCH_PATHS = (
425 | "$(inherited)",
426 | "$(PROJECT_DIR)/Flutter",
427 | );
428 | INFOPLIST_FILE = Runner/Info.plist;
429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
430 | LIBRARY_SEARCH_PATHS = (
431 | "$(inherited)",
432 | "$(PROJECT_DIR)/Flutter",
433 | );
434 | PRODUCT_BUNDLE_IDENTIFIER = com.example.interactiveViewer;
435 | PRODUCT_NAME = "$(TARGET_NAME)";
436 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
437 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
438 | SWIFT_VERSION = 5.0;
439 | VERSIONING_SYSTEM = "apple-generic";
440 | };
441 | name = Debug;
442 | };
443 | 97C147071CF9000F007C117D /* Release */ = {
444 | isa = XCBuildConfiguration;
445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
446 | buildSettings = {
447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
448 | CLANG_ENABLE_MODULES = YES;
449 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
450 | ENABLE_BITCODE = NO;
451 | FRAMEWORK_SEARCH_PATHS = (
452 | "$(inherited)",
453 | "$(PROJECT_DIR)/Flutter",
454 | );
455 | INFOPLIST_FILE = Runner/Info.plist;
456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
457 | LIBRARY_SEARCH_PATHS = (
458 | "$(inherited)",
459 | "$(PROJECT_DIR)/Flutter",
460 | );
461 | PRODUCT_BUNDLE_IDENTIFIER = com.example.interactiveViewer;
462 | PRODUCT_NAME = "$(TARGET_NAME)";
463 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
464 | SWIFT_VERSION = 5.0;
465 | VERSIONING_SYSTEM = "apple-generic";
466 | };
467 | name = Release;
468 | };
469 | /* End XCBuildConfiguration section */
470 |
471 | /* Begin XCConfigurationList section */
472 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
473 | isa = XCConfigurationList;
474 | buildConfigurations = (
475 | 97C147031CF9000F007C117D /* Debug */,
476 | 97C147041CF9000F007C117D /* Release */,
477 | 249021D3217E4FDB00AE95B9 /* Profile */,
478 | );
479 | defaultConfigurationIsVisible = 0;
480 | defaultConfigurationName = Release;
481 | };
482 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
483 | isa = XCConfigurationList;
484 | buildConfigurations = (
485 | 97C147061CF9000F007C117D /* Debug */,
486 | 97C147071CF9000F007C117D /* Release */,
487 | 249021D4217E4FDB00AE95B9 /* Profile */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | /* End XCConfigurationList section */
493 | };
494 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
495 | }
496 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | interactive_viewer
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/builder_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/rendering.dart';
3 | import 'package:flutter/gestures.dart';
4 |
5 | class BuilderPage extends StatefulWidget {
6 | const BuilderPage({ Key key }) : super(key: key);
7 |
8 | static const String routeName = '/builder';
9 |
10 | @override _BuilderPageState createState() => _BuilderPageState();
11 | }
12 |
13 | class _BuilderPageState extends State {
14 | final TransformationController _transformationController = TransformationController();
15 |
16 | static List _getGridChildren(int n) {
17 | final List children = [];
18 | for (int i = 0; i < n; i++) {
19 | children.add(Container(
20 | color: Colors.teal.withOpacity((n - i) / n),
21 | ));
22 | }
23 | return children;
24 | }
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 | return Scaffold(
29 | appBar: AppBar(
30 | title: const Text('Demo'),
31 | actions: [
32 | ],
33 | ),
34 | body: InteractiveViewer(
35 | transformationController: _transformationController,
36 | boundaryMargin: const EdgeInsets.all(double.infinity),
37 | minScale: 1.0,
38 | maxScale: 1.0,
39 | onInteractionUpdate: (ScaleUpdateDetails details) {
40 | //print('justin onInteractionUpdate ${details.scale}');
41 | },
42 | child: _Table(
43 | rowCount: 4,
44 | columnCount: 6,
45 | ),
46 | ),
47 | );
48 | }
49 | }
50 |
51 | class _Table extends StatelessWidget {
52 | const _Table({
53 | this.rowCount,
54 | this.columnCount,
55 | }) : assert(rowCount != null && rowCount > 0),
56 | assert(columnCount != null && columnCount > 0);
57 |
58 | final int rowCount;
59 | final int columnCount;
60 |
61 | @override
62 | Widget build(BuildContext context) {
63 | return Table(
64 | // ignore: prefer_const_literals_to_create_immutables
65 | columnWidths: {
66 | for (int column = 0; column < columnCount; column++)
67 | column: const FixedColumnWidth(100.0),
68 | },
69 | // ignore: prefer_const_literals_to_create_immutables
70 | children: [
71 | for (int row = 0; row < rowCount; row++)
72 | // ignore: prefer_const_constructors
73 | TableRow(
74 | // ignore: prefer_const_literals_to_create_immutables
75 | children: [
76 | for (int column = 0; column < columnCount; column++)
77 | Image.network('https://dummyimage.com/100x100/000/f00&text=${(row * columnCount) + column + 1}'),
78 | ],
79 | ),
80 | ],
81 | );
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/lib/childSize/boundary_size_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class BoundarySizePage extends StatelessWidget {
4 | @override
5 | Widget build(BuildContext context) {
6 | return Scaffold(
7 | appBar: AppBar(
8 | title: const Text('Boundary Size Example'),
9 | actions: [
10 | ],
11 | ),
12 | body: Center(
13 | child: Container(
14 | width: 100.0,
15 | height: 200.0,
16 | color: Colors.limeAccent.withOpacity(0.4),
17 | child: InteractiveViewer(
18 | boundaryMargin: EdgeInsets.all(double.infinity),
19 | constrained: false,
20 | child: Center(
21 | child: Container(
22 | width: 10,
23 | height: 10,
24 | color: Colors.orangeAccent,
25 | ),
26 | ),
27 | ),
28 | ),
29 | ),
30 | );
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lib/childSize/child_size.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/rendering.dart';
3 |
4 | // Text result: Text will not make itself wider than the screen.
5 | // TODO try text that wrapsss, and try min/max range.
6 | class ChildSizePage extends StatelessWidget {
7 | @override
8 | Widget build(BuildContext context) {
9 | return MaterialApp(
10 | home: Scaffold(
11 | body: Center(
12 | child: Container(
13 | //width: 200.0,
14 | //height: 200.0,
15 | color: Colors.limeAccent.withOpacity(0.4),
16 | child: InteractiveViewer(
17 | constrained: true,
18 | boundaryMargin: const EdgeInsets.all(20.0),
19 | scaleEnabled: false,
20 | child: Container(
21 | color: Colors.orangeAccent,
22 | child: const Text('To be or not to be that is the question whether tis nobler in the mind to suffer the slings and arrows of no nvm. antidisestablishmentarianismaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),
23 | ),
24 | /*
25 | child: Container(
26 | color: Colors.purpleAccent,
27 | width: 3000.0,
28 | height: 3000.0,
29 | ),
30 | */
31 | /*
32 | child: ConstrainedBox(
33 | constraints: BoxConstraints(
34 | minWidth: 2000,
35 | maxWidth: 4000,
36 | minHeight: 2001,
37 | maxHeight: 4001,
38 | ),
39 | child: Container(color: Colors.orangeAccent),
40 | ),
41 | */
42 | ),
43 | ),
44 | ),
45 | ),
46 | );
47 | }
48 | }
49 |
50 |
51 |
--------------------------------------------------------------------------------
/lib/controller/controller_page.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter team. 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/material.dart';
6 |
7 | class ControllerPage extends StatefulWidget {
8 | const ControllerPage({Key key}) : super(key: key);
9 |
10 | @override
11 | _ControllerPageState createState() => _ControllerPageState();
12 | }
13 |
14 | class _ControllerPageState extends State with TickerProviderStateMixin {
15 | final TransformationController _transformationController = TransformationController();
16 | Animation _animationReset;
17 | AnimationController _controllerReset;
18 |
19 | void _onAnimateReset() {
20 | setState(() {
21 | _transformationController.value = _animationReset.value;
22 | });
23 | if (!_controllerReset.isAnimating) {
24 | _animationReset?.removeListener(_onAnimateReset);
25 | _animationReset = null;
26 | _controllerReset.reset();
27 | }
28 | }
29 |
30 | void _animateResetInitialize() {
31 | _controllerReset.reset();
32 | _animationReset = Matrix4Tween(
33 | begin: _transformationController.value,
34 | end: Matrix4.identity(),
35 | ).animate(_controllerReset);
36 | _controllerReset.duration = const Duration(milliseconds: 400);
37 | _animationReset.addListener(_onAnimateReset);
38 | _controllerReset.forward();
39 | }
40 |
41 | // Stop a running reset to home transform animation.
42 | void _animateResetStop() {
43 | _controllerReset.stop();
44 | _animationReset?.removeListener(_onAnimateReset);
45 | _animationReset = null;
46 | _controllerReset.reset();
47 | }
48 |
49 | void _onScaleStart(ScaleStartDetails details) {
50 | // If the user tries to cause a transformation while the reset animation is
51 | // running, cancel the reset animation.
52 | if (_controllerReset.status == AnimationStatus.forward) {
53 | _animateResetStop();
54 | }
55 | }
56 |
57 | void initState() {
58 | super.initState();
59 | _controllerReset = AnimationController(
60 | vsync: this,
61 | );
62 | }
63 |
64 | @override
65 | Widget build(BuildContext context) {
66 | return Scaffold(
67 | backgroundColor: Theme.of(context).colorScheme.primary,
68 | appBar: AppBar(
69 | automaticallyImplyLeading: false,
70 | title: const Text('Controller demo'),
71 | ),
72 | body: Center(
73 | child: Container(
74 | color: Colors.limeAccent,
75 | child: InteractiveViewer(
76 | boundaryMargin: EdgeInsets.all(double.infinity),
77 | transformationController: _transformationController,
78 | minScale: 0.1,
79 | maxScale: 1.0,
80 | onInteractionStart: _onScaleStart,
81 | child: Container(
82 | decoration: BoxDecoration(
83 | gradient: LinearGradient(
84 | begin: Alignment.topCenter,
85 | end: Alignment.bottomCenter,
86 | colors: [Colors.orange, Colors.red],
87 | stops: [0.0, 1.0],
88 | )
89 | ),
90 | ),
91 | ),
92 | ),
93 | ),
94 | persistentFooterButtons: [resetButton],
95 | );
96 | }
97 |
98 | IconButton get resetButton {
99 | return IconButton(
100 | onPressed: () {
101 | setState(() {
102 | _animateResetInitialize();
103 | });
104 | },
105 | tooltip: 'Reset',
106 | color: Theme.of(context).colorScheme.surface,
107 | icon: const Icon(Icons.replay),
108 | );
109 | }
110 |
111 | @override
112 | void dispose() {
113 | _controllerReset.dispose();
114 | super.dispose();
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/lib/double_tap/double_tap_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../helpers.dart';
3 |
4 | class DoubleTapPage extends StatelessWidget {
5 | TransformationController controller = TransformationController();
6 |
7 | @override
8 | Widget build(BuildContext context) {
9 | controller.value = null;
10 |
11 | return Scaffold(
12 | appBar: AppBar(
13 | title: const Text('Double Tap Demo'),
14 | actions: [],
15 | ),
16 | body: Center(
17 | child: InteractiveViewer(
18 | child: Container(width: 200, height: 200, color: Colors.redAccent),
19 | ),
20 | ),
21 | );
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/game/game_page.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter team. 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 'dart:ui' as ui;
6 | import 'package:flutter/material.dart';
7 | import 'transformations_demo_board.dart';
8 | import 'transformations_demo_edit_board_point.dart';
9 |
10 | // BEGIN transformationsDemo#1
11 |
12 | class GamePage extends StatefulWidget {
13 | const GamePage({Key key}) : super(key: key);
14 |
15 | @override
16 | _GamePageState createState() => _GamePageState();
17 | }
18 |
19 | class _GamePageState extends State with TickerProviderStateMixin {
20 | // The radius of a hexagon tile in pixels.
21 | static const _kHexagonRadius = 32.0;
22 | // The margin between hexagons.
23 | static const _kHexagonMargin = 1.0;
24 | // The radius of the entire board in hexagons, not including the center.
25 | static const _kBoardRadius = 12;
26 |
27 | Board _board = Board(
28 | boardRadius: _kBoardRadius,
29 | hexagonRadius: _kHexagonRadius,
30 | hexagonMargin: _kHexagonMargin,
31 | );
32 |
33 | double _scale = 1.0;
34 | bool _firstRender = true;
35 | Matrix4 _homeTransformation;
36 | final TransformationController _transformationController = TransformationController();
37 | Animation _animationReset;
38 | AnimationController _controllerReset;
39 |
40 | // Handle reset to home transform animation.
41 | void _onAnimateReset() {
42 | _transformationController.value = _animationReset.value;
43 | if (!_controllerReset.isAnimating) {
44 | _animationReset?.removeListener(_onAnimateReset);
45 | _animationReset = null;
46 | _controllerReset.reset();
47 | }
48 | }
49 |
50 | // Initialize the reset to home transform animation.
51 | void _animateResetInitialize() {
52 | _controllerReset.reset();
53 | _animationReset = Matrix4Tween(
54 | begin: _transformationController.value,
55 | end: _homeTransformation,
56 | ).animate(_controllerReset);
57 | _controllerReset.duration = const Duration(milliseconds: 400);
58 | _animationReset.addListener(_onAnimateReset);
59 | _controllerReset.forward();
60 | }
61 |
62 | // Stop a running reset to home transform animation.
63 | void _animateResetStop() {
64 | _controllerReset.stop();
65 | _animationReset?.removeListener(_onAnimateReset);
66 | _animationReset = null;
67 | _controllerReset.reset();
68 | }
69 |
70 | void _onScaleStart(ScaleStartDetails details) {
71 | // If the user tries to cause a transformation while the reset animation is
72 | // running, cancel the reset animation.
73 | if (_controllerReset.status == AnimationStatus.forward) {
74 | _animateResetStop();
75 | }
76 | }
77 |
78 | void _onTapUp(TapUpDetails details) {
79 | final Offset scenePoint = _transformationController.toScene(details.localPosition);
80 | final BoardPoint boardPoint = _board.pointToBoardPoint(scenePoint);
81 | setState(() {
82 | _board = _board.copyWithSelected(boardPoint);
83 | });
84 | }
85 |
86 | void _onTransformationChange() {
87 | final double currentScale = _transformationController.value.getMaxScaleOnAxis();
88 | if (currentScale != _scale) {
89 | setState(() {
90 | _scale = currentScale;
91 | });
92 | }
93 | }
94 |
95 | @override
96 | void initState() {
97 | super.initState();
98 | _controllerReset = AnimationController(
99 | vsync: this,
100 | );
101 | _transformationController.addListener(_onTransformationChange);
102 | }
103 |
104 | @override
105 | void didUpdateWidget(GamePage oldWidget) {
106 | super.didUpdateWidget(oldWidget);
107 | }
108 |
109 | @override
110 | Widget build(BuildContext context) {
111 | // The scene is drawn by a CustomPaint, but user interaction is handled by
112 | // the InteractiveViewer parent widget.
113 | return Scaffold(
114 | backgroundColor: Theme.of(context).colorScheme.primary,
115 | appBar: AppBar(
116 | title: const Text('MyGameBoard'),
117 | actions: [resetButton],
118 | ),
119 | body: Container(
120 | color: backgroundColor,
121 | child: LayoutBuilder(
122 | builder: (context, constraints) {
123 | // Draw the scene as big as is available, but allow the user to
124 | // translate beyond that to a visibleSize that's a bit bigger.
125 | final Size viewportSize = Size(
126 | constraints.maxWidth,
127 | constraints.maxHeight,
128 | );
129 |
130 | // The board is drawn centered at the origin, which is the top left
131 | // corner in InteractiveViewer, so shift it to the center of the
132 | // viewport initially.
133 | if (_firstRender) {
134 | _firstRender = false;
135 | _homeTransformation = Matrix4.identity()..translate(
136 | viewportSize.width / 2,
137 | viewportSize.height / 2,
138 | );
139 | //_homeTransformation = Matrix4.identity();
140 | _transformationController.value = _homeTransformation;
141 | }
142 |
143 | // TODO(justinmc): There is a bug where the scale gesture doesn't
144 | // begin immediately, and it's caused by wrapping IV in a
145 | // GestureDetector. Removing the onTapUp fixes it.
146 | return GestureDetector(
147 | behavior: HitTestBehavior.opaque,
148 | onDoubleTap: () {print('justin double');},
149 | onTapUp: _onTapUp,
150 | child: InteractiveViewer(
151 | onInteractionUpdate: (ScaleUpdateDetails details) {
152 | //print('justin onInteractionUpdate ${details.scale}');
153 | },
154 | transformationController: _transformationController,
155 | //boundaryMargin: EdgeInsets.all(500.0),
156 | boundaryMargin: EdgeInsets.fromLTRB(
157 | _board.size.width * 2,
158 | _board.size.height * .75,
159 | _board.size.width / 4,
160 | _board.size.height * 4,
161 | ),
162 | minScale: 0.01,
163 | onInteractionStart: _onScaleStart,
164 | child: CustomPaint(
165 | size: _board.size,
166 | painter: _BoardPainter(
167 | board: _board,
168 | showDetail: _scale > 1.5,
169 | ),
170 | // This child gives the CustomPaint an intrinsic size.
171 | child: SizedBox(
172 | width: _board.size.width,
173 | height: _board.size.height,
174 | ),
175 | ),
176 | ),
177 | );
178 | },
179 | ),
180 | ),
181 | //persistentFooterButtons: [resetButton, editButton],
182 | );
183 | }
184 |
185 | IconButton get resetButton {
186 | return IconButton(
187 | onPressed: () {
188 | setState(() {
189 | _animateResetInitialize();
190 | });
191 | },
192 | tooltip: 'Reset',
193 | color: Theme.of(context).colorScheme.surface,
194 | icon: const Icon(Icons.replay),
195 | );
196 | }
197 |
198 | IconButton get editButton {
199 | return IconButton(
200 | onPressed: () {
201 | if (_board.selected == null) {
202 | return;
203 | }
204 | showModalBottomSheet(
205 | context: context,
206 | builder: (context) {
207 | return Container(
208 | width: double.infinity,
209 | height: 150,
210 | padding: const EdgeInsets.all(12),
211 | child: EditBoardPoint(
212 | boardPoint: _board.selected,
213 | onColorSelection: (color) {
214 | setState(() {
215 | _board = _board.copyWithBoardPointColor(
216 | _board.selected, color);
217 | Navigator.pop(context);
218 | });
219 | },
220 | ),
221 | );
222 | });
223 | },
224 | tooltip: 'Edit',
225 | color: Theme.of(context).colorScheme.surface,
226 | icon: const Icon(Icons.edit),
227 | );
228 | }
229 |
230 | @override
231 | void dispose() {
232 | _controllerReset.dispose();
233 | _transformationController.removeListener(_onTransformationChange);
234 | super.dispose();
235 | }
236 | }
237 |
238 | // CustomPainter is what is passed to CustomPaint and actually draws the scene
239 | // when its `paint` method is called.
240 | class _BoardPainter extends CustomPainter {
241 | const _BoardPainter({
242 | this.board,
243 | this.showDetail,
244 | });
245 |
246 | final bool showDetail;
247 | final Board board;
248 |
249 | @override
250 | void paint(Canvas canvas, Size size) {
251 | void drawBoardPoint(BoardPoint boardPoint) {
252 | /*
253 | final Color color = boardPoint.color.withOpacity(
254 | board.selected == boardPoint ? 0.7 : 1,
255 | );
256 | */
257 | final double opacity = board.selected == boardPoint ? 0.2 : showDetail ? 0.8 : 0.5;
258 | Color color;
259 | if (boardPoint.q < 2) {
260 | if (!showDetail) {
261 | color = Colors.red.withOpacity(opacity);
262 | } else {
263 | if (boardPoint.r % 2 == 1) {
264 | if (boardPoint.q % 2 == 1) {
265 | color = Colors.deepOrangeAccent.withOpacity(opacity);
266 | } else {
267 | color = Colors.orangeAccent.withOpacity(opacity);
268 | }
269 | } else {
270 | if (boardPoint.q % 2 == 1) {
271 | color = Colors.pinkAccent.withOpacity(opacity);
272 | } else {
273 | color = Colors.pink.withOpacity(opacity);
274 | }
275 | }
276 | }
277 | } else {
278 | if (!showDetail) {
279 | color = Colors.blue.withOpacity(opacity);
280 | } else {
281 | if (boardPoint.r % 2 == 1) {
282 | if (boardPoint.q % 2 == 1) {
283 | color = Colors.blueAccent.withOpacity(opacity);
284 | } else {
285 | color = Colors.blueGrey.withOpacity(opacity);
286 | }
287 | } else {
288 | if (boardPoint.q % 2 == 1) {
289 | color = Colors.lightBlue.withOpacity(opacity);
290 | } else {
291 | color = Colors.lightBlueAccent.withOpacity(opacity);
292 | }
293 | }
294 | }
295 | }
296 | final ui.Vertices vertices =
297 | board.getVerticesForBoardPoint(boardPoint, color);
298 | canvas.drawVertices(vertices, BlendMode.color, Paint());
299 |
300 | /*
301 | final ui.ParagraphBuilder paragraphBuilder = ui.ParagraphBuilder(ui.ParagraphStyle(
302 | fontSize: 12.0,
303 | height: 20.0,
304 | maxLines: 1,
305 | textAlign: TextAlign.start,
306 | textDirection: TextDirection.ltr,
307 | ));
308 | /*
309 | paragraphBuilder.pushStyle(ui.TextStyle(
310 | color: Colors.red,
311 | fontSize: 12.0,
312 | height: 20.0,
313 | ));
314 | */
315 | paragraphBuilder.addText('hello ${boardPoint.q}, ${boardPoint.r}');
316 | final ui.Paragraph paragraph = paragraphBuilder.build();
317 | final Point textPoint = board.boardPointToPoint(boardPoint);
318 | final Offset textOffset = Offset(
319 | textPoint.x,
320 | textPoint.y,
321 | );
322 |
323 | print('justin draw at $textOffset');
324 | canvas.drawParagraph(paragraph, textOffset);
325 | */
326 | }
327 |
328 | board.forEach(drawBoardPoint);
329 | }
330 |
331 | // We should repaint whenever the board changes, such as board.selected.
332 | @override
333 | bool shouldRepaint(_BoardPainter oldDelegate) {
334 | return oldDelegate.board != board;
335 | }
336 | }
337 |
338 | // END
339 |
--------------------------------------------------------------------------------
/lib/game/transformations_demo.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Flutter team. 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 'dart:ui' show Vertices;
6 | import 'package:flutter/material.dart';
7 | import 'package:gallery/l10n/gallery_localizations.dart';
8 | import 'transformations_demo_board.dart';
9 | import 'transformations_demo_edit_board_point.dart';
10 |
11 | // BEGIN transformationsDemo#1
12 |
13 | class TransformationsDemo extends StatefulWidget {
14 | const TransformationsDemo({Key key}) : super(key: key);
15 |
16 | @override
17 | _TransformationsDemoState createState() => _TransformationsDemoState();
18 | }
19 |
20 | class _TransformationsDemoState extends State with TickerProviderStateMixin {
21 | // The radius of a hexagon tile in pixels.
22 | static const _kHexagonRadius = 32.0;
23 | // The margin between hexagons.
24 | static const _kHexagonMargin = 1.0;
25 | // The radius of the entire board in hexagons, not including the center.
26 | static const _kBoardRadius = 12;
27 |
28 | Board _board = Board(
29 | boardRadius: _kBoardRadius,
30 | hexagonRadius: _kHexagonRadius,
31 | hexagonMargin: _kHexagonMargin,
32 | );
33 |
34 | Matrix4 _homeTransformation;
35 | final ValueNotifier _transformationController = ValueNotifier(null);
36 | Animation _animationReset;
37 | AnimationController _controllerReset;
38 |
39 | // Handle reset to home transform animation.
40 | void _onAnimateReset() {
41 | setState(() {
42 | _transformationController.value = _animationReset.value;
43 | });
44 | if (!_controllerReset.isAnimating) {
45 | _animationReset?.removeListener(_onAnimateReset);
46 | _animationReset = null;
47 | _controllerReset.reset();
48 | }
49 | }
50 |
51 | // Initialize the reset to home transform animation.
52 | void _animateResetInitialize() {
53 | _controllerReset.reset();
54 | _animationReset = Matrix4Tween(
55 | begin: _transformationController.value,
56 | end: _homeTransformation,
57 | ).animate(_controllerReset);
58 | _controllerReset.duration = const Duration(milliseconds: 400);
59 | _animationReset.addListener(_onAnimateReset);
60 | _controllerReset.forward();
61 | }
62 |
63 | // Stop a running reset to home transform animation.
64 | void _animateResetStop() {
65 | _controllerReset.stop();
66 | _animationReset?.removeListener(_onAnimateReset);
67 | _animationReset = null;
68 | _controllerReset.reset();
69 | }
70 |
71 | void _onScaleStart(ScaleStartDetails details) {
72 | // If the user tries to cause a transformation while the reset animation is
73 | // running, cancel the reset animation.
74 | if (_controllerReset.status == AnimationStatus.forward) {
75 | _animateResetStop();
76 | }
77 | }
78 |
79 | void _onTapUp(TapUpDetails details) {
80 | final Offset scenePoint = details.globalPosition;
81 | final BoardPoint boardPoint = _board.pointToBoardPoint(scenePoint);
82 | setState(() {
83 | _board = _board.copyWithSelected(boardPoint);
84 | });
85 | }
86 |
87 | void initState() {
88 | super.initState();
89 | _controllerReset = AnimationController(
90 | vsync: this,
91 | );
92 | }
93 |
94 | @override
95 | void didUpdateWidget(TransformationsDemo oldWidget) {
96 | super.didUpdateWidget(oldWidget);
97 | }
98 |
99 | @override
100 | Widget build(BuildContext context) {
101 | final _BoardPainter painter = _BoardPainter(
102 | board: _board,
103 | );
104 |
105 | // The scene is drawn by a CustomPaint, but user interaction is handled by
106 | // the InteractiveViewer parent widget.
107 | return Scaffold(
108 | backgroundColor: Theme.of(context).colorScheme.primary,
109 | appBar: AppBar(
110 | automaticallyImplyLeading: false,
111 | title:
112 | Text(GalleryLocalizations.of(context).demo2dTransformationsTitle),
113 | ),
114 | body: Container(
115 | color: backgroundColor,
116 | child: LayoutBuilder(
117 | builder: (context, constraints) {
118 | // Draw the scene as big as is available, but allow the user to
119 | // translate beyond that to a visibleSize that's a bit bigger.
120 | final Size viewportSize = Size(
121 | constraints.maxWidth,
122 | constraints.maxHeight,
123 | );
124 |
125 | // The board is drawn centered at the origin, which is the top left
126 | // corner in InteractiveViewer, so shift it to the center of the
127 | // viewport initially.
128 | if (_transformationController.value == null) {
129 | _homeTransformation = Matrix4.identity()..translate(
130 | viewportSize.width / 2,
131 | viewportSize.height / 2,
132 | );
133 | _transformationController.value = _homeTransformation;
134 | }
135 |
136 | return InteractiveViewer(
137 | transformationController: _transformationController,
138 | // boundaryMargin also takes into consideration the fact that the
139 | // board is centered at the origin. These values provide a nice
140 | // amount of space for typical interaction.
141 | boundaryMargin: const EdgeInsets.fromLTRB(
142 | 840.0,
143 | 840.0,
144 | -100.0,
145 | 0,
146 | ),
147 | onScaleStart: _onScaleStart,
148 | onTapUp: _onTapUp,
149 | child: CustomPaint(
150 | size: _board.size,
151 | painter: _BoardPainter(
152 | board: _board,
153 | ),
154 | // This child gives the CustomPaint an intrinsic size.
155 | child: SizedBox(
156 | width: _board.size.width,
157 | height: _board.size.height,
158 | ),
159 | ),
160 | );
161 | },
162 | ),
163 | ),
164 | persistentFooterButtons: [resetButton, editButton],
165 | );
166 | }
167 |
168 | IconButton get resetButton {
169 | return IconButton(
170 | onPressed: () {
171 | setState(() {
172 | _animateResetInitialize();
173 | });
174 | },
175 | tooltip:
176 | GalleryLocalizations.of(context).demo2dTransformationsResetTooltip,
177 | color: Theme.of(context).colorScheme.surface,
178 | icon: const Icon(Icons.replay),
179 | );
180 | }
181 |
182 | IconButton get editButton {
183 | return IconButton(
184 | onPressed: () {
185 | if (_board.selected == null) {
186 | return;
187 | }
188 | showModalBottomSheet(
189 | context: context,
190 | builder: (context) {
191 | return Container(
192 | width: double.infinity,
193 | height: 150,
194 | padding: const EdgeInsets.all(12),
195 | child: EditBoardPoint(
196 | boardPoint: _board.selected,
197 | onColorSelection: (color) {
198 | setState(() {
199 | _board = _board.copyWithBoardPointColor(
200 | _board.selected, color);
201 | Navigator.pop(context);
202 | });
203 | },
204 | ),
205 | );
206 | });
207 | },
208 | tooltip:
209 | GalleryLocalizations.of(context).demo2dTransformationsEditTooltip,
210 | color: Theme.of(context).colorScheme.surface,
211 | icon: const Icon(Icons.edit),
212 | );
213 | }
214 |
215 | @override
216 | void dispose() {
217 | _controllerReset.dispose();
218 | super.dispose();
219 | }
220 | }
221 |
222 | // CustomPainter is what is passed to CustomPaint and actually draws the scene
223 | // when its `paint` method is called.
224 | class _BoardPainter extends CustomPainter {
225 | const _BoardPainter({
226 | this.board,
227 | });
228 |
229 | final Board board;
230 |
231 | @override
232 | void paint(Canvas canvas, Size size) {
233 | void drawBoardPoint(BoardPoint boardPoint) {
234 | final Color color = boardPoint.color.withOpacity(
235 | board.selected == boardPoint ? 0.7 : 1,
236 | );
237 | final Vertices vertices =
238 | board.getVerticesForBoardPoint(boardPoint, color);
239 | canvas.drawVertices(vertices, BlendMode.color, Paint());
240 | }
241 |
242 | board.forEach(drawBoardPoint);
243 | }
244 |
245 | // We should repaint whenever the board changes, such as board.selected.
246 | @override
247 | bool shouldRepaint(_BoardPainter oldDelegate) {
248 | return oldDelegate.board != board;
249 | }
250 | }
251 |
252 | // END
253 |
--------------------------------------------------------------------------------
/lib/game/transformations_demo_board.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Flutter team. 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 'dart:collection' show IterableMixin;
6 | import 'dart:math';
7 | import 'dart:ui' show Vertices;
8 | import 'package:flutter/material.dart' hide Gradient;
9 | import 'package:vector_math/vector_math_64.dart' show Vector3;
10 |
11 | // BEGIN transformationsDemo#2
12 |
13 | // The entire state of the hex board and abstraction to get information about
14 | // it. Iterable so that all BoardPoints on the board can be iterated over.
15 | @immutable
16 | class Board extends Object with IterableMixin {
17 | Board({
18 | @required this.boardRadius,
19 | @required this.hexagonRadius,
20 | @required this.hexagonMargin,
21 | this.selected,
22 | List boardPoints,
23 | }) : assert(boardRadius > 0),
24 | assert(hexagonRadius > 0),
25 | assert(hexagonMargin >= 0) {
26 | // Set up the positions for the center hexagon where the entire board is
27 | // centered on the origin.
28 | // Start point of hexagon (top vertex).
29 | final Point hexStart = Point(0, -hexagonRadius);
30 | final double hexagonRadiusPadded = hexagonRadius - hexagonMargin;
31 | final double centerToFlat = sqrt(3) / 2 * hexagonRadiusPadded;
32 | positionsForHexagonAtOrigin.addAll([
33 | Offset(hexStart.x, hexStart.y),
34 | Offset(hexStart.x + centerToFlat, hexStart.y + 0.5 * hexagonRadiusPadded),
35 | Offset(hexStart.x + centerToFlat, hexStart.y + 1.5 * hexagonRadiusPadded),
36 | Offset(hexStart.x + centerToFlat, hexStart.y + 1.5 * hexagonRadiusPadded),
37 | Offset(hexStart.x, hexStart.y + 2 * hexagonRadiusPadded),
38 | Offset(hexStart.x, hexStart.y + 2 * hexagonRadiusPadded),
39 | Offset(hexStart.x - centerToFlat, hexStart.y + 1.5 * hexagonRadiusPadded),
40 | Offset(hexStart.x - centerToFlat, hexStart.y + 1.5 * hexagonRadiusPadded),
41 | Offset(hexStart.x - centerToFlat, hexStart.y + 0.5 * hexagonRadiusPadded),
42 | ]);
43 |
44 | if (boardPoints != null) {
45 | _boardPoints.addAll(boardPoints);
46 | } else {
47 | // Generate boardPoints for a fresh board.
48 | BoardPoint boardPoint = _getNextBoardPoint(null);
49 | while (boardPoint != null) {
50 | _boardPoints.add(boardPoint);
51 | boardPoint = _getNextBoardPoint(boardPoint);
52 | }
53 | }
54 | }
55 |
56 | final int boardRadius; // Number of hexagons from center to edge.
57 | final double hexagonRadius; // Pixel radius of a hexagon (center to vertex).
58 | final double hexagonMargin; // Margin between hexagons.
59 | final List positionsForHexagonAtOrigin = [];
60 | final BoardPoint selected;
61 | final List _boardPoints = [];
62 |
63 | @override
64 | Iterator get iterator => _BoardIterator(_boardPoints);
65 |
66 | // Get the size in pixels of the entire board.
67 | Size get size {
68 | final double centerToFlat = sqrt(3) / 2 * hexagonRadius;
69 | return Size(
70 | (boardRadius * 2 + 1) * centerToFlat * 2,
71 | 2 * (hexagonRadius + boardRadius * 1.5 * hexagonRadius),
72 | );
73 | }
74 |
75 | // For a given q axial coordinate, get the range of possible r values
76 | // See the definition of BoardPoint for more information about hex grids and
77 | // axial coordinates.
78 | _Range _getRRangeForQ(int q) {
79 | int rStart;
80 | int rEnd;
81 | if (q <= 0) {
82 | rStart = -boardRadius - q;
83 | rEnd = boardRadius;
84 | } else {
85 | rEnd = boardRadius - q;
86 | rStart = -boardRadius;
87 | }
88 |
89 | return _Range(rStart, rEnd);
90 | }
91 |
92 | // Get the BoardPoint that comes after the given BoardPoint. If given null,
93 | // returns the origin BoardPoint. If given BoardPoint is the last, returns
94 | // null.
95 | BoardPoint _getNextBoardPoint(BoardPoint boardPoint) {
96 | // If before the first element.
97 | if (boardPoint == null) {
98 | return BoardPoint(-boardRadius, 0);
99 | }
100 |
101 | final _Range rRange = _getRRangeForQ(boardPoint.q);
102 |
103 | // If at or after the last element.
104 | if (boardPoint.q >= boardRadius && boardPoint.r >= rRange.max) {
105 | return null;
106 | }
107 |
108 | // If wrapping from one q to the next.
109 | if (boardPoint.r >= rRange.max) {
110 | return BoardPoint(boardPoint.q + 1, _getRRangeForQ(boardPoint.q + 1).min);
111 | }
112 |
113 | // Otherwise we're just incrementing r.
114 | return BoardPoint(boardPoint.q, boardPoint.r + 1);
115 | }
116 |
117 | // Check if the board point is actually on the board.
118 | bool _validateBoardPoint(BoardPoint boardPoint) {
119 | const BoardPoint center = BoardPoint(0, 0);
120 | final int distanceFromCenter = getDistance(center, boardPoint);
121 | return distanceFromCenter <= boardRadius;
122 | }
123 |
124 | // Get the distance between two BoardPoins.
125 | static int getDistance(BoardPoint a, BoardPoint b) {
126 | final Vector3 a3 = a.cubeCoordinates;
127 | final Vector3 b3 = b.cubeCoordinates;
128 | return ((a3.x - b3.x).abs() + (a3.y - b3.y).abs() + (a3.z - b3.z).abs()) ~/
129 | 2;
130 | }
131 |
132 | // Return the q,r BoardPoint for a point in the scene, where the origin is in
133 | // the center of the board in both coordinate systems. If no BoardPoint at the
134 | // location, return null.
135 | BoardPoint pointToBoardPoint(Offset point) {
136 | final BoardPoint boardPoint = BoardPoint(
137 | ((sqrt(3) / 3 * point.dx - 1 / 3 * point.dy) / hexagonRadius).round(),
138 | ((2 / 3 * point.dy) / hexagonRadius).round(),
139 | );
140 |
141 | if (!_validateBoardPoint(boardPoint)) {
142 | return null;
143 | }
144 |
145 | return _boardPoints.firstWhere((boardPointI) {
146 | return boardPointI.q == boardPoint.q && boardPointI.r == boardPoint.r;
147 | });
148 | }
149 |
150 | // Return a scene point for the center of a hexagon given its q,r point.
151 | Point boardPointToPoint(BoardPoint boardPoint) {
152 | return Point(
153 | sqrt(3) * hexagonRadius * boardPoint.q +
154 | sqrt(3) / 2 * hexagonRadius * boardPoint.r,
155 | 1.5 * hexagonRadius * boardPoint.r,
156 | );
157 | }
158 |
159 | // Get Vertices that can be drawn to a Canvas for the given BoardPoint.
160 | Vertices getVerticesForBoardPoint(BoardPoint boardPoint, Color color) {
161 | final Point centerOfHexZeroCenter = boardPointToPoint(boardPoint);
162 |
163 | final List positions = positionsForHexagonAtOrigin.map((offset) {
164 | return offset.translate(centerOfHexZeroCenter.x, centerOfHexZeroCenter.y);
165 | }).toList();
166 |
167 | return Vertices(
168 | VertexMode.triangleFan,
169 | positions,
170 | colors: List.filled(positions.length, color),
171 | );
172 | }
173 |
174 | // Return a new board with the given BoardPoint selected.
175 | Board copyWithSelected(BoardPoint boardPoint) {
176 | if (selected == boardPoint) {
177 | return this;
178 | }
179 | final Board nextBoard = Board(
180 | boardRadius: boardRadius,
181 | hexagonRadius: hexagonRadius,
182 | hexagonMargin: hexagonMargin,
183 | selected: boardPoint,
184 | boardPoints: _boardPoints,
185 | );
186 | return nextBoard;
187 | }
188 |
189 | // Return a new board where boardPoint has the given color.
190 | Board copyWithBoardPointColor(BoardPoint boardPoint, Color color) {
191 | final BoardPoint nextBoardPoint = boardPoint.copyWithColor(color);
192 | final int boardPointIndex = _boardPoints.indexWhere((boardPointI) =>
193 | boardPointI.q == boardPoint.q && boardPointI.r == boardPoint.r);
194 |
195 | if (elementAt(boardPointIndex) == boardPoint && boardPoint.color == color) {
196 | return this;
197 | }
198 |
199 | final List nextBoardPoints =
200 | List.from(_boardPoints);
201 | nextBoardPoints[boardPointIndex] = nextBoardPoint;
202 | final BoardPoint selectedBoardPoint =
203 | boardPoint == selected ? nextBoardPoint : selected;
204 | return Board(
205 | boardRadius: boardRadius,
206 | hexagonRadius: hexagonRadius,
207 | hexagonMargin: hexagonMargin,
208 | selected: selectedBoardPoint,
209 | boardPoints: nextBoardPoints,
210 | );
211 | }
212 | }
213 |
214 | class _BoardIterator extends Iterator {
215 | _BoardIterator(this.boardPoints);
216 |
217 | final List boardPoints;
218 | int currentIndex;
219 |
220 | @override
221 | BoardPoint current;
222 |
223 | @override
224 | bool moveNext() {
225 | if (currentIndex == null) {
226 | currentIndex = 0;
227 | } else {
228 | currentIndex++;
229 | }
230 |
231 | if (currentIndex >= boardPoints.length) {
232 | current = null;
233 | return false;
234 | }
235 |
236 | current = boardPoints[currentIndex];
237 | return true;
238 | }
239 | }
240 |
241 | // A range of q/r board coordinate values.
242 | @immutable
243 | class _Range {
244 | const _Range(this.min, this.max)
245 | : assert(min != null),
246 | assert(max != null),
247 | assert(min <= max);
248 |
249 | final int min;
250 | final int max;
251 | }
252 |
253 | // A location on the board in axial coordinates.
254 | // Axial coordinates use two integers, q and r, to locate a hexagon on a grid.
255 | // https://www.redblobgames.com/grids/hexagons/#coordinates-axial
256 | @immutable
257 | class BoardPoint {
258 | const BoardPoint(
259 | this.q,
260 | this.r, {
261 | this.color = const Color(0xFFCDCDCD),
262 | });
263 |
264 | final int q;
265 | final int r;
266 | final Color color;
267 |
268 | @override
269 | String toString() {
270 | return 'BoardPoint($q, $r, $color)';
271 | }
272 |
273 | // Only compares by location.
274 | @override
275 | bool operator ==(Object other) {
276 | if (other.runtimeType != runtimeType) {
277 | return false;
278 | }
279 | return other is BoardPoint && other.q == q && other.r == r;
280 | }
281 |
282 | @override
283 | int get hashCode => hashValues(q, r);
284 |
285 | BoardPoint copyWithColor(Color nextColor) =>
286 | BoardPoint(q, r, color: nextColor);
287 |
288 | // Convert from q,r axial coords to x,y,z cube coords.
289 | Vector3 get cubeCoordinates {
290 | return Vector3(
291 | q.toDouble(),
292 | r.toDouble(),
293 | (-q - r).toDouble(),
294 | );
295 | }
296 | }
297 |
298 | // END
299 |
--------------------------------------------------------------------------------
/lib/game/transformations_demo_color_picker.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Flutter team. 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/material.dart';
6 |
7 | // A generic widget for a list of selectable colors.
8 | @immutable
9 | class ColorPicker extends StatelessWidget {
10 | const ColorPicker({
11 | @required this.colors,
12 | @required this.selectedColor,
13 | this.onColorSelection,
14 | }) : assert(colors != null),
15 | assert(selectedColor != null);
16 |
17 | final Set colors;
18 | final Color selectedColor;
19 | final ValueChanged onColorSelection;
20 |
21 | @override
22 | Widget build(BuildContext context) {
23 | return Row(
24 | mainAxisAlignment: MainAxisAlignment.center,
25 | children: colors.map((color) {
26 | return _ColorPickerSwatch(
27 | color: color,
28 | selected: color == selectedColor,
29 | onTap: () {
30 | if (onColorSelection != null) {
31 | onColorSelection(color);
32 | }
33 | },
34 | );
35 | }).toList(),
36 | );
37 | }
38 | }
39 |
40 | // A single selectable color widget in the ColorPicker.
41 | @immutable
42 | class _ColorPickerSwatch extends StatelessWidget {
43 | const _ColorPickerSwatch({
44 | @required this.color,
45 | @required this.selected,
46 | this.onTap,
47 | }) : assert(color != null),
48 | assert(selected != null);
49 |
50 | final Color color;
51 | final bool selected;
52 | final Function onTap;
53 |
54 | @override
55 | Widget build(BuildContext context) {
56 | return Container(
57 | width: 60,
58 | height: 60,
59 | padding: const EdgeInsets.fromLTRB(2, 0, 2, 0),
60 | child: RawMaterialButton(
61 | fillColor: color,
62 | onPressed: () {
63 | if (onTap != null) {
64 | onTap();
65 | }
66 | },
67 | child: !selected
68 | ? null
69 | : const Icon(
70 | Icons.check,
71 | color: Colors.white,
72 | ),
73 | ),
74 | );
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/lib/game/transformations_demo_edit_board_point.dart:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Flutter team. 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/material.dart';
6 | import 'transformations_demo_board.dart';
7 | import 'transformations_demo_color_picker.dart';
8 |
9 | final backgroundColor = Color(0xFF272727);
10 |
11 | // The panel for editing a board point.
12 | @immutable
13 | class EditBoardPoint extends StatelessWidget {
14 | const EditBoardPoint({
15 | Key key,
16 | @required this.boardPoint,
17 | this.onColorSelection,
18 | }) : assert(boardPoint != null),
19 | super(key: key);
20 |
21 | final BoardPoint boardPoint;
22 | final ValueChanged onColorSelection;
23 |
24 | @override
25 | Widget build(BuildContext context) {
26 | final boardPointColors = {
27 | Colors.white,
28 | Colors.red,
29 | Colors.blue,
30 | Colors.grey,
31 | backgroundColor,
32 | };
33 |
34 | return Column(
35 | crossAxisAlignment: CrossAxisAlignment.stretch,
36 | children: [
37 | Text(
38 | '${boardPoint.q}, ${boardPoint.r}',
39 | textAlign: TextAlign.right,
40 | style: const TextStyle(fontWeight: FontWeight.bold),
41 | ),
42 | ColorPicker(
43 | colors: boardPointColors,
44 | selectedColor: boardPoint.color,
45 | onColorSelection: onColorSelection,
46 | ),
47 | ],
48 | );
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/lib/helpers.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | Column getFlex() {
4 | return Column(
5 | children: [
6 | for (int i = 0; i < 4; i++)
7 | Row(
8 | children: [
9 | for (int j = 0; j < 4; j++)
10 | Container(
11 | width: 75, height: 75,
12 | color: Colors.teal.withOpacity((16 - (i * 4 + j)) / 16),
13 | ),
14 | ],
15 | ),
16 | ],
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/lib/image/image_page.dart:
--------------------------------------------------------------------------------
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/material.dart';
6 |
7 | enum GridDemoTileStyle {
8 | imageOnly,
9 | oneLine,
10 | twoLine
11 | }
12 |
13 | typedef BannerTapCallback = void Function(Photo photo);
14 |
15 | const String _kGalleryAssetsPackage = 'flutter_gallery_assets';
16 |
17 | class Photo {
18 | Photo({
19 | this.assetName,
20 | this.assetPackage,
21 | this.title,
22 | this.caption,
23 | this.isFavorite = false,
24 | });
25 |
26 | final String assetName;
27 | final String assetPackage;
28 | final String title;
29 | final String caption;
30 |
31 | bool isFavorite;
32 | String get tag => assetName; // Assuming that all asset names are unique.
33 |
34 | bool get isValid => assetName != null && title != null && caption != null && isFavorite != null;
35 | }
36 |
37 | class _GridTitleText extends StatelessWidget {
38 | const _GridTitleText(this.text);
39 |
40 | final String text;
41 |
42 | @override
43 | Widget build(BuildContext context) {
44 | return FittedBox(
45 | fit: BoxFit.scaleDown,
46 | alignment: Alignment.centerLeft,
47 | child: Text(text),
48 | );
49 | }
50 | }
51 |
52 | class GridDemoPhotoItem extends StatelessWidget {
53 | GridDemoPhotoItem({
54 | Key key,
55 | @required this.photo,
56 | @required this.tileStyle,
57 | @required this.onBannerTap,
58 | }) : assert(photo != null && photo.isValid),
59 | assert(tileStyle != null),
60 | assert(onBannerTap != null),
61 | super(key: key);
62 |
63 | final Photo photo;
64 | final GridDemoTileStyle tileStyle;
65 | final BannerTapCallback onBannerTap; // User taps on the photo's header or footer.
66 | final TransformationController _transformationController = TransformationController();
67 |
68 | void showPhoto(BuildContext context) {
69 | Navigator.push(context, MaterialPageRoute(
70 | builder: (BuildContext context) {
71 | // Here's the relevant code for InteractiveViewer for a full screen image.
72 | return Scaffold(
73 | appBar: AppBar(
74 | title: Text(photo.title),
75 | ),
76 | /*
77 | body: Image.asset(
78 | photo.assetName,
79 | alignment: Alignment.center,
80 | fit: BoxFit.fill,
81 | package: photo.assetPackage,
82 | ),
83 | */
84 | body: Hero(
85 | tag: photo.tag,
86 | // TODO(justinmc): Try doing double tap to zoom.
87 | child: GestureDetector(
88 | onTapUp: (TapUpDetails details) {
89 | final Offset position = _transformationController.toScene(
90 | details.localPosition,
91 | );
92 | print('justin tapup at $position');
93 | },
94 | child: InteractiveViewer(
95 | constrained: true,
96 | minScale: 0.000001,
97 | maxScale: 1000,
98 | //panEnabled: false,
99 | boundaryMargin: EdgeInsets.all(double.infinity),
100 | transformationController: _transformationController,
101 | child: Center(
102 | child: Image.asset(
103 | photo.assetName,
104 | fit: BoxFit.fill,
105 | package: photo.assetPackage,
106 | ),
107 | ),
108 | ),
109 | ),
110 | ),
111 | );
112 | }
113 | ));
114 | }
115 |
116 | @override
117 | Widget build(BuildContext context) {
118 | final Widget image = GestureDetector(
119 | onTap: () { showPhoto(context); },
120 | child: Hero(
121 | key: Key(photo.assetName),
122 | tag: photo.tag,
123 | child: Image.asset(
124 | photo.assetName,
125 | package: photo.assetPackage,
126 | fit: BoxFit.cover,
127 | ),
128 | ),
129 | );
130 |
131 | final IconData icon = photo.isFavorite ? Icons.star : Icons.star_border;
132 |
133 | switch (tileStyle) {
134 | case GridDemoTileStyle.imageOnly:
135 | return image;
136 |
137 | case GridDemoTileStyle.oneLine:
138 | return GridTile(
139 | header: GestureDetector(
140 | onTap: () { onBannerTap(photo); },
141 | child: GridTileBar(
142 | title: _GridTitleText(photo.title),
143 | backgroundColor: Colors.black45,
144 | leading: Icon(
145 | icon,
146 | color: Colors.white,
147 | ),
148 | ),
149 | ),
150 | child: image,
151 | );
152 |
153 | case GridDemoTileStyle.twoLine:
154 | return GridTile(
155 | footer: GestureDetector(
156 | onTap: () { onBannerTap(photo); },
157 | child: GridTileBar(
158 | backgroundColor: Colors.black45,
159 | title: _GridTitleText(photo.title),
160 | subtitle: _GridTitleText(photo.caption),
161 | trailing: Icon(
162 | icon,
163 | color: Colors.white,
164 | ),
165 | ),
166 | ),
167 | child: image,
168 | );
169 | }
170 | assert(tileStyle != null);
171 | return null;
172 | }
173 | }
174 |
175 | class ImagePage extends StatefulWidget {
176 | const ImagePage({ Key key }) : super(key: key);
177 |
178 | static const String routeName = '/material/grid-list';
179 |
180 | @override
181 | ImagePageState createState() => ImagePageState();
182 | }
183 |
184 | class ImagePageState extends State {
185 | GridDemoTileStyle _tileStyle = GridDemoTileStyle.twoLine;
186 |
187 | List photos = [
188 | Photo(
189 | assetName: 'images/india_chennai_flower_market.png',
190 | title: 'Chennai',
191 | caption: 'Flower Market',
192 | ),
193 | Photo(
194 | assetName: 'images/tall.jpg',
195 | title: 'Tall',
196 | caption: 'Image taller than the screen',
197 | ),
198 | ];
199 |
200 | void changeTileStyle(GridDemoTileStyle value) {
201 | setState(() {
202 | _tileStyle = value;
203 | });
204 | }
205 |
206 | @override
207 | Widget build(BuildContext context) {
208 | final Orientation orientation = MediaQuery.of(context).orientation;
209 | return Scaffold(
210 | appBar: AppBar(
211 | title: const Text('Photos'),
212 | actions: [
213 | PopupMenuButton(
214 | onSelected: changeTileStyle,
215 | itemBuilder: (BuildContext context) => >[
216 | const PopupMenuItem(
217 | value: GridDemoTileStyle.imageOnly,
218 | child: Text('Image only'),
219 | ),
220 | const PopupMenuItem(
221 | value: GridDemoTileStyle.oneLine,
222 | child: Text('One line'),
223 | ),
224 | const PopupMenuItem(
225 | value: GridDemoTileStyle.twoLine,
226 | child: Text('Two line'),
227 | ),
228 | ],
229 | ),
230 | ],
231 | ),
232 | body: Column(
233 | children: [
234 | Expanded(
235 | child: SafeArea(
236 | top: false,
237 | bottom: false,
238 | child: GridView.count(
239 | crossAxisCount: (orientation == Orientation.portrait) ? 2 : 3,
240 | mainAxisSpacing: 4.0,
241 | crossAxisSpacing: 4.0,
242 | padding: const EdgeInsets.all(4.0),
243 | childAspectRatio: (orientation == Orientation.portrait) ? 1.0 : 1.3,
244 | children: photos.map((Photo photo) {
245 | return GridDemoPhotoItem(
246 | photo: photo,
247 | tileStyle: _tileStyle,
248 | onBannerTap: (Photo photo) {
249 | setState(() {
250 | photo.isFavorite = !photo.isFavorite;
251 | });
252 | },
253 | );
254 | }).toList(),
255 | ),
256 | ),
257 | ),
258 | ],
259 | ),
260 | );
261 | }
262 | }
263 |
--------------------------------------------------------------------------------
/lib/jump/jump_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart' hide Gradient;
2 | import 'dart:developer';
3 |
4 | class JumpPage extends StatefulWidget {
5 | JumpPage({Key key}) : super(key: key);
6 |
7 | @override
8 | _JumpPageState createState() => _JumpPageState();
9 | }
10 |
11 | class _JumpPageState extends State {
12 | int _counter = 0;
13 | void _incrementCounter() {
14 | setState(() { // This call to setState tells the Flutter framework that something has changed in this State
15 | _counter++;
16 | });
17 | }
18 |
19 | Widget letter(double size, String txt) {
20 | return Stack(
21 | children: [Image.asset('images/letter.png',
22 | width: size,
23 | height: size,
24 | fit:BoxFit.fitHeight),
25 | Positioned.fill(
26 | child: Center(
27 | child: Material(type:MaterialType.transparency,
28 | child: Text(txt,
29 | style: new TextStyle(
30 | decoration: TextDecoration.none,
31 | fontWeight: FontWeight.bold,
32 | fontSize: size / 1.5,
33 | color: Colors.white,
34 | shadows: [
35 | Shadow(
36 | offset: Offset(0, 0),
37 | blurRadius: 20.0,
38 | color: Colors.black),
39 | ]
40 | )),
41 | ),
42 | ),
43 | )]
44 | );
45 | }
46 |
47 | Widget draggableLetter(double size, String txt) {
48 | return Draggable(
49 | child: letter(size, txt),
50 | feedback: letter(size*1.3, txt),
51 | childWhenDragging: Container(),
52 | );
53 | }
54 |
55 | Widget positionedLetter(double x, double y, size, String txt) {
56 | return
57 | Positioned(
58 | left: (x) * size,
59 | top:(y) * size,
60 | child: draggableLetter(size, txt)
61 | );
62 | }
63 |
64 | @override
65 | Widget build(BuildContext context) { // This method is rerun every time setState is called
66 | log( '%%%%%%%% BUILD State %%%%%%');
67 |
68 | return Scaffold(
69 | appBar: AppBar(
70 | // Here we take the value from the JumpPage object that was created by
71 | // the App.build method, and use it to set our appbar title.
72 | title: Text('Jump Page'),
73 | ),
74 | body: Center(
75 |
76 | child: LayoutBuilder( /* Useful to take decisions based on the parent's
77 | constraints (that you cannot access in general) */
78 | builder: (context, constraints) {
79 | double letterSize = constraints.maxWidth / 15;
80 | return
81 | Column(
82 | children: [
83 | SizedBox(
84 | width: constraints.maxWidth, height: constraints.maxWidth,
85 | child: ClipRect(
86 | child: InteractiveViewer(
87 | maxScale: 10,
88 | child: Stack(children:
89 | [Image.asset('images/board1500.png', fit:BoxFit.cover),
90 | positionedLetter(7,7, letterSize, 'A'),
91 | positionedLetter(7,10, letterSize, 'B'),
92 | positionedLetter(7,13, letterSize, 'C')]),
93 | )
94 | )
95 | ),
96 | Row(children: [Text('Bottom bar')],)]
97 | );
98 | },
99 | ),
100 | ),
101 | );
102 | }
103 | }
104 |
105 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'controller/controller_page.dart';
3 | import 'game/game_page.dart';
4 | import 'image/image_page.dart';
5 | import 'table/table_page.dart';
6 | import 'rotate/rotate_page.dart';
7 | import 'jump/jump_page.dart';
8 | import 'middle/middle_page.dart';
9 | import 'childSize/child_size.dart';
10 | import 'childSize/boundary_size_page.dart';
11 | import 'double_tap/double_tap_page.dart';
12 | import 'builder_page.dart';
13 |
14 | void main() => runApp(MyApp());
15 |
16 | class MyApp extends StatelessWidget {
17 | @override
18 | Widget build(BuildContext context) {
19 | return MaterialApp(
20 | title: 'Flutter Validation Sandbox',
21 | theme: ThemeData(
22 | primarySwatch: Colors.blue,
23 | ),
24 | initialRoute: '/',
25 | routes: {
26 | '/': (BuildContext context) => MyHomePage(),
27 | '/game': (BuildContext context) => GamePage(),
28 | '/image': (BuildContext context) => ImagePage(),
29 | '/table': (BuildContext context) => TablePage(),
30 | '/jump': (BuildContext context) => JumpPage(),
31 | '/middle': (BuildContext context) => MiddlePage(),
32 | '/child_size': (BuildContext context) => ChildSizePage(),
33 | '/boundary_size': (BuildContext context) => BoundarySizePage(),
34 | '/controller': (BuildContext context) => ControllerPage(),
35 | '/rotate': (BuildContext context) => RotatePage(),
36 | '/builder': (BuildContext context) => BuilderPage(),
37 | },
38 | );
39 | }
40 | }
41 |
42 | class MyHomePage extends StatelessWidget {
43 | MyHomePage({Key key}) : super(key: key);
44 |
45 | @override
46 | Widget build(BuildContext context) {
47 | return Scaffold(
48 | appBar: AppBar(
49 | title: Text('InteractiveViewer Demos'),
50 | ),
51 | body: ListView(
52 | children: [
53 | MyListItem(
54 | route: '/builder',
55 | title: 'Builder Example',
56 | subtitle: 'Dynamically generating the visible part of a table',
57 | ),
58 | MyListItem(
59 | route: '/rotate',
60 | subtitle: 'A clearly bounded and sized rotation demo',
61 | title: 'Rotation Demo',
62 | ),
63 | MyListItem(
64 | route: '/game',
65 | subtitle: 'The original hexagon grid demo.',
66 | title: 'Game Board',
67 | ),
68 | MyListItem(
69 | route: '/image',
70 | subtitle: 'Like a photo viewer app.',
71 | title: 'Image Viewer',
72 | ),
73 | MyListItem(
74 | route: '/table',
75 | subtitle: 'Like a spreadsheet of data, scrollable in two dimensions.',
76 | title: 'Table',
77 | ),
78 | MyListItem(
79 | route: '/jump',
80 | subtitle: 'Demonstrates Sebastien\'s jump bug',
81 | title: 'Jump Bug',
82 | ),
83 | MyListItem(
84 | route: '/middle',
85 | subtitle: 'A small InteractiveViewer in the middle of the page, with boundaries bigger than the viewport.',
86 | title: 'Middle Edge Case',
87 | ),
88 | MyListItem(
89 | route: '/controller',
90 | subtitle: 'Demonstrates using the controller to reset',
91 | title: 'Controller Demo',
92 | ),
93 | MyListItem(
94 | route: '/child_size',
95 | subtitle: 'Trying out a child whose min size is bigger than viewport, but whose max size is even bigger yet.',
96 | title: 'Child Size',
97 | ),
98 | MyListItem(
99 | route: '/boundary_size',
100 | subtitle: 'A child that\'s smaller than the viewport by default.',
101 | title: 'Boundary Size',
102 | ),
103 | /*
104 | MyListItem(
105 | route: '/double_tap',
106 | subtitle: 'Double tap to zoom.',
107 | title: 'Double Tap',
108 | ),
109 | */
110 | ],
111 | ),
112 | );
113 | }
114 | }
115 |
116 | class MyListItem extends StatelessWidget {
117 | MyListItem({
118 | Key key,
119 | this.route,
120 | this.subtitle,
121 | this.title,
122 | }) : super(key: key);
123 |
124 | final String route;
125 | final String subtitle;
126 | final String title;
127 |
128 | @override
129 | Widget build(BuildContext context) {
130 | return GestureDetector(
131 | onTap: () {
132 | Navigator.of(context).pushNamed(route);
133 | },
134 | child: Card(
135 | margin: EdgeInsets.all(12.0),
136 | child: Padding(
137 | padding: EdgeInsets.all(24.0),
138 | child: ListTile(
139 | title: Text(title),
140 | subtitle: Text(subtitle),
141 | ),
142 | ),
143 | ),
144 | );
145 | }
146 | }
147 |
--------------------------------------------------------------------------------
/lib/middle/middle_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/rendering.dart';
3 |
4 | // A little IV in the middle of the page.
5 | class MiddlePage extends StatelessWidget {
6 | @override
7 | Widget build(BuildContext context) {
8 | return MaterialApp(
9 | home: Scaffold(
10 | body: Center(
11 | child: Container(
12 | color: Colors.limeAccent.withOpacity(0.4),
13 | child: InteractiveViewer(
14 | boundaryMargin: const EdgeInsets.all(10.0),
15 | minScale: 0.8,
16 | child: Container(width: 200.0, height: 200.0, color: Colors.red),
17 | ),
18 | ),
19 | ),
20 | ),
21 | );
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/lib/rotate/rotate_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/rendering.dart';
3 | import 'package:flutter/gestures.dart';
4 | import '../helpers.dart';
5 |
6 | class RotatePage extends StatefulWidget {
7 | const RotatePage({ Key key }) : super(key: key);
8 |
9 | static const String routeName = '/rotate';
10 |
11 | @override _RotatePageState createState() => _RotatePageState();
12 | }
13 |
14 | class _RotatePageState extends State {
15 | final TransformationController _transformationController = TransformationController();
16 |
17 | static List _getGridChildren(int n) {
18 | final List children = [];
19 | for (int i = 0; i < n; i++) {
20 | children.add(Container(
21 | color: Colors.teal.withOpacity((n - i) / n),
22 | ));
23 | }
24 | return children;
25 | }
26 |
27 | @override
28 | Widget build(BuildContext context) {
29 | return Scaffold(
30 | appBar: AppBar(
31 | title: const Text('Demo'),
32 | actions: [
33 | ],
34 | ),
35 | body: Center(
36 | child: Container(
37 | color: Colors.pink,
38 | width: 300,
39 | height: 300,
40 | child: ClipRect(
41 | child: GestureDetector(
42 | onTapUp: (TapUpDetails details) {
43 | final Offset sceneOffset =_transformationController.toScene(details.localPosition);
44 | print('justin tapped at viewport ${details.localPosition} and scene $sceneOffset');
45 | },
46 | child: InteractiveViewer(
47 | transformationController: _transformationController,
48 | boundaryMargin: const EdgeInsets.all(0),
49 | minScale: 0.0001,
50 | maxScale: 10000,
51 | onInteractionUpdate: (ScaleUpdateDetails details) {
52 | //print('justin onInteractionUpdate ${details.scale}');
53 | },
54 | child: Container(color: Colors.black, child: getFlex()),
55 | ),
56 | ),
57 | ),
58 | ),
59 | ),
60 | );
61 | }
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/lib/table/table_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/rendering.dart';
3 |
4 | class TablePage extends StatefulWidget {
5 | const TablePage({ Key key }) : super(key: key);
6 |
7 | static const String routeName = '/table';
8 |
9 | @override _TablePageState createState() => _TablePageState();
10 | }
11 |
12 | class _TablePageState extends State {
13 | final TransformationController _transformationController = TransformationController();
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return Scaffold(
18 | appBar: AppBar(
19 | title: const Text('MyTable'),
20 | actions: [
21 | ],
22 | ),
23 | body: Center(
24 | child: Container(
25 | width: 200.0,
26 | height: 200.0,
27 | child: GestureDetector(
28 | onTapUp: (TapUpDetails details) {
29 | final Offset position = _transformationController.toScene(
30 | details.localPosition,
31 | );
32 | print('tapup at $position');
33 | },
34 | child: InteractiveViewer(
35 | alignPanAxis: true,
36 | constrained: false,
37 | transformationController: _transformationController,
38 | scaleEnabled: false,
39 | child: _Table(rowCount: 60, columnCount: 6),
40 | ),
41 | ),
42 | ),
43 | ),
44 | );
45 | }
46 |
47 | Widget get instructionDialog {
48 | return AlertDialog(
49 | title: const Text('Bidirectional Scrolling'),
50 | content: Column(
51 | crossAxisAlignment: CrossAxisAlignment.start,
52 | mainAxisSize: MainAxisSize.min,
53 | children: const [
54 | Text('Tap to edit hex tiles, and use gestures to move around the scene:\n'),
55 | Text('- Drag to pan.'),
56 | Text('- Pinch to zoom.'),
57 | Text('- Rotate with two fingers.'),
58 | Text('\nYou can always press the home button to return to the starting orientation!'),
59 | ],
60 | ),
61 | actions: [
62 | FlatButton(
63 | child: const Text('OK'),
64 | onPressed: () {
65 | Navigator.of(context).pop();
66 | },
67 | ),
68 | ],
69 | );
70 | }
71 | }
72 |
73 | class _Table extends StatelessWidget {
74 | const _Table({
75 | this.rowCount,
76 | this.columnCount,
77 | }) : assert(rowCount != null && rowCount > 0),
78 | assert(columnCount != null && columnCount > 0);
79 |
80 | final int rowCount;
81 | final int columnCount;
82 |
83 | @override
84 | Widget build(BuildContext context) {
85 | return Table(
86 | // ignore: prefer_const_literals_to_create_immutables
87 | columnWidths: {
88 | for (int column = 0; column < columnCount; column++)
89 | column: const FixedColumnWidth(200.0),
90 | },
91 | // ignore: prefer_const_literals_to_create_immutables
92 | children: [
93 | for (int row = 0; row < rowCount; row++)
94 | // ignore: prefer_const_constructors
95 | TableRow(
96 | // ignore: prefer_const_literals_to_create_immutables
97 | children: [
98 | for (int column = 0; column < columnCount; column++)
99 | DragTarget(
100 | builder: (BuildContext context, List candidateData, List rejectedData) {
101 | return Container(
102 | height: 26,
103 | color: candidateData.isEmpty ? row % 2 + column % 2 == 1 ? Colors.white : Colors.grey.withOpacity(0.1) : Colors.blue,
104 | child: Align(
105 | alignment: Alignment.centerLeft,
106 | child: Text('$row x $column'),
107 | ),
108 | );
109 | },
110 | ),
111 | ],
112 | ),
113 | ],
114 | );
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/xcuserdata/
7 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 |
9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
10 | }
11 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 51;
7 | objects = {
8 |
9 | /* Begin PBXAggregateTarget section */
10 | 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
11 | isa = PBXAggregateTarget;
12 | buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
13 | buildPhases = (
14 | 33CC111E2044C6BF0003C045 /* ShellScript */,
15 | );
16 | dependencies = (
17 | );
18 | name = "Flutter Assemble";
19 | productName = FLX;
20 | };
21 | /* End PBXAggregateTarget section */
22 |
23 | /* Begin PBXBuildFile section */
24 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
25 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
26 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
27 | 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
28 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
29 | /* End PBXBuildFile section */
30 |
31 | /* Begin PBXContainerItemProxy section */
32 | 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
33 | isa = PBXContainerItemProxy;
34 | containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
35 | proxyType = 1;
36 | remoteGlobalIDString = 33CC111A2044C6BA0003C045;
37 | remoteInfo = FLX;
38 | };
39 | /* End PBXContainerItemProxy section */
40 |
41 | /* Begin PBXCopyFilesBuildPhase section */
42 | 33CC110E2044A8840003C045 /* Bundle Framework */ = {
43 | isa = PBXCopyFilesBuildPhase;
44 | buildActionMask = 2147483647;
45 | dstPath = "";
46 | dstSubfolderSpec = 10;
47 | files = (
48 | );
49 | name = "Bundle Framework";
50 | runOnlyForDeploymentPostprocessing = 0;
51 | };
52 | /* End PBXCopyFilesBuildPhase section */
53 |
54 | /* Begin PBXFileReference section */
55 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; };
56 | 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; };
57 | 33CC10ED2044A3C60003C045 /* interactive_viewer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "interactive_viewer.app"; sourceTree = BUILT_PRODUCTS_DIR; };
58 | 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
59 | 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; };
60 | 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
61 | 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; };
62 | 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; };
63 | 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; };
64 | 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; };
65 | 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; };
66 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; };
67 | 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; };
68 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; };
69 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; };
70 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; };
71 | /* End PBXFileReference section */
72 |
73 | /* Begin PBXFrameworksBuildPhase section */
74 | 33CC10EA2044A3C60003C045 /* Frameworks */ = {
75 | isa = PBXFrameworksBuildPhase;
76 | buildActionMask = 2147483647;
77 | files = (
78 | );
79 | runOnlyForDeploymentPostprocessing = 0;
80 | };
81 | /* End PBXFrameworksBuildPhase section */
82 |
83 | /* Begin PBXGroup section */
84 | 33BA886A226E78AF003329D5 /* Configs */ = {
85 | isa = PBXGroup;
86 | children = (
87 | 33E5194F232828860026EE4D /* AppInfo.xcconfig */,
88 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
89 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
90 | 333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
91 | );
92 | path = Configs;
93 | sourceTree = "";
94 | };
95 | 33CC10E42044A3C60003C045 = {
96 | isa = PBXGroup;
97 | children = (
98 | 33FAB671232836740065AC1E /* Runner */,
99 | 33CEB47122A05771004F2AC0 /* Flutter */,
100 | 33CC10EE2044A3C60003C045 /* Products */,
101 | D73912EC22F37F3D000D13A0 /* Frameworks */,
102 | );
103 | sourceTree = "";
104 | };
105 | 33CC10EE2044A3C60003C045 /* Products */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 33CC10ED2044A3C60003C045 /* interactive_viewer.app */,
109 | );
110 | name = Products;
111 | sourceTree = "";
112 | };
113 | 33CC11242044D66E0003C045 /* Resources */ = {
114 | isa = PBXGroup;
115 | children = (
116 | 33CC10F22044A3C60003C045 /* Assets.xcassets */,
117 | 33CC10F42044A3C60003C045 /* MainMenu.xib */,
118 | 33CC10F72044A3C60003C045 /* Info.plist */,
119 | );
120 | name = Resources;
121 | path = ..;
122 | sourceTree = "";
123 | };
124 | 33CEB47122A05771004F2AC0 /* Flutter */ = {
125 | isa = PBXGroup;
126 | children = (
127 | 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
128 | 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
129 | 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
130 | 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
131 | );
132 | path = Flutter;
133 | sourceTree = "";
134 | };
135 | 33FAB671232836740065AC1E /* Runner */ = {
136 | isa = PBXGroup;
137 | children = (
138 | 33CC10F02044A3C60003C045 /* AppDelegate.swift */,
139 | 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
140 | 33E51913231747F40026EE4D /* DebugProfile.entitlements */,
141 | 33E51914231749380026EE4D /* Release.entitlements */,
142 | 33CC11242044D66E0003C045 /* Resources */,
143 | 33BA886A226E78AF003329D5 /* Configs */,
144 | );
145 | path = Runner;
146 | sourceTree = "";
147 | };
148 | D73912EC22F37F3D000D13A0 /* Frameworks */ = {
149 | isa = PBXGroup;
150 | children = (
151 | );
152 | name = Frameworks;
153 | sourceTree = "";
154 | };
155 | /* End PBXGroup section */
156 |
157 | /* Begin PBXNativeTarget section */
158 | 33CC10EC2044A3C60003C045 /* Runner */ = {
159 | isa = PBXNativeTarget;
160 | buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
161 | buildPhases = (
162 | 33CC10E92044A3C60003C045 /* Sources */,
163 | 33CC10EA2044A3C60003C045 /* Frameworks */,
164 | 33CC10EB2044A3C60003C045 /* Resources */,
165 | 33CC110E2044A8840003C045 /* Bundle Framework */,
166 | 3399D490228B24CF009A79C7 /* ShellScript */,
167 | );
168 | buildRules = (
169 | );
170 | dependencies = (
171 | 33CC11202044C79F0003C045 /* PBXTargetDependency */,
172 | );
173 | name = Runner;
174 | productName = Runner;
175 | productReference = 33CC10ED2044A3C60003C045 /* interactive_viewer.app */;
176 | productType = "com.apple.product-type.application";
177 | };
178 | /* End PBXNativeTarget section */
179 |
180 | /* Begin PBXProject section */
181 | 33CC10E52044A3C60003C045 /* Project object */ = {
182 | isa = PBXProject;
183 | attributes = {
184 | LastSwiftUpdateCheck = 0920;
185 | LastUpgradeCheck = 0930;
186 | ORGANIZATIONNAME = "The Flutter Authors";
187 | TargetAttributes = {
188 | 33CC10EC2044A3C60003C045 = {
189 | CreatedOnToolsVersion = 9.2;
190 | LastSwiftMigration = 1100;
191 | ProvisioningStyle = Automatic;
192 | SystemCapabilities = {
193 | com.apple.Sandbox = {
194 | enabled = 1;
195 | };
196 | };
197 | };
198 | 33CC111A2044C6BA0003C045 = {
199 | CreatedOnToolsVersion = 9.2;
200 | ProvisioningStyle = Manual;
201 | };
202 | };
203 | };
204 | buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
205 | compatibilityVersion = "Xcode 8.0";
206 | developmentRegion = en;
207 | hasScannedForEncodings = 0;
208 | knownRegions = (
209 | en,
210 | Base,
211 | );
212 | mainGroup = 33CC10E42044A3C60003C045;
213 | productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
214 | projectDirPath = "";
215 | projectRoot = "";
216 | targets = (
217 | 33CC10EC2044A3C60003C045 /* Runner */,
218 | 33CC111A2044C6BA0003C045 /* Flutter Assemble */,
219 | );
220 | };
221 | /* End PBXProject section */
222 |
223 | /* Begin PBXResourcesBuildPhase section */
224 | 33CC10EB2044A3C60003C045 /* Resources */ = {
225 | isa = PBXResourcesBuildPhase;
226 | buildActionMask = 2147483647;
227 | files = (
228 | 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
229 | 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
230 | );
231 | runOnlyForDeploymentPostprocessing = 0;
232 | };
233 | /* End PBXResourcesBuildPhase section */
234 |
235 | /* Begin PBXShellScriptBuildPhase section */
236 | 3399D490228B24CF009A79C7 /* ShellScript */ = {
237 | isa = PBXShellScriptBuildPhase;
238 | buildActionMask = 2147483647;
239 | files = (
240 | );
241 | inputFileListPaths = (
242 | );
243 | inputPaths = (
244 | );
245 | outputFileListPaths = (
246 | );
247 | outputPaths = (
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | shellPath = /bin/sh;
251 | shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
252 | };
253 | 33CC111E2044C6BF0003C045 /* ShellScript */ = {
254 | isa = PBXShellScriptBuildPhase;
255 | buildActionMask = 2147483647;
256 | files = (
257 | );
258 | inputFileListPaths = (
259 | Flutter/ephemeral/FlutterInputs.xcfilelist,
260 | );
261 | inputPaths = (
262 | Flutter/ephemeral/tripwire,
263 | );
264 | outputFileListPaths = (
265 | Flutter/ephemeral/FlutterOutputs.xcfilelist,
266 | );
267 | outputPaths = (
268 | );
269 | runOnlyForDeploymentPostprocessing = 0;
270 | shellPath = /bin/sh;
271 | shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh\ntouch Flutter/ephemeral/tripwire\n";
272 | };
273 | /* End PBXShellScriptBuildPhase section */
274 |
275 | /* Begin PBXSourcesBuildPhase section */
276 | 33CC10E92044A3C60003C045 /* Sources */ = {
277 | isa = PBXSourcesBuildPhase;
278 | buildActionMask = 2147483647;
279 | files = (
280 | 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
281 | 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
282 | 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
283 | );
284 | runOnlyForDeploymentPostprocessing = 0;
285 | };
286 | /* End PBXSourcesBuildPhase section */
287 |
288 | /* Begin PBXTargetDependency section */
289 | 33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
290 | isa = PBXTargetDependency;
291 | target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
292 | targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
293 | };
294 | /* End PBXTargetDependency section */
295 |
296 | /* Begin PBXVariantGroup section */
297 | 33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
298 | isa = PBXVariantGroup;
299 | children = (
300 | 33CC10F52044A3C60003C045 /* Base */,
301 | );
302 | name = MainMenu.xib;
303 | path = Runner;
304 | sourceTree = "";
305 | };
306 | /* End PBXVariantGroup section */
307 |
308 | /* Begin XCBuildConfiguration section */
309 | 338D0CE9231458BD00FA5F75 /* Profile */ = {
310 | isa = XCBuildConfiguration;
311 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
316 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
317 | CLANG_CXX_LIBRARY = "libc++";
318 | CLANG_ENABLE_MODULES = YES;
319 | CLANG_ENABLE_OBJC_ARC = YES;
320 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
321 | CLANG_WARN_BOOL_CONVERSION = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
326 | CLANG_WARN_EMPTY_BODY = YES;
327 | CLANG_WARN_ENUM_CONVERSION = YES;
328 | CLANG_WARN_INFINITE_RECURSION = YES;
329 | CLANG_WARN_INT_CONVERSION = YES;
330 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
335 | CODE_SIGN_IDENTITY = "-";
336 | COPY_PHASE_STRIP = NO;
337 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
338 | ENABLE_NS_ASSERTIONS = NO;
339 | ENABLE_STRICT_OBJC_MSGSEND = YES;
340 | GCC_C_LANGUAGE_STANDARD = gnu11;
341 | GCC_NO_COMMON_BLOCKS = YES;
342 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
343 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
344 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
345 | GCC_WARN_UNUSED_FUNCTION = YES;
346 | GCC_WARN_UNUSED_VARIABLE = YES;
347 | MACOSX_DEPLOYMENT_TARGET = 10.11;
348 | MTL_ENABLE_DEBUG_INFO = NO;
349 | SDKROOT = macosx;
350 | SWIFT_COMPILATION_MODE = wholemodule;
351 | SWIFT_OPTIMIZATION_LEVEL = "-O";
352 | };
353 | name = Profile;
354 | };
355 | 338D0CEA231458BD00FA5F75 /* Profile */ = {
356 | isa = XCBuildConfiguration;
357 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
358 | buildSettings = {
359 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
360 | CLANG_ENABLE_MODULES = YES;
361 | CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
362 | CODE_SIGN_STYLE = Automatic;
363 | COMBINE_HIDPI_IMAGES = YES;
364 | FRAMEWORK_SEARCH_PATHS = (
365 | "$(inherited)",
366 | "$(PROJECT_DIR)/Flutter/ephemeral",
367 | );
368 | INFOPLIST_FILE = Runner/Info.plist;
369 | LD_RUNPATH_SEARCH_PATHS = (
370 | "$(inherited)",
371 | "@executable_path/../Frameworks",
372 | );
373 | PROVISIONING_PROFILE_SPECIFIER = "";
374 | SWIFT_VERSION = 5.0;
375 | };
376 | name = Profile;
377 | };
378 | 338D0CEB231458BD00FA5F75 /* Profile */ = {
379 | isa = XCBuildConfiguration;
380 | buildSettings = {
381 | CODE_SIGN_STYLE = Manual;
382 | PRODUCT_NAME = "$(TARGET_NAME)";
383 | };
384 | name = Profile;
385 | };
386 | 33CC10F92044A3C60003C045 /* Debug */ = {
387 | isa = XCBuildConfiguration;
388 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
389 | buildSettings = {
390 | ALWAYS_SEARCH_USER_PATHS = NO;
391 | CLANG_ANALYZER_NONNULL = YES;
392 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
394 | CLANG_CXX_LIBRARY = "libc++";
395 | CLANG_ENABLE_MODULES = YES;
396 | CLANG_ENABLE_OBJC_ARC = YES;
397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
398 | CLANG_WARN_BOOL_CONVERSION = YES;
399 | CLANG_WARN_CONSTANT_CONVERSION = YES;
400 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
401 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
402 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
403 | CLANG_WARN_EMPTY_BODY = YES;
404 | CLANG_WARN_ENUM_CONVERSION = YES;
405 | CLANG_WARN_INFINITE_RECURSION = YES;
406 | CLANG_WARN_INT_CONVERSION = YES;
407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
408 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
409 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
410 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
411 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
412 | CODE_SIGN_IDENTITY = "-";
413 | COPY_PHASE_STRIP = NO;
414 | DEBUG_INFORMATION_FORMAT = dwarf;
415 | ENABLE_STRICT_OBJC_MSGSEND = YES;
416 | ENABLE_TESTABILITY = YES;
417 | GCC_C_LANGUAGE_STANDARD = gnu11;
418 | GCC_DYNAMIC_NO_PIC = NO;
419 | GCC_NO_COMMON_BLOCKS = YES;
420 | GCC_OPTIMIZATION_LEVEL = 0;
421 | GCC_PREPROCESSOR_DEFINITIONS = (
422 | "DEBUG=1",
423 | "$(inherited)",
424 | );
425 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
426 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
428 | GCC_WARN_UNUSED_FUNCTION = YES;
429 | GCC_WARN_UNUSED_VARIABLE = YES;
430 | MACOSX_DEPLOYMENT_TARGET = 10.11;
431 | MTL_ENABLE_DEBUG_INFO = YES;
432 | ONLY_ACTIVE_ARCH = YES;
433 | SDKROOT = macosx;
434 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
435 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
436 | };
437 | name = Debug;
438 | };
439 | 33CC10FA2044A3C60003C045 /* Release */ = {
440 | isa = XCBuildConfiguration;
441 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
442 | buildSettings = {
443 | ALWAYS_SEARCH_USER_PATHS = NO;
444 | CLANG_ANALYZER_NONNULL = YES;
445 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
446 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
447 | CLANG_CXX_LIBRARY = "libc++";
448 | CLANG_ENABLE_MODULES = YES;
449 | CLANG_ENABLE_OBJC_ARC = YES;
450 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
451 | CLANG_WARN_BOOL_CONVERSION = YES;
452 | CLANG_WARN_CONSTANT_CONVERSION = YES;
453 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
454 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
455 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
456 | CLANG_WARN_EMPTY_BODY = YES;
457 | CLANG_WARN_ENUM_CONVERSION = YES;
458 | CLANG_WARN_INFINITE_RECURSION = YES;
459 | CLANG_WARN_INT_CONVERSION = YES;
460 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
461 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
462 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
463 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
464 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
465 | CODE_SIGN_IDENTITY = "-";
466 | COPY_PHASE_STRIP = NO;
467 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
468 | ENABLE_NS_ASSERTIONS = NO;
469 | ENABLE_STRICT_OBJC_MSGSEND = YES;
470 | GCC_C_LANGUAGE_STANDARD = gnu11;
471 | GCC_NO_COMMON_BLOCKS = YES;
472 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
473 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
474 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
475 | GCC_WARN_UNUSED_FUNCTION = YES;
476 | GCC_WARN_UNUSED_VARIABLE = YES;
477 | MACOSX_DEPLOYMENT_TARGET = 10.11;
478 | MTL_ENABLE_DEBUG_INFO = NO;
479 | SDKROOT = macosx;
480 | SWIFT_COMPILATION_MODE = wholemodule;
481 | SWIFT_OPTIMIZATION_LEVEL = "-O";
482 | };
483 | name = Release;
484 | };
485 | 33CC10FC2044A3C60003C045 /* Debug */ = {
486 | isa = XCBuildConfiguration;
487 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
488 | buildSettings = {
489 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
490 | CLANG_ENABLE_MODULES = YES;
491 | CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
492 | CODE_SIGN_STYLE = Automatic;
493 | COMBINE_HIDPI_IMAGES = YES;
494 | FRAMEWORK_SEARCH_PATHS = (
495 | "$(inherited)",
496 | "$(PROJECT_DIR)/Flutter/ephemeral",
497 | );
498 | INFOPLIST_FILE = Runner/Info.plist;
499 | LD_RUNPATH_SEARCH_PATHS = (
500 | "$(inherited)",
501 | "@executable_path/../Frameworks",
502 | );
503 | PROVISIONING_PROFILE_SPECIFIER = "";
504 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
505 | SWIFT_VERSION = 5.0;
506 | };
507 | name = Debug;
508 | };
509 | 33CC10FD2044A3C60003C045 /* Release */ = {
510 | isa = XCBuildConfiguration;
511 | baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
512 | buildSettings = {
513 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
514 | CLANG_ENABLE_MODULES = YES;
515 | CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
516 | CODE_SIGN_STYLE = Automatic;
517 | COMBINE_HIDPI_IMAGES = YES;
518 | FRAMEWORK_SEARCH_PATHS = (
519 | "$(inherited)",
520 | "$(PROJECT_DIR)/Flutter/ephemeral",
521 | );
522 | INFOPLIST_FILE = Runner/Info.plist;
523 | LD_RUNPATH_SEARCH_PATHS = (
524 | "$(inherited)",
525 | "@executable_path/../Frameworks",
526 | );
527 | PROVISIONING_PROFILE_SPECIFIER = "";
528 | SWIFT_VERSION = 5.0;
529 | };
530 | name = Release;
531 | };
532 | 33CC111C2044C6BA0003C045 /* Debug */ = {
533 | isa = XCBuildConfiguration;
534 | buildSettings = {
535 | CODE_SIGN_STYLE = Manual;
536 | PRODUCT_NAME = "$(TARGET_NAME)";
537 | };
538 | name = Debug;
539 | };
540 | 33CC111D2044C6BA0003C045 /* Release */ = {
541 | isa = XCBuildConfiguration;
542 | buildSettings = {
543 | CODE_SIGN_STYLE = Automatic;
544 | PRODUCT_NAME = "$(TARGET_NAME)";
545 | };
546 | name = Release;
547 | };
548 | /* End XCBuildConfiguration section */
549 |
550 | /* Begin XCConfigurationList section */
551 | 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
552 | isa = XCConfigurationList;
553 | buildConfigurations = (
554 | 33CC10F92044A3C60003C045 /* Debug */,
555 | 33CC10FA2044A3C60003C045 /* Release */,
556 | 338D0CE9231458BD00FA5F75 /* Profile */,
557 | );
558 | defaultConfigurationIsVisible = 0;
559 | defaultConfigurationName = Release;
560 | };
561 | 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
562 | isa = XCConfigurationList;
563 | buildConfigurations = (
564 | 33CC10FC2044A3C60003C045 /* Debug */,
565 | 33CC10FD2044A3C60003C045 /* Release */,
566 | 338D0CEA231458BD00FA5F75 /* Profile */,
567 | );
568 | defaultConfigurationIsVisible = 0;
569 | defaultConfigurationName = Release;
570 | };
571 | 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
572 | isa = XCConfigurationList;
573 | buildConfigurations = (
574 | 33CC111C2044C6BA0003C045 /* Debug */,
575 | 33CC111D2044C6BA0003C045 /* Release */,
576 | 338D0CEB231458BD00FA5F75 /* Profile */,
577 | );
578 | defaultConfigurationIsVisible = 0;
579 | defaultConfigurationName = Release;
580 | };
581 | /* End XCConfigurationList section */
582 | };
583 | rootObject = 33CC10E52044A3C60003C045 /* Project object */;
584 | }
585 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
53 |
54 |
64 |
66 |
72 |
73 |
74 |
75 |
76 |
77 |
83 |
85 |
91 |
92 |
93 |
94 |
96 |
97 |
100 |
101 |
102 |
--------------------------------------------------------------------------------
/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/macos/Runner/Base.lproj/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = interactive_viewer
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.interactiveViewer
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2020 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController.init()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.5.0-nullsafety.3"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.1.0-nullsafety.3"
18 | characters:
19 | dependency: transitive
20 | description:
21 | name: characters
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.0-nullsafety.5"
25 | charcode:
26 | dependency: transitive
27 | description:
28 | name: charcode
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.2.0-nullsafety.3"
32 | clock:
33 | dependency: transitive
34 | description:
35 | name: clock
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.0-nullsafety.3"
39 | collection:
40 | dependency: transitive
41 | description:
42 | name: collection
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "1.15.0-nullsafety.5"
46 | cupertino_icons:
47 | dependency: "direct main"
48 | description:
49 | name: cupertino_icons
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "0.1.3"
53 | fake_async:
54 | dependency: transitive
55 | description:
56 | name: fake_async
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.2.0-nullsafety.3"
60 | flutter:
61 | dependency: "direct main"
62 | description: flutter
63 | source: sdk
64 | version: "0.0.0"
65 | flutter_test:
66 | dependency: "direct dev"
67 | description: flutter
68 | source: sdk
69 | version: "0.0.0"
70 | matcher:
71 | dependency: transitive
72 | description:
73 | name: matcher
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "0.12.10-nullsafety.3"
77 | meta:
78 | dependency: transitive
79 | description:
80 | name: meta
81 | url: "https://pub.dartlang.org"
82 | source: hosted
83 | version: "1.3.0-nullsafety.6"
84 | path:
85 | dependency: transitive
86 | description:
87 | name: path
88 | url: "https://pub.dartlang.org"
89 | source: hosted
90 | version: "1.8.0-nullsafety.3"
91 | sky_engine:
92 | dependency: transitive
93 | description: flutter
94 | source: sdk
95 | version: "0.0.99"
96 | source_span:
97 | dependency: transitive
98 | description:
99 | name: source_span
100 | url: "https://pub.dartlang.org"
101 | source: hosted
102 | version: "1.8.0-nullsafety.4"
103 | stack_trace:
104 | dependency: transitive
105 | description:
106 | name: stack_trace
107 | url: "https://pub.dartlang.org"
108 | source: hosted
109 | version: "1.10.0-nullsafety.6"
110 | stream_channel:
111 | dependency: transitive
112 | description:
113 | name: stream_channel
114 | url: "https://pub.dartlang.org"
115 | source: hosted
116 | version: "2.1.0-nullsafety.3"
117 | string_scanner:
118 | dependency: transitive
119 | description:
120 | name: string_scanner
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.1.0-nullsafety.3"
124 | term_glyph:
125 | dependency: transitive
126 | description:
127 | name: term_glyph
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.2.0-nullsafety.3"
131 | test_api:
132 | dependency: transitive
133 | description:
134 | name: test_api
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "0.2.19-nullsafety.6"
138 | typed_data:
139 | dependency: transitive
140 | description:
141 | name: typed_data
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.3.0-nullsafety.5"
145 | vector_math:
146 | dependency: transitive
147 | description:
148 | name: vector_math
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "2.1.0-nullsafety.5"
152 | sdks:
153 | dart: ">=2.12.0-0.0 <3.0.0"
154 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: interactive_viewer
2 | description: A new Flutter project.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | environment:
21 | sdk: ">=2.7.0 <3.0.0"
22 |
23 | dependencies:
24 | flutter:
25 | sdk: flutter
26 |
27 |
28 | # The following adds the Cupertino Icons font to your application.
29 | # Use with the CupertinoIcons class for iOS style icons.
30 | cupertino_icons: ^0.1.3
31 |
32 | dev_dependencies:
33 | flutter_test:
34 | sdk: flutter
35 |
36 | # For information on the generic Dart part of this file, see the
37 | # following page: https://dart.dev/tools/pub/pubspec
38 |
39 | # The following section is specific to Flutter.
40 | flutter:
41 |
42 | # The following line ensures that the Material Icons font is
43 | # included with your application, so that you can use the icons in
44 | # the material Icons class.
45 | uses-material-design: true
46 |
47 | assets:
48 | - images/india_chennai_flower_market.png
49 | - images/tall.jpg
50 | - images/board1500.png
51 | - images/letter.png
52 |
53 | # An image asset can refer to one or more resolution-specific "variants", see
54 | # https://flutter.dev/assets-and-images/#resolution-aware.
55 |
56 | # For details regarding adding assets from package dependencies, see
57 | # https://flutter.dev/assets-and-images/#from-packages
58 |
59 | # To add custom fonts to your application, add a fonts section here,
60 | # in this "flutter" section. Each entry in this list should have a
61 | # "family" key with the font family name, and a "fonts" key with a
62 | # list giving the asset and other descriptors for the font. For
63 | # example:
64 | # fonts:
65 | # - family: Schyler
66 | # fonts:
67 | # - asset: fonts/Schyler-Regular.ttf
68 | # - asset: fonts/Schyler-Italic.ttf
69 | # style: italic
70 | # - family: Trajan Pro
71 | # fonts:
72 | # - asset: fonts/TrajanPro.ttf
73 | # - asset: fonts/TrajanPro_Bold.ttf
74 | # weight: 700
75 | #
76 | # For details regarding fonts from package dependencies,
77 | # see https://flutter.dev/custom-fonts/#from-packages
78 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:interactive_viewer/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/web/favicon.png
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmc/flutter-interactive-viewer-demos/ba704fe549ec2cea42239e2a0b9fd02c4c9ebd43/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | interactive_viewer
18 |
19 |
20 |
21 |
24 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "interactive_viewer",
3 | "short_name": "interactive_viewer",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------