Bump flutter_lints from 2.0.3 to 3.0.0 in /analysis_defaults (#2046)
@ -1,44 +0,0 @@
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
@ -1,9 +0,0 @@
|
||||
This is a demo version of the [Building next generation UIs in Flutter][] codelab.
|
||||
|
||||
This sample takes code from each step of the codelab linked above and turns it into
|
||||
a single application with forward and backward buttons to enable stepping through the
|
||||
steps of the codelab.
|
||||
|
||||
![Next Generation UI demo screenshot](next_gen_ui_demo.png)
|
||||
|
||||
[Building next generation UIs in Flutter]: https://codelabs.developers.google.com/codelabs/flutter-next-gen-uis
|
@ -1 +0,0 @@
|
||||
include: package:analysis_defaults/flutter.yaml
|
@ -1,13 +0,0 @@
|
||||
gradle-wrapper.jar
|
||||
/.gradle
|
||||
/captures/
|
||||
/gradlew
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
GeneratedPluginRegistrant.java
|
||||
|
||||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
@ -1,72 +0,0 @@
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||
localProperties.load(reader)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = '1'
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = '1.0'
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
namespace "com.example.next_gen_ui_demo"
|
||||
compileSdkVersion flutter.compileSdkVersion
|
||||
ndkVersion flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "com.example.next_gen_ui_demo"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdkVersion flutter.minSdkVersion
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
@ -1,33 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application
|
||||
android:label="next_gen_ui_demo"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
</manifest>
|
@ -1,6 +0,0 @@
|
||||
package com.example.next_gen_ui_demo
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
Before Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 721 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.4 KiB |
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
@ -1,7 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
@ -1,31 +0,0 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.7.10'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.3.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
tasks.register("clean", Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
@ -1,5 +0,0 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
|
@ -1,11 +0,0 @@
|
||||
include ':app'
|
||||
|
||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||
def properties = new Properties()
|
||||
|
||||
assert localPropertiesFile.exists()
|
||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
@ -1,93 +0,0 @@
|
||||
Copyright 2017 The Exo Project Authors (https://github.com/NDISCOVER/Exo-1.0)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 201 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 241 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
@ -1,16 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#define M_PI 3.14159265
|
||||
#define M_INVPI 0.31830989
|
||||
|
||||
float hash_1d(float v) {
|
||||
float u = 50.0 * sin(v * 3000.0);
|
||||
return 2.0 * fract(2.0 * u * u) - 1.0;
|
||||
}
|
||||
|
||||
float hash_2d(vec2 pos) {
|
||||
vec2 uv = 50.0 * fract(pos * M_INVPI);
|
||||
return 2.0 * fract(uv.x * uv.y * (uv.x + uv.y)) - 1.0;
|
||||
}
|
@ -1,332 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#version 460 core
|
||||
|
||||
#include "common/common.glsl"
|
||||
#include <flutter/runtime_effect.glsl>
|
||||
|
||||
#define RAY_STEPS 30
|
||||
|
||||
uniform vec2 uResolution;
|
||||
uniform vec4 uPackedData;
|
||||
float uTime = uPackedData[0];
|
||||
float uExposure = uPackedData[1];
|
||||
float uFov = uPackedData[2];
|
||||
float uRoughness = uPackedData[3];
|
||||
uniform float uMetalness;
|
||||
uniform vec3 uLightDir;
|
||||
uniform float uLightR;
|
||||
uniform vec3 uLightLumP;
|
||||
uniform vec3 uAlbedo;
|
||||
uniform float uIor;
|
||||
uniform float uLightQuadAtt;
|
||||
uniform vec3 uAmbientLight;
|
||||
uniform float uAmbientLightDepthFactor;
|
||||
uniform float uEnergy;
|
||||
|
||||
out vec4 oColor;
|
||||
|
||||
float noise_2d(vec2 pos) {
|
||||
vec2 g = floor(pos);
|
||||
float a = hash_2d(g);
|
||||
float b = hash_2d(g + vec2(1.0, 0.0));
|
||||
float c = hash_2d(g + vec2(0.0, 1.0));
|
||||
float d = hash_2d(g + vec2(1.0, 1.0));
|
||||
|
||||
vec2 fp = pos - g;
|
||||
vec2 sfp = smoothstep(vec2(0.0), vec2(1.0), fp);
|
||||
|
||||
return a + (b - a) * sfp.x + (c - a) * sfp.y +
|
||||
(a - b - c + d) * sfp.x * sfp.y;
|
||||
}
|
||||
|
||||
vec3 closest_point_on_disc(vec3 center, vec3 normal, float radius, vec3 p) {
|
||||
vec3 r = p - center;
|
||||
vec3 pr = r - dot(r, normal) * normal;
|
||||
return center + normalize(pr) * min(length(pr), radius);
|
||||
}
|
||||
|
||||
// Compute area light illuminance from: Moving Frostbite to Physically Based
|
||||
// Rendering 3.0, Siggraph 2014
|
||||
float illuminanceSphereOrDisk(float cosTheta, float sinSigmaSqr) {
|
||||
float cosThetaSqr = cosTheta * cosTheta;
|
||||
float sinTheta = sqrt(1.0 - cosThetaSqr);
|
||||
|
||||
float illuminance = 0.0;
|
||||
if (cosThetaSqr > sinSigmaSqr) {
|
||||
illuminance = M_PI * sinSigmaSqr * clamp(cosTheta, 0.0, 1.0);
|
||||
} else {
|
||||
float x = sqrt(1.0 / sinSigmaSqr - 1.0);
|
||||
float y = -x * (cosTheta / sinTheta);
|
||||
float sinThetaSqrtY = sinTheta * sqrt(1.0 - y * y);
|
||||
illuminance = (cosTheta * acos(y) - x * sinThetaSqrtY) * sinSigmaSqr +
|
||||
atan(sinThetaSqrtY / x);
|
||||
}
|
||||
|
||||
return max(illuminance, 0.0);
|
||||
}
|
||||
|
||||
float evalIlluminanceDisk(vec3 N, vec3 L, vec3 lightN, float lightRadius,
|
||||
float lightDistSqr) {
|
||||
float cosTheta = dot(N, L);
|
||||
float lightRSqr = lightRadius * lightRadius;
|
||||
|
||||
float sinSigmaSqr = lightRSqr / (lightRSqr + max(lightRSqr, lightDistSqr));
|
||||
|
||||
float illuminance = illuminanceSphereOrDisk(cosTheta, sinSigmaSqr) *
|
||||
clamp(dot(lightN, -L), 0.0, 1.0);
|
||||
|
||||
return illuminance;
|
||||
}
|
||||
|
||||
float distribution_ggx(vec3 N, vec3 H, float roughness) {
|
||||
float a = roughness * roughness;
|
||||
float a2 = a * a;
|
||||
float NdotH = max(dot(N, H), 0.0);
|
||||
float NdotH2 = NdotH * NdotH;
|
||||
|
||||
float nom = a2;
|
||||
float denom = (NdotH2 * (a2 - 1.0) + 1.0);
|
||||
denom = M_PI * denom * denom;
|
||||
|
||||
return nom / denom;
|
||||
}
|
||||
|
||||
float geometry_schlick_ggx(float NdotV, float roughness) {
|
||||
float r = (roughness + 1.0);
|
||||
float k = (r * r) / 8.0;
|
||||
|
||||
float nom = NdotV;
|
||||
float denom = NdotV * (1.0 - k) + k;
|
||||
|
||||
return nom / denom;
|
||||
}
|
||||
|
||||
float geometry_smith(vec3 N, vec3 V, float cosTheta, float roughness) {
|
||||
float NdotV = max(dot(N, V), 0.0);
|
||||
|
||||
float ggx2 = geometry_schlick_ggx(NdotV, roughness);
|
||||
float ggx1 = geometry_schlick_ggx(cosTheta, roughness);
|
||||
|
||||
return ggx1 * ggx2;
|
||||
}
|
||||
|
||||
vec3 fresnel_schlick(float cosTheta, vec3 F0) {
|
||||
return F0 + (1.0 - F0) * pow(1.0 - cosTheta, 5.0);
|
||||
}
|
||||
|
||||
vec3 brdf_eval(vec3 N, vec3 L, vec3 H, vec3 V, vec3 albedo, float roughness,
|
||||
float metalness, vec3 Li) {
|
||||
roughness = max(0.2, roughness);
|
||||
|
||||
float cosTheta = max(dot(N, L), 0.0);
|
||||
|
||||
// Diffuse color
|
||||
vec3 F0 = vec3(0.04);
|
||||
F0 = mix(F0, albedo, metalness);
|
||||
|
||||
float NDF = distribution_ggx(N, H, roughness);
|
||||
float G = geometry_smith(N, V, cosTheta, roughness);
|
||||
vec3 F = fresnel_schlick(max(dot(H, V), 0.0), F0);
|
||||
|
||||
vec3 num = NDF * G * F;
|
||||
float denom = 4.0 * max(dot(N, V), 0.0) * cosTheta;
|
||||
vec3 spec = num / max(denom, 0.001);
|
||||
|
||||
vec3 kS = F;
|
||||
vec3 kD = 1.0 - kS;
|
||||
kD *= (1.0 - metalness);
|
||||
|
||||
vec3 Lo = (kD * albedo / M_PI + spec) * Li * cosTheta;
|
||||
|
||||
return Lo;
|
||||
}
|
||||
|
||||
vec3 btdf_eval(vec3 N, vec3 L, vec3 albedo, vec3 Li) {
|
||||
vec3 Lo = albedo * Li * max(dot(N, L), 0.0);
|
||||
return Lo;
|
||||
}
|
||||
|
||||
vec2 oct_encode(vec3 d) {
|
||||
vec3 octant = sign(d);
|
||||
|
||||
// Compute l1-norm version of the direction vector
|
||||
float sum = dot(d, octant);
|
||||
vec3 octahedron = d / sum;
|
||||
|
||||
if (octahedron.z < 0.0) {
|
||||
vec3 a = abs(octahedron);
|
||||
octahedron.xy = octant.xy * (vec2(1.0) - a.yx);
|
||||
}
|
||||
|
||||
return octahedron.xy * 0.5 + 0.5;
|
||||
}
|
||||
|
||||
const mat2 octM0 = mat2(1.0, 0.0, 0.0, 1.0);
|
||||
const mat2 octM1 = mat2(0.809017, 0.587785, -0.587785, 0.809017);
|
||||
const mat2 octM2 = mat2(0.309017, 0.951057, -0.951057, 0.309017);
|
||||
const mat2 octM3 = mat2(-0.309017, 0.951057, -0.951057, -0.309017);
|
||||
|
||||
float fbm(vec2 pos) {
|
||||
float sum = 0.0;
|
||||
|
||||
sum += noise_2d(octM0 * pos);
|
||||
sum += 0.5 * noise_2d(2.0 * octM1 * pos);
|
||||
sum += 0.25 * noise_2d(4.0 * octM2 * pos);
|
||||
sum += 0.125 * noise_2d(8.0 * octM3 * pos);
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
vec2 fbm_sphere_sdf(vec3 center, float radius, vec3 pos) {
|
||||
vec3 toP = pos - center;
|
||||
radius = radius * mix(0.5, 1.0, uEnergy);
|
||||
float d = length(toP);
|
||||
vec2 uv = oct_encode(toP);
|
||||
|
||||
float amp = mix(0.1, 0.6, uEnergy);
|
||||
float dd = fbm(uv * 15.0 + uTime * vec2(1.0, -0.4)) * amp;
|
||||
|
||||
return vec2(d + dd - radius,
|
||||
mix(0.4, 1.0, float(d - (radius + 1.0 * amp) > 0.0)));
|
||||
}
|
||||
|
||||
vec2 sample_scene(vec3 pos) {
|
||||
return fbm_sphere_sdf(vec3(0.0, 0.0, -10.0), 2.0, pos);
|
||||
}
|
||||
|
||||
const float sampleScale = 1.0 / sqrt(3.0) * 0.0005;
|
||||
|
||||
vec3 sample_normal(vec3 pos) {
|
||||
|
||||
#define NORMAL_SDF_SAMPLE_COUNT 4
|
||||
vec3 normalSampleOffsets[NORMAL_SDF_SAMPLE_COUNT];
|
||||
normalSampleOffsets[0] = vec3(1.0, -1.0, -1.0);
|
||||
normalSampleOffsets[1] = vec3(-1.0, -1.0, 1.0);
|
||||
normalSampleOffsets[2] = vec3(-1.0, 1.0, -1.0);
|
||||
normalSampleOffsets[3] = vec3(1.0, 1.0, 1.0);
|
||||
|
||||
vec3 result = vec3(0.0);
|
||||
for (int i = 0; i < NORMAL_SDF_SAMPLE_COUNT; ++i) {
|
||||
result += normalSampleOffsets[i] * sampleScale *
|
||||
sample_scene(pos + normalSampleOffsets[i]).x;
|
||||
}
|
||||
|
||||
return normalize(result);
|
||||
}
|
||||
|
||||
float raymarch(vec3 start, vec3 dir) {
|
||||
float tMin = 8.0;
|
||||
float tMax = 15.0;
|
||||
|
||||
float t = tMin;
|
||||
|
||||
float result = -1.0;
|
||||
|
||||
for (int i = 0; i < RAY_STEPS; ++i) {
|
||||
if (t >= tMax)
|
||||
break;
|
||||
vec2 d = sample_scene(start + dir * t);
|
||||
if (d.x < 0.0002) {
|
||||
result = t;
|
||||
break;
|
||||
}
|
||||
t += d.x * d.y;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void look_at(out mat3 cam, in vec3 eye, in vec3 center, in vec3 up) {
|
||||
// Construct an ortho-normal basis for the camera
|
||||
vec3 forward = normalize(center - eye);
|
||||
vec3 right = cross(forward, up);
|
||||
up = cross(right, forward);
|
||||
|
||||
cam = mat3(right, up, forward);
|
||||
}
|
||||
|
||||
void sample_camera_ray(out vec3 origin, out vec3 direction, in mat3 cam,
|
||||
vec3 eye, vec2 uv) {
|
||||
|
||||
uv *= 2.0;
|
||||
uv -= 1.0;
|
||||
uv.y *= -1.0;
|
||||
|
||||
float aspectRatio = uResolution.y / uResolution.x;
|
||||
float vWidth = tan(uFov / 2.0);
|
||||
float vHeight = vWidth * aspectRatio;
|
||||
|
||||
vec3 forward = cam * vec3(0.0, 0.0, 1.0);
|
||||
vec3 rayDir = cam * vec3(uv.x * vWidth, uv.y * vHeight, 1.0);
|
||||
|
||||
origin = eye;
|
||||
direction = normalize(rayDir);
|
||||
}
|
||||
|
||||
vec3 sample_disk_light(out vec3 L, vec3 P, vec3 N, vec3 lightP, vec3 lightN,
|
||||
float lightR, vec3 lightAtt, vec3 lightLumP) {
|
||||
vec3 toL = closest_point_on_disc(lightP, lightN, lightR, P) - P;
|
||||
L = normalize(toL);
|
||||
toL *= lightAtt.x;
|
||||
float illuminance = evalIlluminanceDisk(N, L, lightN, lightR, dot(toL, toL));
|
||||
vec3 Li = lightLumP * illuminance;
|
||||
return Li;
|
||||
}
|
||||
|
||||
vec4 pixel_color(vec3 o, vec3 d, vec3 lightP, vec3 lightN, float lightR,
|
||||
vec3 lightAtt, vec3 lightLumP) {
|
||||
float t = raymarch(o, d);
|
||||
|
||||
vec4 result = vec4(0.0);
|
||||
|
||||
if (t >= 0.0) {
|
||||
vec3 P = o + d * t;
|
||||
vec3 N = sample_normal(P);
|
||||
vec3 V = -d;
|
||||
vec3 R = refract(-V, N, uIor);
|
||||
|
||||
float z = dot(vec3(0.0, 0.0, -1.0), P);
|
||||
float zd = smoothstep(mix(0.0, 11.0, uAmbientLightDepthFactor), 14.0, z);
|
||||
vec3 Lo = vec3(0.0);
|
||||
vec3 L, Li;
|
||||
|
||||
vec3 S = fresnel_schlick(max(dot(N, V), 0.0), vec3(0.02));
|
||||
|
||||
Li =
|
||||
sample_disk_light(L, P, R, lightP, lightN, lightR, lightAtt, lightLumP);
|
||||
Lo += (1.0 - S) * brdf_eval(-N, L, normalize(L + R), R, uAlbedo, uRoughness,
|
||||
uMetalness, Li);
|
||||
|
||||
Lo += zd * uAlbedo * uAmbientLight;
|
||||
|
||||
result = vec4(Lo, 1.0);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 uv = vec2(FlutterFragCoord().xy) / uResolution;
|
||||
|
||||
vec3 lightN = normalize(-uLightDir);
|
||||
vec3 lightP = vec3(0.0, 0.0, -10.0) + uLightDir;
|
||||
vec3 lightAtt = vec3(uLightQuadAtt, 0.0, 1.0);
|
||||
|
||||
vec3 eye = vec3(0.0, 0.0, 1.0);
|
||||
vec3 center = vec3(0.0, 0.0, 0.0);
|
||||
vec3 up = vec3(0.0, 1.0, 0.0);
|
||||
|
||||
mat3 cam;
|
||||
look_at(cam, eye, center, up);
|
||||
vec3 o, d;
|
||||
|
||||
sample_camera_ray(o, d, cam, eye, uv);
|
||||
vec4 hdrColor =
|
||||
abs(pixel_color(o, d, lightP, lightN, uLightR, lightAtt, uLightLumP));
|
||||
|
||||
vec3 ldrColor = vec3(1.0) - exp(min(-(hdrColor.rgb) * uExposure, 0.0));
|
||||
oColor = vec4(ldrColor, hdrColor.a);
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#version 460 core
|
||||
|
||||
#include "common/common.glsl"
|
||||
#include <flutter/runtime_effect.glsl>
|
||||
|
||||
uniform vec2 uResolution;
|
||||
uniform float uTime;
|
||||
uniform sampler2D uTex;
|
||||
|
||||
out vec4 oColor;
|
||||
|
||||
float cubicPulse(float c, float w, float x) {
|
||||
x = abs(x - c);
|
||||
if (x > w)
|
||||
return 0.0;
|
||||
x /= w;
|
||||
return 1.0 - x*x*(3.0 - 2.0*x);
|
||||
}
|
||||
|
||||
float twoSin(float x) {
|
||||
x = 6.49*x - 0.65;
|
||||
float t = -0.7*sin(6.8*x) + 1.4*sin(2.9*x);
|
||||
t = t/4.1 + 0.5;
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
void main() {
|
||||
|
||||
vec2 uv = vec2(FlutterFragCoord().xy) / uResolution;
|
||||
|
||||
float t_2 = cubicPulse(.5, .05, fract(uTime / 4.0));
|
||||
float t_1 = twoSin(fract(uTime / 5.0));
|
||||
float glitchScale = mix(0.0, 8.0, t_1 + t_2);
|
||||
float aberrationSize = mix(0.0, 5.0, t_1 + t_2);
|
||||
|
||||
float h = hash_1d(uv.y);
|
||||
float hs = sign(h);
|
||||
h = max(h, 0.0);
|
||||
h = h * h;
|
||||
h = round(h) * hs;
|
||||
|
||||
uv += vec2(h * glitchScale, 0.0) / uResolution;
|
||||
|
||||
vec2 redOffset = vec2(aberrationSize, 0.0) / uResolution;
|
||||
vec2 greenOffset = vec2(0.0, 0.0) / uResolution;
|
||||
vec2 blueOffset = vec2(-aberrationSize, 0.0) / uResolution;
|
||||
|
||||
vec2 redUv = uv + redOffset;
|
||||
vec2 greenUv = uv + greenOffset;
|
||||
vec2 blueUv = uv + blueOffset;
|
||||
|
||||
vec2 ra = texture(uTex, redUv).ra;
|
||||
vec2 ga = texture(uTex, greenUv).ga;
|
||||
vec2 ba = texture(uTex, blueUv).ba;
|
||||
|
||||
// Convert from pre-multiplied alpha
|
||||
ra.x /= ra.y;
|
||||
ga.x /= ga.y;
|
||||
ba.x /= ba.y;
|
||||
|
||||
float alpha = max(ra.y, max(ga.y, ba.y));
|
||||
oColor = vec4(ra.x, ga.x, ba.x, 1.0) * alpha;
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
**/dgph
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.moved-aside
|
||||
*.pbxuser
|
||||
*.perspectivev3
|
||||
**/*sync/
|
||||
.sconsign.dblite
|
||||
.tags*
|
||||
**/.vagrant/
|
||||
**/DerivedData/
|
||||
Icon?
|
||||
**/Pods/
|
||||
**/.symlinks/
|
||||
profile
|
||||
xcuserdata
|
||||
**/.generated/
|
||||
Flutter/App.framework
|
||||
Flutter/Flutter.framework
|
||||
Flutter/Flutter.podspec
|
||||
Flutter/Generated.xcconfig
|
||||
Flutter/ephemeral/
|
||||
Flutter/app.flx
|
||||
Flutter/app.zip
|
||||
Flutter/flutter_assets/
|
||||
Flutter/flutter_export_environment.sh
|
||||
ServiceDefinitions.json
|
||||
Runner/GeneratedPluginRegistrant.*
|
||||
|
||||
# Exceptions to above rules.
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.pbxuser
|
||||
!default.perspectivev3
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>11.0</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,2 +0,0 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
@ -1,2 +0,0 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
@ -1,44 +0,0 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '11.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
project 'Runner', {
|
||||
'Debug' => :debug,
|
||||
'Profile' => :release,
|
||||
'Release' => :release,
|
||||
}
|
||||
|
||||
def flutter_root
|
||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
||||
unless File.exist?(generated_xcode_build_settings_path)
|
||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
||||
end
|
||||
|
||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||
return matches[1].strip if matches
|
||||
end
|
||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
||||
end
|
||||
|
||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||
|
||||
flutter_ios_podfile_setup
|
||||
|
||||
target 'Runner' do
|
||||
use_frameworks!
|
||||
use_modular_headers!
|
||||
|
||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||
target 'RunnerTests' do
|
||||
inherit! :search_paths
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
flutter_additional_ios_build_settings(target)
|
||||
end
|
||||
end
|
@ -1,613 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
|
||||
remoteInfo = Runner;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */,
|
||||
);
|
||||
path = RunnerTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
331C8082294A63A400263BE5 /* RunnerTests */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
331C8080294A63A400263BE5 /* RunnerTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||
buildPhases = (
|
||||
331C807D294A63A400263BE5 /* Sources */,
|
||||
331C807E294A63A400263BE5 /* Frameworks */,
|
||||
331C807F294A63A400263BE5 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
331C8086294A63A400263BE5 /* PBXTargetDependency */,
|
||||
);
|
||||
name = RunnerTests;
|
||||
productName = RunnerTests;
|
||||
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1300;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
331C8080294A63A400263BE5 = {
|
||||
CreatedOnToolsVersion = 14.0;
|
||||
TestTargetID = 97C146ED1CF9000F007C117D;
|
||||
};
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
331C8080294A63A400263BE5 /* RunnerTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
331C807F294A63A400263BE5 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
331C807D294A63A400263BE5 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 97C146ED1CF9000F007C117D /* Runner */;
|
||||
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C146FB1CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.nextGenUiDemo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
331C8088294A63A400263BE5 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.nextGenUiDemo.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
331C8089294A63A400263BE5 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.nextGenUiDemo.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
331C808A294A63A400263BE5 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.nextGenUiDemo.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
97C147061CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.nextGenUiDemo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147071CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.nextGenUiDemo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
331C8088294A63A400263BE5 /* Debug */,
|
||||
331C8089294A63A400263BE5 /* Release */,
|
||||
331C808A294A63A400263BE5 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147031CF9000F007C117D /* Debug */,
|
||||
97C147041CF9000F007C117D /* Release */,
|
||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147061CF9000F007C117D /* Debug */,
|
||||
97C147071CF9000F007C117D /* Release */,
|
||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,98 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1300"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO"
|
||||
parallelizable = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "331C8080294A63A400263BE5"
|
||||
BuildableName = "RunnerTests.xctest"
|
||||
BlueprintName = "RunnerTests"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
@ -1,13 +0,0 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
}
|
@ -1,122 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 450 B |
Before Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 704 B |
Before Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 586 B |
Before Width: | Height: | Size: 862 B |
Before Width: | Height: | Size: 862 B |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 762 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.4 KiB |
@ -1,23 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B |
@ -1,5 +0,0 @@
|
||||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
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.
|
@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
</resources>
|
||||
</document>
|
@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Next Gen UI Demo</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>next_gen_ui_demo</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>FLTEnableImpeller</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
@ -1 +0,0 @@
|
||||
#import "GeneratedPluginRegistrant.h"
|
@ -1,12 +0,0 @@
|
||||
import Flutter
|
||||
import UIKit
|
||||
import XCTest
|
||||
|
||||
class RunnerTests: XCTestCase {
|
||||
|
||||
func testExample() {
|
||||
// If you add code to the Runner application, consider adding tests here.
|
||||
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||
}
|
||||
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
class AssetPaths {
|
||||
/// Images
|
||||
static const String _images = 'assets/images';
|
||||
|
||||
static const String titleBgBase = '$_images/bg-base.jpg';
|
||||
static const String titleBgReceive = '$_images/bg-light-receive.png';
|
||||
static const String titleFgEmit = '$_images/fg-light-emit.png';
|
||||
static const String titleFgReceive = '$_images/fg-light-receive.png';
|
||||
static const String titleFgBase = '$_images/fg-base.png';
|
||||
static const String titleMgEmit = '$_images/mg-light-emit.png';
|
||||
static const String titleMgReceive = '$_images/mg-light-receive.png';
|
||||
static const String titleMgBase = '$_images/mg-base.png';
|
||||
static const String titleStartBtn = '$_images/button-start.png';
|
||||
static const String titleStartBtnHover = '$_images/button-start-hover.png';
|
||||
static const String titleStartArrow = '$_images/button-start-arrow.png';
|
||||
static const String titleSelectedLeft = '$_images/select-left.png';
|
||||
static const String titleSelectedRight = '$_images/select-right.png';
|
||||
static const String pulseParticle = '$_images/particle3.png';
|
||||
|
||||
/// Shaders
|
||||
static const String _shaders = 'assets/shaders';
|
||||
static const String orbShader = '$_shaders/orb_shader.frag';
|
||||
static const String uiShader = '$_shaders/ui_glitch.frag';
|
||||
}
|
||||
|
||||
typedef Shaders = ({ui.FragmentShader orb, ui.FragmentShader ui});
|
||||
|
||||
Future<Shaders> loadShaders() async => (
|
||||
orb: (await _loadShader(AssetPaths.orbShader)),
|
||||
ui: (await _loadShader(AssetPaths.uiShader)),
|
||||
);
|
||||
|
||||
Future<ui.FragmentShader> _loadShader(String path) async {
|
||||
return (await ui.FragmentProgram.fromAsset(path)).fragmentShader();
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'ticking_builder.dart';
|
||||
|
||||
typedef ReactiveWidgetBuilder = Widget Function(
|
||||
BuildContext context, double time, Size bounds);
|
||||
|
||||
/// ReactiveWidget forces repainting a subtree on
|
||||
/// each frame for ambient animation.
|
||||
class ReactiveWidget extends StatefulWidget {
|
||||
const ReactiveWidget({
|
||||
super.key,
|
||||
required this.builder,
|
||||
});
|
||||
final ReactiveWidgetBuilder builder;
|
||||
@override
|
||||
State<ReactiveWidget> createState() => _ReactiveWidgetState();
|
||||
}
|
||||
|
||||
class _ReactiveWidgetState extends State<ReactiveWidget> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TickingBuilder(
|
||||
builder: (_, time) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return widget.builder(context, time, constraints.biggest);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
@ -1,368 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
|
||||
/**
|
||||
* This is an unfinished, pre-release effect for Flutter Animate:
|
||||
* https://pub.dev/packages/flutter_animate
|
||||
*
|
||||
* It includes a copy of `AnimatedSampler` from Flutter Shaders:
|
||||
* https://github.com/jonahwilliams/flutter_shaders
|
||||
*
|
||||
* Once `AnimatedSampler` (or equivalent) is stable, or included in the core
|
||||
* SDK, this effect will be updated, tested, refined, and added to the
|
||||
* effects.dart file.
|
||||
*/
|
||||
|
||||
// TODO: document.
|
||||
|
||||
/// An effect that lets you apply an animated fragment shader to a target.
|
||||
@immutable
|
||||
class ShaderEffect extends Effect<double> {
|
||||
const ShaderEffect({
|
||||
super.delay,
|
||||
super.duration,
|
||||
super.curve,
|
||||
this.shader,
|
||||
this.update,
|
||||
ShaderLayer? layer,
|
||||
}) : layer = layer ?? ShaderLayer.replace,
|
||||
super(
|
||||
begin: 0,
|
||||
end: 1,
|
||||
);
|
||||
|
||||
final ui.FragmentShader? shader;
|
||||
final ShaderUpdateCallback? update;
|
||||
final ShaderLayer layer;
|
||||
|
||||
@override
|
||||
Widget build(
|
||||
BuildContext context,
|
||||
Widget child,
|
||||
AnimationController controller,
|
||||
EffectEntry entry,
|
||||
) {
|
||||
double ratio = 1 / MediaQuery.of(context).devicePixelRatio;
|
||||
Animation<double> animation = buildAnimation(controller, entry);
|
||||
return getOptimizedBuilder<double>(
|
||||
animation: animation,
|
||||
builder: (_, __) {
|
||||
return AnimatedSampler(
|
||||
(image, size, canvas) {
|
||||
EdgeInsets? insets;
|
||||
if (update != null) {
|
||||
insets = update!(shader!, animation.value, size, image);
|
||||
}
|
||||
Rect rect = Rect.fromLTWH(0, 0, size.width, size.height);
|
||||
rect = insets?.inflateRect(rect) ?? rect;
|
||||
|
||||
void drawImage() {
|
||||
canvas.save();
|
||||
canvas.scale(ratio, ratio);
|
||||
canvas.drawImage(image, Offset.zero, Paint());
|
||||
canvas.restore();
|
||||
}
|
||||
|
||||
if (layer == ShaderLayer.foreground) drawImage();
|
||||
if (shader != null) canvas.drawRect(rect, Paint()..shader = shader);
|
||||
if (layer == ShaderLayer.background) drawImage();
|
||||
},
|
||||
enabled: shader != null,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
extension ShaderEffectExtensions<T> on AnimateManager<T> {
|
||||
/// Adds a [shader] extension to [AnimateManager] ([Animate] and [AnimateList]).
|
||||
T shader({
|
||||
Duration? delay,
|
||||
Duration? duration,
|
||||
Curve? curve,
|
||||
ui.FragmentShader? shader,
|
||||
ShaderUpdateCallback? update,
|
||||
ShaderLayer? layer,
|
||||
}) =>
|
||||
addEffect(ShaderEffect(
|
||||
delay: delay,
|
||||
duration: duration,
|
||||
curve: curve,
|
||||
shader: shader,
|
||||
update: update,
|
||||
layer: layer,
|
||||
));
|
||||
}
|
||||
|
||||
enum ShaderLayer { foreground, background, replace }
|
||||
|
||||
/// Function signature for [ShaderEffect] update handlers.
|
||||
typedef ShaderUpdateCallback = EdgeInsets? Function(
|
||||
ui.FragmentShader shader, double value, Size size, ui.Image image);
|
||||
|
||||
/******************************************************************************/
|
||||
// TODO: add this as a dependency instead of copying it in once it is stable:
|
||||
// https://github.com/jonahwilliams/flutter_shaders
|
||||
|
||||
// Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
/// A callback for the [AnimatedSamplerBuilder] widget.
|
||||
typedef AnimatedSamplerBuilder = void Function(
|
||||
ui.Image image,
|
||||
Size size,
|
||||
ui.Canvas canvas,
|
||||
);
|
||||
|
||||
/// A widget that allows access to a snapshot of the child widgets for painting
|
||||
/// with a sampler applied to a [FragmentProgram].
|
||||
///
|
||||
/// When [enabled] is true, the child widgets will be painted into a texture
|
||||
/// exposed as a [ui.Image]. This can then be passed to a [FragmentShader]
|
||||
/// instance via [FragmentShader.setSampler].
|
||||
///
|
||||
/// If [enabled] is false, then the child widgets are painted as normal.
|
||||
///
|
||||
/// Caveats:
|
||||
/// * Platform views cannot be captured in a texture. If any are present they
|
||||
/// will be excluded from the texture. Texture-based platform views are OK.
|
||||
///
|
||||
/// Example:
|
||||
///
|
||||
/// Providing an image to a fragment shader using
|
||||
/// [FragmentShader.setImageSampler].
|
||||
///
|
||||
/// ```dart
|
||||
/// Widget build(BuildContext context) {
|
||||
/// return AnimatedSampler(
|
||||
/// (ui.Image image, Size size, Canvas canvas) {
|
||||
/// shader
|
||||
/// ..setFloat(0, size.width)
|
||||
/// ..setFloat(1, size.height)
|
||||
/// ..setImageSampler(0, image);
|
||||
/// canvas.drawRect(Offset.zero & size, Paint()..shader = shader);
|
||||
/// },
|
||||
/// child: widget.child,
|
||||
/// );
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// See also:
|
||||
/// * [SnapshotWidget], which provides a similar API for the purpose of
|
||||
/// caching during expensive animations.
|
||||
class AnimatedSampler extends StatelessWidget {
|
||||
/// Create a new [AnimatedSampler].
|
||||
const AnimatedSampler(
|
||||
this.builder, {
|
||||
required this.child,
|
||||
super.key,
|
||||
this.enabled = true,
|
||||
});
|
||||
|
||||
/// A callback used by this widget to provide the children captured in
|
||||
/// a texture.
|
||||
final AnimatedSamplerBuilder builder;
|
||||
|
||||
/// Whether the children should be captured in a texture or displayed as
|
||||
/// normal.
|
||||
final bool enabled;
|
||||
|
||||
/// The child widget.
|
||||
final Widget child;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return _ShaderSamplerBuilder(
|
||||
builder,
|
||||
enabled: enabled,
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _ShaderSamplerBuilder extends SingleChildRenderObjectWidget {
|
||||
const _ShaderSamplerBuilder(
|
||||
this.builder, {
|
||||
super.child,
|
||||
required this.enabled,
|
||||
});
|
||||
|
||||
final AnimatedSamplerBuilder builder;
|
||||
final bool enabled;
|
||||
|
||||
@override
|
||||
RenderObject createRenderObject(BuildContext context) {
|
||||
return _RenderShaderSamplerBuilderWidget(
|
||||
devicePixelRatio: MediaQuery.of(context).devicePixelRatio,
|
||||
builder: builder,
|
||||
enabled: enabled,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void updateRenderObject(
|
||||
BuildContext context, covariant RenderObject renderObject) {
|
||||
(renderObject as _RenderShaderSamplerBuilderWidget)
|
||||
..devicePixelRatio = MediaQuery.of(context).devicePixelRatio
|
||||
..builder = builder
|
||||
..enabled = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
// A render object that conditionally converts its child into a [ui.Image]
|
||||
// and then paints it in place of the child.
|
||||
class _RenderShaderSamplerBuilderWidget extends RenderProxyBox {
|
||||
// Create a new [_RenderSnapshotWidget].
|
||||
_RenderShaderSamplerBuilderWidget({
|
||||
required double devicePixelRatio,
|
||||
required AnimatedSamplerBuilder builder,
|
||||
required bool enabled,
|
||||
}) : _devicePixelRatio = devicePixelRatio,
|
||||
_builder = builder,
|
||||
_enabled = enabled;
|
||||
|
||||
@override
|
||||
OffsetLayer updateCompositedLayer(
|
||||
{required covariant _ShaderSamplerBuilderLayer? oldLayer}) {
|
||||
final _ShaderSamplerBuilderLayer layer =
|
||||
oldLayer ?? _ShaderSamplerBuilderLayer(builder);
|
||||
layer
|
||||
..callback = builder
|
||||
..size = size
|
||||
..devicePixelRatio = devicePixelRatio;
|
||||
return layer;
|
||||
}
|
||||
|
||||
/// The device pixel ratio used to create the child image.
|
||||
double get devicePixelRatio => _devicePixelRatio;
|
||||
double _devicePixelRatio;
|
||||
set devicePixelRatio(double value) {
|
||||
if (value == devicePixelRatio) {
|
||||
return;
|
||||
}
|
||||
_devicePixelRatio = value;
|
||||
markNeedsCompositedLayerUpdate();
|
||||
}
|
||||
|
||||
/// The painter used to paint the child snapshot or child widgets.
|
||||
AnimatedSamplerBuilder get builder => _builder;
|
||||
AnimatedSamplerBuilder _builder;
|
||||
set builder(AnimatedSamplerBuilder value) {
|
||||
if (value == builder) {
|
||||
return;
|
||||
}
|
||||
_builder = value;
|
||||
markNeedsCompositedLayerUpdate();
|
||||
}
|
||||
|
||||
bool get enabled => _enabled;
|
||||
bool _enabled;
|
||||
set enabled(bool value) {
|
||||
if (value == enabled) {
|
||||
return;
|
||||
}
|
||||
_enabled = value;
|
||||
markNeedsPaint();
|
||||
markNeedsCompositingBitsUpdate();
|
||||
}
|
||||
|
||||
@override
|
||||
bool get isRepaintBoundary => alwaysNeedsCompositing;
|
||||
|
||||
@override
|
||||
bool get alwaysNeedsCompositing => enabled;
|
||||
|
||||
@override
|
||||
void paint(PaintingContext context, Offset offset) {
|
||||
if (size.isEmpty) {
|
||||
return;
|
||||
}
|
||||
assert(!_enabled || offset == Offset.zero);
|
||||
return super.paint(context, offset);
|
||||
}
|
||||
}
|
||||
|
||||
/// A [Layer] that uses an [AnimatedSamplerBuilder] to create a [ui.Picture]
|
||||
/// every time it is added to a scene.
|
||||
class _ShaderSamplerBuilderLayer extends OffsetLayer {
|
||||
_ShaderSamplerBuilderLayer(this._callback);
|
||||
|
||||
ui.Picture? _lastPicture;
|
||||
|
||||
Size get size => _size;
|
||||
Size _size = Size.zero;
|
||||
set size(Size value) {
|
||||
if (value == size) {
|
||||
return;
|
||||
}
|
||||
_size = value;
|
||||
markNeedsAddToScene();
|
||||
}
|
||||
|
||||
double get devicePixelRatio => _devicePixelRatio;
|
||||
double _devicePixelRatio = 1.0;
|
||||
set devicePixelRatio(double value) {
|
||||
if (value == devicePixelRatio) {
|
||||
return;
|
||||
}
|
||||
_devicePixelRatio = value;
|
||||
markNeedsAddToScene();
|
||||
}
|
||||
|
||||
AnimatedSamplerBuilder get callback => _callback;
|
||||
AnimatedSamplerBuilder _callback;
|
||||
set callback(AnimatedSamplerBuilder value) {
|
||||
if (value == callback) {
|
||||
return;
|
||||
}
|
||||
_callback = value;
|
||||
markNeedsAddToScene();
|
||||
}
|
||||
|
||||
ui.Image _buildChildScene(Rect bounds, double pixelRatio) {
|
||||
final ui.SceneBuilder builder = ui.SceneBuilder();
|
||||
final Matrix4 transform =
|
||||
Matrix4.diagonal3Values(pixelRatio, pixelRatio, 1);
|
||||
builder.pushTransform(transform.storage);
|
||||
addChildrenToScene(builder);
|
||||
builder.pop();
|
||||
return builder.build().toImageSync(
|
||||
(pixelRatio * bounds.width).ceil(),
|
||||
(pixelRatio * bounds.height).ceil(),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void addToScene(ui.SceneBuilder builder) {
|
||||
if (size.isEmpty) return;
|
||||
final ui.Image image = _buildChildScene(
|
||||
offset & size,
|
||||
devicePixelRatio,
|
||||
);
|
||||
final ui.PictureRecorder pictureRecorder = ui.PictureRecorder();
|
||||
final Canvas canvas = Canvas(pictureRecorder);
|
||||
try {
|
||||
callback(image, size, canvas);
|
||||
} finally {
|
||||
image.dispose();
|
||||
}
|
||||
_lastPicture?.dispose();
|
||||
_lastPicture = pictureRecorder.endRecording();
|
||||
builder.addPicture(offset, _lastPicture!);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_lastPicture?.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ShaderPainter extends CustomPainter {
|
||||
ShaderPainter(this.shader, {this.update});
|
||||
|
||||
final ui.FragmentShader shader;
|
||||
final void Function(ui.FragmentShader, Size)? update;
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
update?.call(shader, size);
|
||||
canvas.drawRect(
|
||||
Rect.fromLTWH(0, 0, size.width, size.height),
|
||||
Paint()..shader = shader,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool shouldRepaint(covariant ShaderPainter oldDelegate) {
|
||||
return oldDelegate.shader != shader || oldDelegate.update != update;
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
|
||||
/// TickingBuilder is for ambient animation to be run
|
||||
/// on each frame.
|
||||
class TickingBuilder extends StatefulWidget {
|
||||
const TickingBuilder({super.key, required this.builder});
|
||||
final Widget Function(BuildContext context, double time) builder;
|
||||
@override
|
||||
State<TickingBuilder> createState() => _TickingBuilderState();
|
||||
}
|
||||
|
||||
class _TickingBuilderState extends State<TickingBuilder>
|
||||
with SingleTickerProviderStateMixin {
|
||||
late final Ticker _ticker;
|
||||
double _time = 0.0;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_ticker = createTicker(_handleTick)..start();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_ticker.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _handleTick(Duration elapsed) {
|
||||
setState(() => _time = elapsed.inMilliseconds.toDouble() / 1000.0);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => widget.builder.call(context, _time);
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class UiScaler extends StatelessWidget {
|
||||
const UiScaler({
|
||||
super.key,
|
||||
required this.child,
|
||||
required this.alignment,
|
||||
this.referenceHeight = 1080,
|
||||
});
|
||||
|
||||
final int referenceHeight;
|
||||
final Widget child;
|
||||
final Alignment alignment;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final screenSize = MediaQuery.of(context).size;
|
||||
final double scale = min(screenSize.height / referenceHeight, 1.0);
|
||||
return Transform.scale(
|
||||
scale: scale,
|
||||
alignment: alignment,
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
@ -1,166 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:window_size/window_size.dart';
|
||||
|
||||
import 'assets.dart';
|
||||
import 'title_screen/title_screen.dart';
|
||||
import 'title_screen_1a/title_screen.dart' as title_screen_1a;
|
||||
import 'title_screen_1b/title_screen.dart' as title_screen_1b;
|
||||
import 'title_screen_2a/title_screen.dart' as title_screen_2a;
|
||||
import 'title_screen_2c/title_screen.dart' as title_screen_2c;
|
||||
import 'title_screen_3a/title_screen.dart' as title_screen_3a;
|
||||
import 'title_screen_3b/title_screen.dart' as title_screen_3b;
|
||||
import 'title_screen_3c/title_screen.dart' as title_screen_3c;
|
||||
import 'title_screen_4a/title_screen.dart' as title_screen_4a;
|
||||
import 'title_screen_4b/title_screen.dart' as title_screen_4b;
|
||||
import 'title_screen_4c/title_screen.dart' as title_screen_4c;
|
||||
import 'title_screen_4d/title_screen.dart' as title_screen_4d;
|
||||
import 'title_screen_4e/title_screen.dart' as title_screen_4e;
|
||||
import 'title_screen_5a/title_screen.dart' as title_screen_5a;
|
||||
import 'title_screen_5b/title_screen.dart' as title_screen_5b;
|
||||
import 'title_screen_6/title_screen.dart' as title_screen_6;
|
||||
|
||||
void main() {
|
||||
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
setWindowMinSize(const Size(800, 500));
|
||||
}
|
||||
Animate.restartOnHotReload = true;
|
||||
runApp(
|
||||
FutureProvider<Shaders?>(
|
||||
create: (context) => loadShaders(),
|
||||
initialData: null,
|
||||
child: const NextGenApp(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class NextGenApp extends StatefulWidget {
|
||||
const NextGenApp({super.key});
|
||||
|
||||
@override
|
||||
State<NextGenApp> createState() => _NextGenAppState();
|
||||
}
|
||||
|
||||
List<
|
||||
TitleScreenBase Function(
|
||||
{required void Function(Color) callback, Key? key})> steps = [
|
||||
title_screen_1a.TitleScreen.new,
|
||||
title_screen_1b.TitleScreen.new,
|
||||
title_screen_2a.TitleScreen.new,
|
||||
title_screen_2c.TitleScreen.new,
|
||||
title_screen_3a.TitleScreen.new,
|
||||
title_screen_3b.TitleScreen.new,
|
||||
title_screen_3c.TitleScreen.new,
|
||||
title_screen_4a.TitleScreen.new,
|
||||
title_screen_4b.TitleScreen.new,
|
||||
title_screen_4c.TitleScreen.new,
|
||||
title_screen_4d.TitleScreen.new,
|
||||
title_screen_4e.TitleScreen.new,
|
||||
title_screen_5a.TitleScreen.new,
|
||||
title_screen_5b.TitleScreen.new,
|
||||
title_screen_6.TitleScreen.new,
|
||||
];
|
||||
|
||||
typedef ColorCallback = void Function(Color colorSchemeSeed);
|
||||
|
||||
class _NextGenAppState extends State<NextGenApp> {
|
||||
int _step = 0;
|
||||
int get step => _step;
|
||||
set step(int i) {
|
||||
_step = switch (i) {
|
||||
(int a) when a < 0 => 0,
|
||||
(int a) when a >= steps.length => steps.length - 1,
|
||||
_ => i,
|
||||
};
|
||||
debugPrint('Step ${step + 1} of ${steps.length}');
|
||||
}
|
||||
|
||||
Color? colorSchemeSeed;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
themeMode: ThemeMode.dark,
|
||||
darkTheme: ThemeData(
|
||||
brightness: Brightness.dark,
|
||||
useMaterial3: true,
|
||||
colorSchemeSeed: colorSchemeSeed,
|
||||
),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'Step ${step + 1} of ${steps.length}',
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.titleMedium!
|
||||
.copyWith(color: colorSchemeSeed),
|
||||
),
|
||||
backgroundColor: Colors.black38,
|
||||
),
|
||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
||||
floatingActionButton: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (step > 0) ...[
|
||||
FloatingActionButton(
|
||||
child: const Icon(Icons.first_page),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
step = 0;
|
||||
});
|
||||
},
|
||||
),
|
||||
const Gap(24),
|
||||
FloatingActionButton(
|
||||
child: const Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
step--;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
if (step > 0 && step + 1 < steps.length) const Gap(24),
|
||||
if (step + 1 < steps.length) ...[
|
||||
FloatingActionButton(
|
||||
child: const Icon(Icons.arrow_forward),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
step++;
|
||||
});
|
||||
},
|
||||
),
|
||||
const Gap(24),
|
||||
FloatingActionButton(
|
||||
child: const Icon(Icons.last_page),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
step = steps.length - 1;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
body: steps[step](
|
||||
callback: (color) {
|
||||
setState(() {
|
||||
colorSchemeSeed = color;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -1,131 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class OrbShaderConfig {
|
||||
const OrbShaderConfig({
|
||||
this.zoom = 0.3,
|
||||
this.exposure = 0.4,
|
||||
this.roughness = 0.3,
|
||||
this.metalness = 0.3,
|
||||
this.materialColor = const Color.fromARGB(255, 242, 163, 138),
|
||||
this.lightRadius = 0.75,
|
||||
this.lightColor = const Color(0xFFFFFFFF),
|
||||
this.lightBrightness = 15.00,
|
||||
this.ior = 0.5,
|
||||
this.lightAttenuation = 0.5,
|
||||
this.ambientLightColor = const Color(0xFFFFFFFF),
|
||||
this.ambientLightBrightness = 0.2,
|
||||
this.ambientLightDepthFactor = 0.3,
|
||||
this.lightOffsetX = 0,
|
||||
this.lightOffsetY = 0.1,
|
||||
this.lightOffsetZ = -0.66,
|
||||
}) : assert(zoom >= 0 && zoom <= 1),
|
||||
assert(exposure >= 0),
|
||||
assert(metalness >= 0 && metalness <= 1),
|
||||
assert(lightRadius >= 0),
|
||||
assert(lightBrightness >= 1),
|
||||
assert(ior >= 0 && ior <= 2),
|
||||
assert(lightAttenuation >= 0 && lightAttenuation <= 1),
|
||||
assert(ambientLightBrightness >= 0);
|
||||
|
||||
final double zoom;
|
||||
|
||||
/// Camera exposure value, higher is brighter, 0 is black
|
||||
final double exposure;
|
||||
|
||||
/// How rough the surface is, somewhat translates to the intensity/radius
|
||||
/// of specular highlights
|
||||
final double roughness;
|
||||
|
||||
/// 0 for a dielectric material (plastic, wood, grass, water, etc...),
|
||||
/// 1 for a metal (iron, copper, aluminum, gold, etc...), a value in between
|
||||
/// blends the two materials (not really physically accurate, has minor
|
||||
/// artistic value)
|
||||
final double metalness;
|
||||
|
||||
/// any color, alpha ignored, for metal materials doesn't correspond to
|
||||
/// surface color but to a reflectivity index based off of a 0 degree viewing
|
||||
/// angle (can look these values up online for various actual metals)
|
||||
final Color materialColor;
|
||||
|
||||
/// The following light properties model a disk shaped light pointing
|
||||
/// at the sphere
|
||||
final double lightRadius;
|
||||
|
||||
/// alpha ignored
|
||||
final Color lightColor;
|
||||
|
||||
/// Light Brightness measured in luminous power (perceived total
|
||||
/// brightness of light, the larger the radius the more diffused the light
|
||||
/// power is for a given area)
|
||||
final double lightBrightness;
|
||||
|
||||
/// 0..2, Index of refraction, higher value = more refraction,
|
||||
final double ior;
|
||||
|
||||
/// Light attenuation factor, 0 for no attenuation, 1 is very fast attenuation
|
||||
final double lightAttenuation;
|
||||
|
||||
/// alpha ignored
|
||||
final Color ambientLightColor;
|
||||
|
||||
final double ambientLightBrightness;
|
||||
|
||||
/// Modulates the ambient light brightness based off of the depth of the
|
||||
/// pixel. 1 means the ambient brightness factor at the front of the orb is 0,
|
||||
/// brightness factor at the back is 1. 0 means there's no change to the
|
||||
/// brightness factor based on depth
|
||||
final double ambientLightDepthFactor;
|
||||
|
||||
/// Offset of the light relative to the center of the orb, +x is to the right
|
||||
final double lightOffsetX;
|
||||
|
||||
/// Offset of the light relative to the center of the orb, +y is up
|
||||
final double lightOffsetY;
|
||||
|
||||
/// Offset of the light relative to the center of the orb, +z is facing the camera
|
||||
final double lightOffsetZ;
|
||||
|
||||
OrbShaderConfig copyWith({
|
||||
double? zoom,
|
||||
double? exposure,
|
||||
double? roughness,
|
||||
double? metalness,
|
||||
Color? materialColor,
|
||||
double? lightRadius,
|
||||
Color? lightColor,
|
||||
double? lightBrightness,
|
||||
double? ior,
|
||||
double? lightAttenuation,
|
||||
Color? ambientLightColor,
|
||||
double? ambientLightBrightness,
|
||||
double? ambientLightDepthFactor,
|
||||
double? lightOffsetX,
|
||||
double? lightOffsetY,
|
||||
double? lightOffsetZ,
|
||||
}) {
|
||||
return OrbShaderConfig(
|
||||
zoom: zoom ?? this.zoom,
|
||||
exposure: exposure ?? this.exposure,
|
||||
roughness: roughness ?? this.roughness,
|
||||
metalness: metalness ?? this.metalness,
|
||||
materialColor: materialColor ?? this.materialColor,
|
||||
lightRadius: lightRadius ?? this.lightRadius,
|
||||
lightColor: lightColor ?? this.lightColor,
|
||||
lightBrightness: lightBrightness ?? this.lightBrightness,
|
||||
ior: ior ?? this.ior,
|
||||
lightAttenuation: lightAttenuation ?? this.lightAttenuation,
|
||||
ambientLightColor: ambientLightColor ?? this.ambientLightColor,
|
||||
ambientLightBrightness:
|
||||
ambientLightBrightness ?? this.ambientLightBrightness,
|
||||
ambientLightDepthFactor:
|
||||
ambientLightDepthFactor ?? this.ambientLightDepthFactor,
|
||||
lightOffsetX: lightOffsetX ?? this.lightOffsetX,
|
||||
lightOffsetY: lightOffsetY ?? this.lightOffsetY,
|
||||
lightOffsetZ: lightOffsetZ ?? this.lightOffsetZ,
|
||||
);
|
||||
}
|
||||
}
|
@ -1,86 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:math' as math;
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vector_math/vector_math_64.dart' as v64;
|
||||
|
||||
import 'orb_shader_config.dart';
|
||||
|
||||
class OrbShaderPainter extends CustomPainter {
|
||||
OrbShaderPainter(
|
||||
this.shader, {
|
||||
required this.config,
|
||||
required this.time,
|
||||
required this.mousePos,
|
||||
required this.energy,
|
||||
});
|
||||
final ui.FragmentShader shader;
|
||||
final OrbShaderConfig config;
|
||||
final double time;
|
||||
final Offset mousePos;
|
||||
final double energy;
|
||||
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
double fov =
|
||||
v64.mix(math.pi / 4.3, math.pi / 2.0, config.zoom.clamp(0.0, 1.0));
|
||||
|
||||
v64.Vector3 colorToVector3(Color c) =>
|
||||
v64.Vector3(
|
||||
c.red.toDouble(),
|
||||
c.green.toDouble(),
|
||||
c.blue.toDouble(),
|
||||
) /
|
||||
255.0;
|
||||
|
||||
v64.Vector3 lightLumP = colorToVector3(config.lightColor).normalized() *
|
||||
math.max(0.0, config.lightBrightness);
|
||||
v64.Vector3 albedo = colorToVector3(config.materialColor);
|
||||
|
||||
v64.Vector3 ambientLight = colorToVector3(config.ambientLightColor) *
|
||||
math.max(0.0, config.ambientLightBrightness);
|
||||
|
||||
shader.setFloat(0, size.width);
|
||||
shader.setFloat(1, size.height);
|
||||
shader.setFloat(2, time);
|
||||
shader.setFloat(3, math.max(0.0, config.exposure));
|
||||
shader.setFloat(4, fov);
|
||||
shader.setFloat(5, config.roughness.clamp(0.0, 1.0));
|
||||
shader.setFloat(6, config.metalness.clamp(0.0, 1.0));
|
||||
shader.setFloat(7, config.lightOffsetX);
|
||||
shader.setFloat(8, config.lightOffsetY);
|
||||
shader.setFloat(9, config.lightOffsetZ);
|
||||
shader.setFloat(10, config.lightRadius);
|
||||
shader.setFloat(11, lightLumP.x);
|
||||
shader.setFloat(12, lightLumP.y);
|
||||
shader.setFloat(13, lightLumP.z);
|
||||
shader.setFloat(14, albedo.x);
|
||||
shader.setFloat(15, albedo.y);
|
||||
shader.setFloat(16, albedo.z);
|
||||
shader.setFloat(17, config.ior.clamp(0.0, 2.0));
|
||||
shader.setFloat(18, config.lightAttenuation.clamp(0.0, 1.0));
|
||||
shader.setFloat(19, ambientLight.x);
|
||||
shader.setFloat(20, ambientLight.y);
|
||||
shader.setFloat(21, ambientLight.z);
|
||||
shader.setFloat(22, config.ambientLightDepthFactor.clamp(0.0, 1.0));
|
||||
shader.setFloat(23, energy);
|
||||
|
||||
canvas.drawRect(
|
||||
Rect.fromLTWH(0, 0, size.width, size.height),
|
||||
Paint()..shader = shader,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
bool shouldRepaint(covariant OrbShaderPainter oldDelegate) {
|
||||
return oldDelegate.shader != shader ||
|
||||
oldDelegate.config != config ||
|
||||
oldDelegate.time != time ||
|
||||
oldDelegate.mousePos != mousePos ||
|
||||
oldDelegate.energy != energy;
|
||||
}
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:math' as math;
|
||||
import 'dart:ui' as ui;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../assets.dart';
|
||||
import '../common/reactive_widget.dart';
|
||||
import 'orb_shader_config.dart';
|
||||
import 'orb_shader_painter.dart';
|
||||
|
||||
class OrbShaderWidget extends StatefulWidget {
|
||||
const OrbShaderWidget({
|
||||
super.key,
|
||||
required this.config,
|
||||
this.onUpdate,
|
||||
required this.mousePos,
|
||||
required this.minEnergy,
|
||||
});
|
||||
|
||||
final double minEnergy;
|
||||
final OrbShaderConfig config;
|
||||
final Offset mousePos;
|
||||
final void Function(double energy)? onUpdate;
|
||||
|
||||
@override
|
||||
State<OrbShaderWidget> createState() => OrbShaderWidgetState();
|
||||
}
|
||||
|
||||
class OrbShaderWidgetState extends State<OrbShaderWidget>
|
||||
with SingleTickerProviderStateMixin {
|
||||
final _heartbeatSequence = TweenSequence(
|
||||
[
|
||||
TweenSequenceItem(tween: ConstantTween(0), weight: 40),
|
||||
TweenSequenceItem(
|
||||
tween: Tween(begin: 0.0, end: 1.0)
|
||||
.chain(CurveTween(curve: Curves.easeInOutCubic)),
|
||||
weight: 8),
|
||||
TweenSequenceItem(
|
||||
tween: Tween(begin: 1.0, end: 0.2)
|
||||
.chain(CurveTween(curve: Curves.easeInOutCubic)),
|
||||
weight: 12),
|
||||
TweenSequenceItem(
|
||||
tween: Tween(begin: 0.2, end: 0.8)
|
||||
.chain(CurveTween(curve: Curves.easeInOutCubic)),
|
||||
weight: 6),
|
||||
TweenSequenceItem(
|
||||
tween: Tween(begin: 0.8, end: 0.0)
|
||||
.chain(CurveTween(curve: Curves.easeInOutCubic)),
|
||||
weight: 10),
|
||||
],
|
||||
);
|
||||
|
||||
late final AnimationController _heartbeatAnim;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_heartbeatAnim = AnimationController(vsync: this, duration: 3000.ms)
|
||||
..repeat();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_heartbeatAnim.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => Consumer<Shaders?>(
|
||||
builder: (context, shaders, _) {
|
||||
if (shaders == null) return const SizedBox.expand();
|
||||
return ListenableBuilder(
|
||||
listenable: _heartbeatAnim,
|
||||
builder: (_, __) {
|
||||
final heartbeatEnergy =
|
||||
_heartbeatAnim.drive(_heartbeatSequence).value;
|
||||
return TweenAnimationBuilder(
|
||||
tween: Tween<double>(
|
||||
begin: widget.minEnergy, end: widget.minEnergy),
|
||||
duration: 300.ms,
|
||||
curve: Curves.easeOutCubic,
|
||||
builder: (context, minEnergy, child) {
|
||||
return ReactiveWidget(
|
||||
builder: (context, time, size) {
|
||||
double energyLevel = 0;
|
||||
if (size.shortestSide != 0) {
|
||||
final d = (Offset(size.width, size.height) / 2 -
|
||||
widget.mousePos)
|
||||
.distance;
|
||||
final hitSize = size.shortestSide * .5;
|
||||
energyLevel = 1 - math.min(1, (d / hitSize));
|
||||
scheduleMicrotask(
|
||||
() => widget.onUpdate?.call(energyLevel));
|
||||
}
|
||||
energyLevel +=
|
||||
(1.3 - energyLevel) * heartbeatEnergy * 0.1;
|
||||
energyLevel = ui.lerpDouble(minEnergy, 1, energyLevel)!;
|
||||
return CustomPaint(
|
||||
size: size,
|
||||
painter: OrbShaderPainter(
|
||||
shaders.orb,
|
||||
config: widget.config,
|
||||
time: time,
|
||||
mousePos: widget.mousePos,
|
||||
energy: energyLevel,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TextStyles {
|
||||
static const _font1 = TextStyle(fontFamily: 'Exo', color: Colors.white);
|
||||
|
||||
static TextStyle get h1 => _font1.copyWith(
|
||||
fontSize: 75, letterSpacing: 35, fontWeight: FontWeight.w700);
|
||||
static TextStyle get h2 => h1.copyWith(fontSize: 40, letterSpacing: 0);
|
||||
static TextStyle get h3 =>
|
||||
h1.copyWith(fontSize: 24, letterSpacing: 20, fontWeight: FontWeight.w400);
|
||||
static TextStyle get body => _font1.copyWith(fontSize: 16);
|
||||
static TextStyle get btn => _font1.copyWith(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: 10,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class AppColors {
|
||||
static const orbColors = [
|
||||
Color(0xFF71FDBF),
|
||||
Color(0xFFCE33FF),
|
||||
Color(0xFFFF5033),
|
||||
];
|
||||
|
||||
static const emitColors = [
|
||||
Color(0xFF96FF33),
|
||||
Color(0xFF00FFFF),
|
||||
Color(0xFFFF993E),
|
||||
];
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../main.dart';
|
||||
|
||||
abstract class TitleScreenBase extends StatefulWidget {
|
||||
const TitleScreenBase({super.key, required this.callback});
|
||||
final ColorCallback callback;
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../assets.dart';
|
||||
import '../styles.dart';
|
||||
import '../title_screen/title_screen.dart';
|
||||
|
||||
class TitleScreen extends TitleScreenBase {
|
||||
const TitleScreen({super.key, required super.callback});
|
||||
|
||||
@override
|
||||
State<TitleScreen> createState() => _TitleScreenState();
|
||||
}
|
||||
|
||||
class _TitleScreenState extends State<TitleScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(duration) => widget.callback(AppColors.orbColors[0]));
|
||||
|
||||
return Center(
|
||||
child: Stack(
|
||||
children: [
|
||||
/// Bg-Base
|
||||
Image.asset(AssetPaths.titleBgBase),
|
||||
|
||||
/// Bg-Receive
|
||||
Image.asset(AssetPaths.titleBgReceive),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../assets.dart';
|
||||
import '../styles.dart';
|
||||
import '../title_screen/title_screen.dart';
|
||||
|
||||
class TitleScreen extends TitleScreenBase {
|
||||
const TitleScreen({super.key, required super.callback});
|
||||
|
||||
@override
|
||||
State<TitleScreen> createState() => _TitleScreenState();
|
||||
}
|
||||
|
||||
class _TitleScreenState extends State<TitleScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(duration) => widget.callback(AppColors.orbColors[0]));
|
||||
|
||||
return Center(
|
||||
child: Stack(
|
||||
children: [
|
||||
/// Bg-Base
|
||||
Image.asset(AssetPaths.titleBgBase),
|
||||
|
||||
/// Bg-Receive
|
||||
Image.asset(AssetPaths.titleBgReceive),
|
||||
|
||||
/// Mg-Base
|
||||
Image.asset(AssetPaths.titleMgBase),
|
||||
|
||||
/// Mg-Receive
|
||||
Image.asset(AssetPaths.titleMgReceive),
|
||||
|
||||
/// Mg-Emit
|
||||
Image.asset(AssetPaths.titleMgEmit),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../assets.dart';
|
||||
import '../styles.dart';
|
||||
import '../title_screen/title_screen.dart';
|
||||
|
||||
class TitleScreen extends TitleScreenBase {
|
||||
const TitleScreen({super.key, required super.callback});
|
||||
|
||||
@override
|
||||
State<TitleScreen> createState() => _TitleScreenState();
|
||||
}
|
||||
|
||||
class _TitleScreenState extends State<TitleScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(duration) => widget.callback(AppColors.orbColors[0]));
|
||||
|
||||
return Center(
|
||||
child: Stack(
|
||||
children: [
|
||||
/// Bg-Base
|
||||
Image.asset(AssetPaths.titleBgBase),
|
||||
|
||||
/// Bg-Receive
|
||||
Image.asset(AssetPaths.titleBgReceive),
|
||||
|
||||
/// Mg-Base
|
||||
Image.asset(AssetPaths.titleMgBase),
|
||||
|
||||
/// Mg-Receive
|
||||
Image.asset(AssetPaths.titleMgReceive),
|
||||
|
||||
/// Mg-Emit
|
||||
Image.asset(AssetPaths.titleMgEmit),
|
||||
|
||||
/// Fg-Rocks
|
||||
Image.asset(AssetPaths.titleFgBase),
|
||||
|
||||
/// Fg-Receive
|
||||
Image.asset(AssetPaths.titleFgReceive),
|
||||
|
||||
/// Fg-Emit
|
||||
Image.asset(AssetPaths.titleFgEmit),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -1,106 +0,0 @@
|
||||
// Copyright 2023 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../assets.dart';
|
||||
import '../styles.dart';
|
||||
import '../title_screen/title_screen.dart';
|
||||
|
||||
class TitleScreen extends TitleScreenBase {
|
||||
const TitleScreen({super.key, required super.callback});
|
||||
|
||||
final _finalReceiveLightAmt = 0.7;
|
||||
final _finalEmitLightAmt = 0.5;
|
||||
|
||||
@override
|
||||
State<TitleScreen> createState() => _TitleScreenState();
|
||||
}
|
||||
|
||||
class _TitleScreenState extends State<TitleScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final orbColor = AppColors.orbColors[0];
|
||||
final emitColor = AppColors.emitColors[0];
|
||||
WidgetsBinding.instance
|
||||
.addPostFrameCallback((duration) => widget.callback(orbColor));
|
||||
|
||||
return Center(
|
||||
child: Stack(
|
||||
children: [
|
||||
/// Bg-Base
|
||||
Image.asset(AssetPaths.titleBgBase),
|
||||
|
||||
/// Bg-Receive
|
||||
_LitImage(
|
||||
color: orbColor,
|
||||
imgSrc: AssetPaths.titleBgReceive,
|
||||
lightAmt: widget._finalReceiveLightAmt,
|
||||
),
|
||||
|
||||
/// Mg-Base
|
||||
_LitImage(
|
||||
imgSrc: AssetPaths.titleMgBase,
|
||||
color: orbColor,
|
||||
lightAmt: widget._finalReceiveLightAmt,
|
||||
),
|
||||
|
||||
/// Mg-Receive
|
||||
_LitImage(
|
||||
imgSrc: AssetPaths.titleMgReceive,
|
||||
color: orbColor,
|
||||
lightAmt: widget._finalReceiveLightAmt,
|
||||
),
|
||||
|
||||
/// Mg-Emit
|
||||
_LitImage(
|
||||
imgSrc: AssetPaths.titleMgEmit,
|
||||
color: emitColor,
|
||||
lightAmt: widget._finalEmitLightAmt,
|
||||
),
|
||||
|
||||
/// Fg-Rocks
|
||||
Image.asset(AssetPaths.titleFgBase),
|
||||
|
||||
/// Fg-Receive
|
||||
_LitImage(
|
||||
imgSrc: AssetPaths.titleFgReceive,
|
||||
color: orbColor,
|
||||
lightAmt: widget._finalReceiveLightAmt,
|
||||
),
|
||||
|
||||
/// Fg-Emit
|
||||
_LitImage(
|
||||
imgSrc: AssetPaths.titleFgEmit,
|
||||
color: emitColor,
|
||||
lightAmt: widget._finalEmitLightAmt,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _LitImage extends StatelessWidget {
|
||||
const _LitImage({
|
||||
required this.color,
|
||||
required this.imgSrc,
|
||||
required this.lightAmt,
|
||||
});
|
||||
final Color color;
|
||||
final String imgSrc;
|
||||
final double lightAmt;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final hsl = HSLColor.fromColor(color);
|
||||
return ColorFiltered(
|
||||
colorFilter: ColorFilter.mode(
|
||||
hsl.withLightness(hsl.lightness * lightAmt).toColor(),
|
||||
BlendMode.modulate,
|
||||
),
|
||||
child: Image.asset(imgSrc),
|
||||
);
|
||||
}
|
||||
}
|