diff --git a/.metadata b/.metadata
index 39581c9..2112298 100644
--- a/.metadata
+++ b/.metadata
@@ -1,8 +1,30 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
-# This file should be version controlled and should not be manually edited.
+# This file should be version controlled.
version:
- revision: f37c235c32fc15babe6dc7b7bc2ee4387e5ecf92
- channel: beta
+ revision: f1875d570e39de09040c8f79aa13cc56baab8db1
+ channel: stable
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
+ base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
+ - platform: web
+ create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
+ base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/README.md b/README.md
index f4e4db7..2672e03 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,14 @@
+
+
+
+
+
## Flutter UI challenge - planets app
-Recreated the design by [Anto Skvortsovn ](https://dribbble.com/shots/4220958-xore-solar-system)
-
-
-
+
-
-
+Recreated the design by [Anto Skvortsovn ](https://dribbble.com/shots/4220958-xore-solar-system)
-
+
-For help getting started with Flutter, view the online
-[documentation](https://flutter.io/).
diff --git a/analysis_options.yaml b/analysis_options.yaml
new file mode 100644
index 0000000..61b6c4d
--- /dev/null
+++ b/analysis_options.yaml
@@ -0,0 +1,29 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at
+ # https://dart-lang.github.io/linter/lints/index.html.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/android/.gitignore b/android/.gitignore
new file mode 100644
index 0000000..6f56801
--- /dev/null
+++ b/android/.gitignore
@@ -0,0 +1,13 @@
+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
diff --git a/android/.project b/android/.project
deleted file mode 100644
index 3964dd3..0000000
--- a/android/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- android
- Project android created by Buildship.
-
-
-
-
- org.eclipse.buildship.core.gradleprojectbuilder
-
-
-
-
-
- org.eclipse.buildship.core.gradleprojectnature
-
-
diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs
deleted file mode 100644
index e889521..0000000
--- a/android/.settings/org.eclipse.buildship.core.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-connection.project.dir=
-eclipse.preferences.version=1
diff --git a/android/app/.classpath b/android/app/.classpath
deleted file mode 100644
index 3589094..0000000
--- a/android/app/.classpath
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/android/app/.project b/android/app/.project
deleted file mode 100644
index ac485d7..0000000
--- a/android/app/.project
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- app
- Project app created by Buildship.
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.buildship.core.gradleprojectbuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
- org.eclipse.buildship.core.gradleprojectnature
-
-
diff --git a/android/app/.settings/org.eclipse.buildship.core.prefs b/android/app/.settings/org.eclipse.buildship.core.prefs
deleted file mode 100644
index b1886ad..0000000
--- a/android/app/.settings/org.eclipse.buildship.core.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-connection.project.dir=..
-eclipse.preferences.version=1
diff --git a/android/app/build.gradle b/android/app/build.gradle
index aa670a6..353aa07 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -22,23 +22,35 @@ if (flutterVersionName == null) {
}
apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 27
+ compileSdkVersion flutter.compileSdkVersion
+ ndkVersion flutter.ndkVersion
- lintOptions {
- disable 'InvalidPackage'
+ 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.flutterxore"
- minSdkVersion 16
- targetSdkVersion 27
+ applicationId "com.example.flutter_xore"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
+ minSdkVersion flutter.minSdkVersion
+ targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
@@ -55,7 +67,5 @@ flutter {
}
dependencies {
- testImplementation 'junit:junit:4.12'
- androidTestImplementation 'com.android.support.test:runner:1.0.2'
- androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..a6e484c
--- /dev/null
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 712335f..230408e 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -1,39 +1,34 @@
-
-
-
-
-
-
+
-
+
+ android:name="io.flutter.embedding.android.NormalTheme"
+ android:resource="@style/NormalTheme"
+ />
+
+
diff --git a/android/app/src/main/java/com/example/flutterxore/MainActivity.java b/android/app/src/main/java/com/example/flutterxore/MainActivity.java
deleted file mode 100644
index 6aee504..0000000
--- a/android/app/src/main/java/com/example/flutterxore/MainActivity.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.example.flutterxore;
-
-import android.os.Bundle;
-import io.flutter.app.FlutterActivity;
-import io.flutter.plugins.GeneratedPluginRegistrant;
-
-public class MainActivity extends FlutterActivity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- GeneratedPluginRegistrant.registerWith(this);
- }
-}
diff --git a/android/app/src/main/kotlin/com/example/flutter_xore/MainActivity.kt b/android/app/src/main/kotlin/com/example/flutter_xore/MainActivity.kt
new file mode 100644
index 0000000..a212375
--- /dev/null
+++ b/android/app/src/main/kotlin/com/example/flutter_xore/MainActivity.kt
@@ -0,0 +1,6 @@
+package com.example.flutter_xore
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}
diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
index db77bb4..24df2ba 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
index 17987b7..04cd2ae 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index 09d4391..25916a2 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index d5f1c8d..1c77d63 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index 4d6372e..a963e8e 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..06952be
--- /dev/null
+++ b/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
index 00fa441..cb1ef88 100644
--- a/android/app/src/main/res/values/styles.xml
+++ b/android/app/src/main/res/values/styles.xml
@@ -1,8 +1,18 @@
-
+
+
diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..a6e484c
--- /dev/null
+++ b/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/android/build.gradle b/android/build.gradle
index d4225c7..83ae220 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,18 +1,20 @@
buildscript {
+ ext.kotlin_version = '1.6.10'
repositories {
google()
- jcenter()
+ mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.1.2'
+ classpath 'com.android.tools.build:gradle:7.1.2'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
- jcenter()
+ mavenCentral()
}
}
diff --git a/android/gradle.properties b/android/gradle.properties
index 8bd86f6..94adc3a 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 9372d0f..cc5527d 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
diff --git a/android/settings.gradle b/android/settings.gradle
index 5a2f14f..44e62bc 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -1,15 +1,11 @@
include ':app'
-def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
+def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
+def properties = new Properties()
-def plugins = new Properties()
-def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
-if (pluginsFile.exists()) {
- pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
-}
+assert localPropertiesFile.exists()
+localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
-plugins.each { name, path ->
- def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
- include ":$name"
- project(":$name").projectDir = pluginDirectory
-}
+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"
diff --git a/ios/.gitignore b/ios/.gitignore
new file mode 100644
index 0000000..7a7f987
--- /dev/null
+++ b/ios/.gitignore
@@ -0,0 +1,34 @@
+**/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
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index 9367d48..8d4492f 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 8.0
+ 9.0
diff --git a/ios/Flutter/flutter_export_environment.sh b/ios/Flutter/flutter_export_environment.sh
new file mode 100755
index 0000000..79797b3
--- /dev/null
+++ b/ios/Flutter/flutter_export_environment.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# This is a generated file; do not edit or check into version control.
+export "FLUTTER_ROOT=/Users/md_siam/Developer/flutter"
+export "FLUTTER_APPLICATION_PATH=/Users/md_siam/AndroidStudioProjects/flutter_xore"
+export "COCOAPODS_PARALLEL_CODE_SIGN=true"
+export "FLUTTER_TARGET=/Users/md_siam/AndroidStudioProjects/flutter_xore/lib/main.dart"
+export "FLUTTER_BUILD_DIR=build"
+export "FLUTTER_BUILD_NAME=1.0.0"
+export "FLUTTER_BUILD_NUMBER=1"
+export "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ=="
+export "DART_OBFUSCATION=false"
+export "TRACK_WIDGET_CREATION=true"
+export "TREE_SHAKE_ICONS=false"
+export "PACKAGE_CONFIG=/Users/md_siam/AndroidStudioProjects/flutter_xore/.dart_tool/package_config.json"
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index c8a3a2a..ae1cf68 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -3,20 +3,13 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 46;
+ objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
- 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
- 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
- 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
- 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
- 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
- 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
+ 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 */; };
@@ -29,8 +22,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
- 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
- 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@@ -40,17 +31,13 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
- 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
- 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
- 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
- 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
- 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
@@ -62,8 +49,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
- 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -73,10 +58,7 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
- 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
- 3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
- 9740EEBA1CF902C7004384FC /* Flutter.framework */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
@@ -90,7 +72,6 @@
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
- CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
);
sourceTree = "";
};
@@ -105,27 +86,18 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
- 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
- 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
- 97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
);
path = Runner;
sourceTree = "";
};
- 97C146F11CF9000F007C117D /* Supporting Files */ = {
- isa = PBXGroup;
- children = (
- 97C146F21CF9000F007C117D /* main.m */,
- );
- name = "Supporting Files";
- sourceTree = "";
- };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -155,17 +127,18 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0910;
- ORGANIZATIONNAME = "The Chromium Authors";
+ LastUpgradeCheck = 1300;
+ ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
@@ -188,9 +161,7 @@
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
- 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
- 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -210,7 +181,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
@@ -233,8 +204,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
- 97C146F31CF9000F007C117D /* main.m in Sources */,
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -261,9 +231,79 @@
/* 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 = 9.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.flutterXore;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -275,12 +315,14 @@
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;
@@ -307,7 +349,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -317,7 +359,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -329,12 +370,14 @@
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;
@@ -355,9 +398,12 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.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;
};
@@ -368,20 +414,19 @@
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- LIBRARY_SEARCH_PATHS = (
+ LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
- "$(PROJECT_DIR)/Flutter",
+ "@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterXore;
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;
@@ -391,20 +436,18 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Flutter",
- );
INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
- LIBRARY_SEARCH_PATHS = (
+ LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
- "$(PROJECT_DIR)/Flutter",
+ "@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterXore;
PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
@@ -417,6 +460,7 @@
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
@@ -426,6 +470,7 @@
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
index 1d526a1..919434a 100644
--- a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -2,6 +2,6 @@
+ location = "self:">
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index 1263ac8..c87d15a 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
-
-
-
-
+
+
-
-
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner/AppDelegate.h b/ios/Runner/AppDelegate.h
deleted file mode 100644
index 36e21bb..0000000
--- a/ios/Runner/AppDelegate.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#import
-#import
-
-@interface AppDelegate : FlutterAppDelegate
-
-@end
diff --git a/ios/Runner/AppDelegate.m b/ios/Runner/AppDelegate.m
deleted file mode 100644
index 59a72e9..0000000
--- a/ios/Runner/AppDelegate.m
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "AppDelegate.h"
-#include "GeneratedPluginRegistrant.h"
-
-@implementation AppDelegate
-
-- (BOOL)application:(UIApplication *)application
- didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- [GeneratedPluginRegistrant registerWithRegistry:self];
- // Override point for customization after application launch.
- return [super application:application didFinishLaunchingWithOptions:launchOptions];
-}
-
-@end
diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..70693e4
--- /dev/null
+++ b/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+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)
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png
new file mode 100644
index 0000000..156846f
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png
new file mode 100644
index 0000000..8694a34
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png
new file mode 100644
index 0000000..92280dd
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png
new file mode 100644
index 0000000..486102c
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png
new file mode 100644
index 0000000..9e3b75f
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png
new file mode 100644
index 0000000..20e7d52
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png
new file mode 100644
index 0000000..6b716e5
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png
new file mode 100644
index 0000000..2ccae8b
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png
new file mode 100644
index 0000000..0d81acd
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png
new file mode 100644
index 0000000..ce09e29
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png
new file mode 100644
index 0000000..7785d0b
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png
new file mode 100644
index 0000000..dfa1f71
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png
new file mode 100644
index 0000000..c2153b8
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png
new file mode 100644
index 0000000..9320fd6
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png
new file mode 100644
index 0000000..97a388f
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png
new file mode 100644
index 0000000..7242eb6
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png
new file mode 100644
index 0000000..fbf54f4
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png
new file mode 100644
index 0000000..cc43f9c
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png
new file mode 100644
index 0000000..c1f6268
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
index d36b1fa..65b74d7 100644
--- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1,122 +1 @@
-{
- "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"
- }
-}
+{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"}]}
\ No newline at end of file
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
deleted file mode 100644
index 3d43d11..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
deleted file mode 100644
index 28c6bf0..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
deleted file mode 100644
index 2ccbfd9..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
deleted file mode 100644
index f091b6b..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
deleted file mode 100644
index 4cde121..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
deleted file mode 100644
index d0ef06e..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
deleted file mode 100644
index dcdc230..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
deleted file mode 100644
index 2ccbfd9..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
deleted file mode 100644
index c8f9ed8..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
deleted file mode 100644
index a6d6b86..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
deleted file mode 100644
index a6d6b86..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
deleted file mode 100644
index 75b2d16..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
deleted file mode 100644
index c4df70d..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
deleted file mode 100644
index 6a84f41..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
deleted file mode 100644
index d0e1f58..0000000
Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 6ba9811..ccf353b 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -3,7 +3,9 @@
CFBundleDevelopmentRegion
- en
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Flutter Xore
CFBundleExecutable
$(EXECUTABLE_NAME)
CFBundleIdentifier
@@ -41,5 +43,7 @@
UIViewControllerBasedStatusBarAppearance
+ CADisableMinimumFrameDurationOnPhone
+
diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/ios/Runner/main.m b/ios/Runner/main.m
deleted file mode 100644
index dff6597..0000000
--- a/ios/Runner/main.m
+++ /dev/null
@@ -1,9 +0,0 @@
-#import
-#import
-#import "AppDelegate.h"
-
-int main(int argc, char* argv[]) {
- @autoreleasepool {
- return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
- }
-}
diff --git a/lib/model.dart b/lib/app/model/model.dart
similarity index 97%
rename from lib/model.dart
rename to lib/app/model/model.dart
index 4a8593e..abea122 100644
--- a/lib/model.dart
+++ b/lib/app/model/model.dart
@@ -176,16 +176,16 @@ class Planet extends CelestialBody {
final List moons;
Planet({
- String name,
+ String? name,
this.moons = const [],
- Color color,
- double diameter,
- String description,
- String intro,
- String formation,
- String history,
- String imgAssetPath,
- String vidAssetPath,
+ Color? color,
+ double? diameter,
+ String? description,
+ String? intro,
+ String? formation,
+ String? history,
+ String? imgAssetPath,
+ String? vidAssetPath,
}) : super(
name: name,
diameter: diameter,
@@ -201,13 +201,13 @@ class Planet extends CelestialBody {
class Moon extends CelestialBody {
Moon(
- {String name,
- String description,
- String intro,
- String formation,
- String history,
- String imgAssetPath,
- String vidAssetPath})
+ {String? name,
+ String? description,
+ String? intro,
+ String? formation,
+ String? history,
+ String? imgAssetPath,
+ String? vidAssetPath})
: super(
name: name,
diameter: 0.28,
@@ -222,20 +222,20 @@ class Moon extends CelestialBody {
}
class CelestialBody {
- final String name;
- final double diameter;
- final Color color;
- final String description;
- final String intro;
- final String formation;
- final String history;
- final String imgAssetPath;
- final String vidAssetPath;
+ final String? name;
+ final double? diameter;
+ final Color? color;
+ final String? description;
+ final String? intro;
+ final String? formation;
+ final String? history;
+ final String? imgAssetPath;
+ final String? vidAssetPath;
CelestialBody({
- @required this.name,
- @required this.diameter,
- @required this.color,
+ required this.name,
+ required this.diameter,
+ required this.color,
this.description,
this.intro,
this.formation,
diff --git a/lib/astronaut.dart b/lib/app/page/astronaut.dart
similarity index 66%
rename from lib/astronaut.dart
rename to lib/app/page/astronaut.dart
index 6a5f535..f6f8ac6 100644
--- a/lib/astronaut.dart
+++ b/lib/app/page/astronaut.dart
@@ -1,18 +1,18 @@
import 'dart:async';
import 'package:flutter/material.dart';
-import 'package:flutter_xore/custom_page_routes.dart';
-import 'package:flutter_xore/model.dart';
-import 'package:flutter_xore/planet_page.dart';
+import '../../routes.dart';
+import '../model/model.dart';
+import 'planet_page.dart';
class Astronaut extends StatefulWidget {
- final Size size;
- final List planets;
- final int currentPlanetIndex;
- final Stream shouldNavigate;
+ final Size? size;
+ final List? planets;
+ final int? currentPlanetIndex;
+ final Stream? shouldNavigate;
const Astronaut(
- {Key key,
+ {Key? key,
this.size,
this.planets,
this.currentPlanetIndex,
@@ -20,29 +20,35 @@ class Astronaut extends StatefulWidget {
: super(key: key);
@override
AstronautState createState() {
- return new AstronautState();
+ return AstronautState();
}
}
class AstronautState extends State with TickerProviderStateMixin {
- AnimationController _smokeAnimController;
- AnimationController _scaleAnimController;
- AnimationController _floatingAnimController;
- Animation _floatingAnim;
- TabController _tabController;
- StreamSubscription _navigationSubscription;
+ late AnimationController _smokeAnimController;
+ late AnimationController _scaleAnimController;
+ late AnimationController _floatingAnimController;
+ late Animation _floatingAnim;
+ TabController? _tabController;
+ late StreamSubscription _navigationSubscription;
@override
void initState() {
super.initState();
- _smokeAnimController =
- AnimationController(duration: Duration(seconds: 35), vsync: this);
+ _smokeAnimController = AnimationController(
+ duration: const Duration(seconds: 35),
+ vsync: this,
+ );
_floatingAnimController = AnimationController(
- duration: Duration(milliseconds: 1700), vsync: this);
+ duration: const Duration(milliseconds: 1700),
+ vsync: this,
+ );
- _floatingAnim = Tween(begin: Offset.zero, end: Offset(0.0, 0.025))
- .animate(_floatingAnimController);
+ _floatingAnim = Tween(
+ begin: Offset.zero,
+ end: const Offset(0.0, 0.025),
+ ).animate(_floatingAnimController);
_smokeAnimController.repeat();
@@ -57,18 +63,19 @@ class AstronautState extends State with TickerProviderStateMixin {
_floatingAnimController.forward();
_tabController = TabController(
- initialIndex: widget.currentPlanetIndex,
- length: widget.planets.length,
- vsync: this);
+ initialIndex: widget.currentPlanetIndex!,
+ length: widget.planets!.length,
+ vsync: this,
+ );
- _navigationSubscription = widget.shouldNavigate.listen((_) async {
+ _navigationSubscription = widget.shouldNavigate!.listen((_) async {
Navigator.of(context)
.push(
MyPageRoute(
- transDuation: Duration(milliseconds: 700),
+ transDuration: const Duration(milliseconds: 700),
builder: (BuildContext context) {
return PlanetPage(
- currentPlanet: widget.planets[widget.currentPlanetIndex],
+ currentPlanet: widget.planets![widget.currentPlanetIndex!],
);
},
),
@@ -81,16 +88,17 @@ class AstronautState extends State with TickerProviderStateMixin {
});
_scaleAnimController = AnimationController(
- lowerBound: 1.0,
- upperBound: 7.0,
- duration: Duration(milliseconds: 700),
- vsync: this);
+ lowerBound: 1.0,
+ upperBound: 7.0,
+ duration: const Duration(milliseconds: 700),
+ vsync: this,
+ );
}
@override
void didUpdateWidget(Astronaut oldWidget) {
if (widget.currentPlanetIndex != oldWidget.currentPlanetIndex) {
- _tabController.animateTo(widget.currentPlanetIndex);
+ _tabController!.animateTo(widget.currentPlanetIndex!);
}
super.didUpdateWidget(oldWidget);
}
@@ -100,18 +108,18 @@ class AstronautState extends State with TickerProviderStateMixin {
super.dispose();
_smokeAnimController.dispose();
_floatingAnimController.dispose();
- _tabController.dispose();
+ _tabController!.dispose();
_navigationSubscription.cancel();
}
@override
Widget build(BuildContext context) {
- final double size = widget.size.width * 0.86;
+ final double size = widget.size!.width * 0.86;
return SlideTransition(
position: _floatingAnim,
child: ScaleTransition(
scale: _scaleAnimController,
- child: Container(
+ child: SizedBox(
width: size,
height: size,
child: Stack(
@@ -127,23 +135,29 @@ class AstronautState extends State with TickerProviderStateMixin {
child: Container(
width: size * 0.5,
height: size * 0.5,
- decoration: BoxDecoration(
+ decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Colors.black,
),
- foregroundDecoration: BoxDecoration(
+ foregroundDecoration: const BoxDecoration(
shape: BoxShape.circle,
gradient: LinearGradient(
begin: Alignment.center,
end: Alignment.bottomCenter,
- colors: [Colors.transparent, Colors.black],
- stops: [0.1, 0.8]),
+ colors: [
+ Colors.transparent,
+ Colors.black,
+ ],
+ stops: [
+ 0.1,
+ 0.8
+ ]),
),
child: ClipOval(
child: TabBarView(
controller: _tabController,
- physics: NeverScrollableScrollPhysics(),
- children: widget.planets.map((Planet p) {
+ physics: const NeverScrollableScrollPhysics(),
+ children: widget.planets!.map((Planet p) {
return PlanetViewImg(
p.imgAssetPath,
planetName: p.name,
@@ -175,11 +189,11 @@ class AstronautState extends State with TickerProviderStateMixin {
}
class PlanetViewImg extends StatelessWidget {
- final String planetName;
- final String imgAssetPath;
+ final String? planetName;
+ final String? imgAssetPath;
const PlanetViewImg(
this.imgAssetPath, {
- Key key,
+ Key? key,
this.planetName,
}) : super(key: key);
@@ -196,13 +210,15 @@ class PlanetViewImg extends StatelessWidget {
return Container();
} else if (flightDirection == HeroFlightDirection.push) {
return toHeroContext.widget;
+ } else {
+ return Container();
}
},
child: Container(
- padding: EdgeInsets.only(bottom: 20.0),
+ padding: const EdgeInsets.only(bottom: 20.0),
alignment: Alignment.bottomCenter,
child: Image.asset(
- imgAssetPath,
+ imgAssetPath!,
fit: BoxFit.cover,
),
),
diff --git a/lib/planet_page.dart b/lib/app/page/planet_page.dart
similarity index 70%
rename from lib/planet_page.dart
rename to lib/app/page/planet_page.dart
index 4c6c081..ced1577 100644
--- a/lib/planet_page.dart
+++ b/lib/app/page/planet_page.dart
@@ -1,51 +1,57 @@
import 'package:flutter/material.dart';
-import 'package:flutter_xore/celestial_body_widget.dart';
-import 'package:flutter_xore/custom_page_routes.dart';
-import 'package:flutter_xore/model.dart';
-import 'package:flutter_xore/planets_details_page.dart';
+import '../widgets/celestial_body_widget.dart';
+import '../../routes.dart';
+import '../model/model.dart';
+import 'planets_details_page.dart';
class PlanetPage extends StatefulWidget {
- final Planet currentPlanet;
+ final Planet? currentPlanet;
- const PlanetPage({Key key, this.currentPlanet}) : super(key: key);
+ const PlanetPage({Key? key, this.currentPlanet}) : super(key: key);
@override
PlanetPageState createState() {
- return new PlanetPageState();
+ return PlanetPageState();
}
}
class PlanetPageState extends State with TickerProviderStateMixin {
- Offset _verticalDragStart;
- AnimationController _swipeAnimController;
- AnimationController _slideInAnimController;
- AnimationController _onNavigationAnimController;
+ Offset? _verticalDragStart;
+ late AnimationController _swipeAnimController;
+ late AnimationController _slideInAnimController;
+ late AnimationController _onNavigationAnimController;
- TabController _tabController;
+ TabController? _tabController;
@override
void initState() {
super.initState();
- _swipeAnimController =
- AnimationController(duration: Duration(milliseconds: 600), vsync: this)
- ..addListener(() {
- setState(() {});
- });
+ _swipeAnimController = AnimationController(
+ duration: const Duration(milliseconds: 600),
+ vsync: this,
+ )..addListener(() {
+ setState(() {});
+ });
- _slideInAnimController =
- AnimationController(duration: Duration(milliseconds: 800), vsync: this);
+ _slideInAnimController = AnimationController(
+ duration: const Duration(milliseconds: 800),
+ vsync: this,
+ );
_tabController =
- TabController(length: widget.currentPlanet.moons.length, vsync: this);
+ TabController(length: widget.currentPlanet!.moons.length, vsync: this);
_slideInAnimController.forward();
- _onNavigationAnimController =
- AnimationController(duration: Duration(milliseconds: 600), vsync: this);
+ _onNavigationAnimController = AnimationController(
+ duration: const Duration(
+ milliseconds: 600,
+ ),
+ vsync: this);
}
@override
void dispose() {
_swipeAnimController.dispose();
- _tabController.dispose();
+ _tabController!.dispose();
_slideInAnimController.dispose();
_onNavigationAnimController.dispose();
super.dispose();
@@ -71,13 +77,13 @@ class PlanetPageState extends State with TickerProviderStateMixin {
}
void _onVerticalDragUpdate(DragUpdateDetails details) {
- if (widget.currentPlanet.moons.length > 0) {
- if (_verticalDragStart.dy - details.globalPosition.dy > 50.0) {
+ if (widget.currentPlanet!.moons.isNotEmpty) {
+ if (_verticalDragStart!.dy - details.globalPosition.dy > 50.0) {
_swipeAnimController.reverse();
_slideInAnimController.forward();
}
- if (_verticalDragStart.dy - details.globalPosition.dy < 0.0) {
+ if (_verticalDragStart!.dy - details.globalPosition.dy < 0.0) {
_swipeAnimController.forward();
_slideInAnimController.reverse();
}
@@ -92,9 +98,9 @@ class PlanetPageState extends State with TickerProviderStateMixin {
final double moonsWidgetHeight = 0.125 * screenSize.height;
return TabBarView(
controller: _tabController,
- children: widget.currentPlanet.moons.map((Moon moon) {
+ children: widget.currentPlanet!.moons.map((Moon moon) {
return Stack(
- overflow: Overflow.visible,
+ clipBehavior: Clip.none,
fit: StackFit.expand,
children: [
Positioned(
@@ -108,23 +114,23 @@ class PlanetPageState extends State with TickerProviderStateMixin {
),
),
AnimatedPositioned(
- duration: Duration(milliseconds: 200),
+ duration: const Duration(milliseconds: 200),
curve: Curves.ease,
right: 0.0,
left: 0.0,
top: 1.1 * moonsWidgetHeight * _swipeAnimController.value,
child: AnimatedOpacity(
- duration: Duration(milliseconds: 200),
+ duration: const Duration(milliseconds: 200),
opacity: _swipeAnimController.value.clamp(0.4, 1.0),
child: Hero(
tag: '${moon.name}heading',
child: Text(
- moon.name.toUpperCase(),
+ moon.name!.toUpperCase(),
textAlign: TextAlign.center,
- style: Theme.of(context)
- .textTheme
- .subhead
- .copyWith(color: Colors.white, letterSpacing: 10.0),
+ style: Theme.of(context).textTheme.subtitle1!.copyWith(
+ color: Colors.white,
+ letterSpacing: 10.0,
+ ),
),
),
),
@@ -148,19 +154,19 @@ class PlanetPageState extends State with TickerProviderStateMixin {
return Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
- SizedBox(height: 10.0),
+ const SizedBox(height: 10.0),
Text(
- celestialBody.description,
+ celestialBody.description!,
textAlign: TextAlign.center,
maxLines: 2,
- style: TextStyle(
+ style: const TextStyle(
color: Colors.white54,
fontSize: 12.0,
height: 1.5,
),
),
- FlatButton(
- child: Text(
+ ElevatedButton(
+ child: const Text(
'Read More',
style: TextStyle(
color: Colors.white54,
@@ -172,7 +178,7 @@ class PlanetPageState extends State with TickerProviderStateMixin {
Navigator.of(context)
.push(
MyPageRoute(
- transDuation: Duration(milliseconds: 600),
+ transDuration: const Duration(milliseconds: 600),
builder: (BuildContext context) {
return PlanetDetailsPage(
selected: celestialBody,
@@ -216,8 +222,8 @@ class PlanetPageState extends State with TickerProviderStateMixin {
PositionedTransition(
rect: _planetRect(screenSize),
child: Hero(
- tag: widget.currentPlanet.name,
- child: CelestialBodyWidget(widget.currentPlanet.vidAssetPath),
+ tag: widget.currentPlanet!.name!,
+ child: CelestialBodyWidget(widget.currentPlanet!.vidAssetPath),
),
),
PositionedTransition(
@@ -230,9 +236,10 @@ class PlanetPageState extends State with TickerProviderStateMixin {
child: IgnorePointer(
ignoring: true,
child: SlideTransition(
- position:
- Tween(begin: Offset.zero, end: Offset(0.0, 1.0))
- .animate(_onNavigationAnimController),
+ position: Tween(
+ begin: Offset.zero,
+ end: const Offset(0.0, 1.0),
+ ).animate(_onNavigationAnimController),
child: ScaleTransition(
scale: Tween(begin: 1.0, end: 1.05)
.animate(_swipeAnimController),
@@ -244,7 +251,7 @@ class PlanetPageState extends State with TickerProviderStateMixin {
),
),
),
- widget.currentPlanet.moons.length > 0
+ widget.currentPlanet!.moons.isNotEmpty
? Positioned(
top: screenSize.height * 0.65,
bottom: screenSize.height * 0.325,
@@ -253,7 +260,7 @@ class PlanetPageState extends State with TickerProviderStateMixin {
child: Column(
children: [
_buildSwipeIndicator(_swipeAnimController.value < 1.0),
- SizedBox(height: 3.0),
+ const SizedBox(height: 3.0),
_buildSwipeIndicator(_swipeAnimController.value > 0.0),
],
),
@@ -265,8 +272,8 @@ class PlanetPageState extends State with TickerProviderStateMixin {
left: screenSize.width * 0.15,
child: SlideTransition(
position: Tween(
- begin: Offset(0.0, 1.0),
- end: Offset(0.0, 0.0),
+ begin: const Offset(0.0, 1.0),
+ end: const Offset(0.0, 0.0),
).animate(_slideInAnimController),
child: FadeTransition(
opacity: _slideInAnimController,
@@ -274,14 +281,17 @@ class PlanetPageState extends State with TickerProviderStateMixin {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Hero(
- tag: '${widget.currentPlanet.name}heading',
+ tag: '${widget.currentPlanet!.name}heading',
child: Text(
- widget.currentPlanet.name.toUpperCase(),
- style: Theme.of(context).textTheme.subhead.copyWith(
- color: Colors.white, letterSpacing: 10.0),
+ widget.currentPlanet!.name!.toUpperCase(),
+ style: Theme.of(context)
+ .textTheme
+ .subtitle1!
+ .copyWith(
+ color: Colors.white, letterSpacing: 10.0),
),
),
- _descriptionColumn(widget.currentPlanet),
+ _descriptionColumn(widget.currentPlanet!),
],
),
),
diff --git a/lib/planets_details_page.dart b/lib/app/page/planets_details_page.dart
similarity index 70%
rename from lib/planets_details_page.dart
rename to lib/app/page/planets_details_page.dart
index ab38cdd..dfc84c8 100644
--- a/lib/planets_details_page.dart
+++ b/lib/app/page/planets_details_page.dart
@@ -1,41 +1,41 @@
import 'package:flutter/material.dart';
-import 'package:flutter_xore/celestial_body_widget.dart';
-import 'package:flutter_xore/model.dart';
+import '../widgets/celestial_body_widget.dart';
+import '../model/model.dart';
class PlanetDetailsPage extends StatefulWidget {
- final CelestialBody selected;
+ final CelestialBody? selected;
- const PlanetDetailsPage({Key key, this.selected}) : super(key: key);
+ const PlanetDetailsPage({Key? key, this.selected}) : super(key: key);
@override
PlanetDetailsPageState createState() {
- return new PlanetDetailsPageState();
+ return PlanetDetailsPageState();
}
}
class PlanetDetailsPageState extends State
with SingleTickerProviderStateMixin {
- TabController _tabController;
+ TabController? _tabController;
final List _tabs = [
Tab(
child: Container(
alignment: Alignment.center,
color: Colors.grey.shade100,
- child: Text('DISCOVER'),
+ child: const Text('DISCOVER'),
),
),
Tab(
child: Container(
alignment: Alignment.center,
color: Colors.grey.shade100,
- child: Text('HISTORY'),
+ child: const Text('HISTORY'),
),
),
Tab(
child: Container(
alignment: Alignment.center,
color: Colors.grey.shade100,
- child: Text('IMAGES'),
+ child: const Text('IMAGES'),
),
)
];
@@ -48,7 +48,7 @@ class PlanetDetailsPageState extends State
@override
void dispose() {
- _tabController.dispose();
+ _tabController!.dispose();
super.dispose();
}
@@ -56,7 +56,7 @@ class PlanetDetailsPageState extends State
@override
Widget build(BuildContext context) {
final Size screenSize = MediaQuery.of(context).size;
- print(screenSize.height);
+ print('ScreenSize: ${screenSize.height}');
return Material(
color: Colors.black,
child: Stack(
@@ -66,19 +66,19 @@ class PlanetDetailsPageState extends State
left: 0.0,
right: 0.0,
child: Hero(
- tag: widget.selected.name,
- child: CelestialBodyWidget(widget.selected.vidAssetPath),
+ tag: widget.selected!.name!,
+ child: CelestialBodyWidget(widget.selected!.vidAssetPath),
),
),
Positioned(
top: screenSize.height * 0.05,
child: Hero(
- tag: '${widget.selected.name}heading',
+ tag: '${widget.selected!.name}heading',
child: Text(
- widget.selected.name.toUpperCase(),
+ widget.selected!.name!.toUpperCase(),
style: Theme.of(context)
.textTheme
- .subhead
+ .subtitle1!
.copyWith(color: Colors.white, letterSpacing: 10.0),
),
),
@@ -107,16 +107,16 @@ class PlanetDetailsPageState extends State
class InfoTabs extends StatelessWidget {
const InfoTabs({
- Key key,
- @required TabController tabController,
- @required List tabs,
- @required this.planet,
+ Key? key,
+ required TabController? tabController,
+ required List tabs,
+ required this.planet,
}) : _tabController = tabController,
_tabs = tabs,
super(key: key);
- final CelestialBody planet;
- final TabController _tabController;
+ final CelestialBody? planet;
+ final TabController? _tabController;
final List _tabs;
@override
@@ -126,9 +126,9 @@ class InfoTabs extends StatelessWidget {
TabBar(
controller: _tabController,
tabs: _tabs,
- labelPadding: EdgeInsets.all(0.0),
+ labelPadding: const EdgeInsets.all(0.0),
labelColor: Colors.grey.shade600,
- labelStyle: TextStyle(letterSpacing: 3.0),
+ labelStyle: const TextStyle(letterSpacing: 3.0),
indicatorColor: Colors.grey.shade600,
indicatorWeight: 4.0,
indicatorSize: TabBarIndicatorSize.label,
@@ -139,22 +139,22 @@ class InfoTabs extends StatelessWidget {
children: [
_buildInfo(
context,
- heading: planet.name,
- intro: planet.intro,
+ heading: planet!.name,
+ intro: planet!.intro,
subHeading: 'Formation',
- desc: planet.formation,
+ desc: planet!.formation,
),
_buildInfo(
context,
- heading: 'History of ${planet.name}',
- intro: planet.intro,
+ heading: 'History of ${planet!.name}',
+ intro: planet!.intro,
subHeading: 'Details',
- desc: planet.history,
+ desc: planet!.history,
),
GridView.builder(
itemCount: 10,
- padding: EdgeInsets.all(20.0),
- gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+ padding: const EdgeInsets.all(20.0),
+ gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: 1,
crossAxisSpacing: 10.0,
@@ -174,25 +174,25 @@ class InfoTabs extends StatelessWidget {
}
ListView _buildInfo(BuildContext context,
- {String heading, String subHeading, String intro, String desc}) {
+ {String? heading, String? subHeading, String? intro, String? desc}) {
return ListView(
- padding: EdgeInsets.all(25.0),
+ padding: const EdgeInsets.all(25.0),
children: [
Text(
'The $heading',
- style: TextStyle(
+ style: const TextStyle(
color: Colors.black,
fontSize: 30.0,
fontWeight: FontWeight.bold,
),
),
- SizedBox(height: 30.0),
+ const SizedBox(height: 30.0),
Text(
'$intro',
- style: TextStyle(height: 1.25),
+ style: const TextStyle(height: 1.25),
),
Container(
- padding: EdgeInsets.symmetric(vertical: 30.0),
+ padding: const EdgeInsets.symmetric(vertical: 30.0),
height: 200.0,
child: ListView.builder(
scrollDirection: Axis.horizontal,
@@ -211,12 +211,12 @@ class InfoTabs extends StatelessWidget {
),
Text(
'$subHeading',
- style: Theme.of(context).textTheme.title,
+ style: Theme.of(context).textTheme.headline6,
),
- SizedBox(height: 30.0),
+ const SizedBox(height: 30.0),
Text(
'$desc',
- style: TextStyle(height: 1.25),
+ style: const TextStyle(height: 1.25),
),
],
);
diff --git a/lib/planet_name.dart b/lib/app/static/planet_name.dart
similarity index 62%
rename from lib/planet_name.dart
rename to lib/app/static/planet_name.dart
index 456201c..51fc465 100644
--- a/lib/planet_name.dart
+++ b/lib/app/static/planet_name.dart
@@ -1,20 +1,21 @@
+// ignore: library_prefixes
import 'dart:math' as Math;
import 'package:flutter/material.dart';
class PlanetName extends StatefulWidget {
- final String name;
+ final String? name;
- const PlanetName({Key key, this.name}) : super(key: key);
+ const PlanetName({Key? key, this.name}) : super(key: key);
@override
PlanetNameState createState() {
- return new PlanetNameState();
+ return PlanetNameState();
}
}
class PlanetNameState extends State with TickerProviderStateMixin {
- static const List alphabets = const [
+ static const List alphabets = [
'A',
'B',
'C',
@@ -46,22 +47,24 @@ class PlanetNameState extends State with TickerProviderStateMixin {
@override
void initState() {
super.initState();
- _setUpControllers(widget.name.split(''), widget.name.split(''));
+ _setUpControllers(widget.name!.split(''), widget.name!.split(''));
}
@override
void didUpdateWidget(PlanetName oldWidget) {
if (widget.name != oldWidget.name) {
int min;
- if (oldWidget.name.length != widget.name.length) {
- min = Math.min(oldWidget.name.length, widget.name.length);
+ if (oldWidget.name!.length != widget.name!.length) {
+ min = Math.min(oldWidget.name!.length, widget.name!.length);
} else {
- min = oldWidget.name.length;
+ min = oldWidget.name!.length;
}
- final List oldTextChars = []
- ..addAll(oldWidget.name.substring(0, min).split(''));
- final List newTextChars = []
- ..addAll(widget.name.substring(0, min).split(''));
+ final List oldTextChars = [
+ ...oldWidget.name!.substring(0, min).split('')
+ ];
+ final List newTextChars = [
+ ...widget.name!.substring(0, min).split('')
+ ];
_cleanUpControllers();
_setUpControllers(newTextChars, oldTextChars);
@@ -77,9 +80,10 @@ class PlanetNameState extends State with TickerProviderStateMixin {
void _setUpControllers(List newLetters, List oldLetters) {
for (int i = 0; i < newLetters.length; i++) {
- AnimationController cntrllr = AnimationController(
- duration: Duration(milliseconds: 1000), vsync: this)
- ..addListener(() {
+ AnimationController controller = AnimationController(
+ duration: const Duration(milliseconds: 1000),
+ vsync: this,
+ )..addListener(() {
setState(() {});
});
@@ -88,15 +92,15 @@ class PlanetNameState extends State with TickerProviderStateMixin {
end: alphabets.indexOf(newLetters[i]),
);
- textChars.add({'cntrllr': cntrllr, 'tween': tween});
- cntrllr.forward();
+ textChars.add({'controller': controller, 'tween': tween});
+ controller.forward();
}
}
void _cleanUpControllers() {
- textChars.forEach((f) {
- f['cntrllr'].dispose();
- });
+ for (var f in textChars) {
+ f['controller'].dispose();
+ }
textChars = [];
}
@@ -105,16 +109,16 @@ class PlanetNameState extends State with TickerProviderStateMixin {
return RichText(
overflow: TextOverflow.ellipsis,
text: TextSpan(
- style: Theme.of(context).textTheme.display3.copyWith(
+ style: Theme.of(context).textTheme.headline2!.copyWith(
letterSpacing: 10.0,
fontWeight: FontWeight.w200,
fontSize: 85.0,
color: Colors.grey.shade400,
),
- children: textChars.length == 0
+ children: textChars.isEmpty
? []
: textChars.map((Map f) {
- final i = f['tween'].animate(f['cntrllr']).value;
+ final i = f['tween'].animate(f['controller']).value;
return TextSpan(
text: alphabets[i],
);
diff --git a/lib/celestial_body_widget.dart b/lib/app/widgets/celestial_body_widget.dart
similarity index 84%
rename from lib/celestial_body_widget.dart
rename to lib/app/widgets/celestial_body_widget.dart
index a1e0fb7..906bb93 100644
--- a/lib/celestial_body_widget.dart
+++ b/lib/app/widgets/celestial_body_widget.dart
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
class CelestialBodyWidget extends StatelessWidget {
- final String imagePath;
+ final String? imagePath;
- const CelestialBodyWidget(this.imagePath, {Key key}) : super(key: key);
+ const CelestialBodyWidget(this.imagePath, {Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
@@ -22,7 +22,7 @@ class CelestialBodyWidget extends StatelessWidget {
),
),
child: Image.asset(
- imagePath,
+ imagePath!,
fit: BoxFit.contain,
),
);
diff --git a/lib/planet_selector.dart b/lib/app/widgets/planet_selector.dart
similarity index 75%
rename from lib/planet_selector.dart
rename to lib/app/widgets/planet_selector.dart
index 28c6052..b6420d8 100644
--- a/lib/planet_selector.dart
+++ b/lib/app/widgets/planet_selector.dart
@@ -1,20 +1,20 @@
import 'dart:math';
import 'package:flutter/material.dart';
-import 'package:flutter_xore/model.dart';
-import 'package:flutter_xore/planet_widget.dart';
+import '../model/model.dart';
+import 'planet_widget.dart';
class PlanetSelector extends StatefulWidget {
- final List planets;
- final int currentPlanetIndex;
- final Function onArrowClick;
- final VoidCallback onPlanetClicked;
+ final List? planets;
+ final int? currentPlanetIndex;
+ final Function? onArrowClick;
+ final VoidCallback? onPlanetClicked;
const PlanetSelector({
- Key key,
+ Key? key,
this.planets,
this.currentPlanetIndex,
- @required this.screenSize,
+ required this.screenSize,
this.onArrowClick,
this.onPlanetClicked,
}) : super(key: key);
@@ -23,27 +23,28 @@ class PlanetSelector extends StatefulWidget {
@override
PlanetSelectorState createState() {
- return new PlanetSelectorState();
+ return PlanetSelectorState();
}
}
class PlanetSelectorState extends State
with SingleTickerProviderStateMixin {
- AnimationController _controller;
- Tween _rotationTween;
+ late AnimationController _controller;
+ late Tween _rotationTween;
@override
initState() {
super.initState();
- _controller =
- AnimationController(duration: Duration(milliseconds: 500), vsync: this)
- ..addListener(() {
- setState(() {});
- });
+ _controller = AnimationController(
+ duration: const Duration(milliseconds: 500),
+ vsync: this,
+ )..addListener(() {
+ setState(() {});
+ });
_rotationTween = Tween(
begin: 0.0,
- end: widget.currentPlanetIndex.toDouble(),
+ end: widget.currentPlanetIndex!.toDouble(),
);
_controller.forward();
@@ -54,7 +55,7 @@ class PlanetSelectorState extends State
if (widget.currentPlanetIndex != oldWidget.currentPlanetIndex) {
_rotationTween = Tween(
begin: _rotationTween.evaluate(_controller),
- end: widget.currentPlanetIndex.toDouble(),
+ end: widget.currentPlanetIndex!.toDouble(),
);
_controller.forward(from: 0.0);
@@ -84,17 +85,17 @@ class PlanetSelectorState extends State
opacity: _controller,
child: GestureDetector(
onTap: () {
- widget.onPlanetClicked();
+ widget.onPlanetClicked!();
},
child: Container(
padding: const EdgeInsets.only(top: 40.0),
- decoration: BoxDecoration(
+ decoration: const BoxDecoration(
border: Border(
bottom: BorderSide(color: Colors.grey, width: 2.5),
)),
child: Text(
- '${widget.planets[widget.currentPlanetIndex].name.toUpperCase()}',
- style: TextStyle(
+ widget.planets![widget.currentPlanetIndex!].name!.toUpperCase(),
+ style: const TextStyle(
color: Colors.grey,
fontSize: 20.0,
fontWeight: FontWeight.w500,
@@ -110,16 +111,16 @@ class PlanetSelectorState extends State
return Align(
alignment: Alignment.topLeft,
child: FractionalTranslation(
- translation: Offset(1.0, -0.5),
+ translation: const Offset(1.0, -0.5),
child: IconButton(
- icon: Icon(
+ icon: const Icon(
Icons.chevron_left,
size: 35.0,
),
onPressed: widget.currentPlanetIndex == 0
? null
: () {
- widget.onArrowClick(ClickDirection.Left);
+ widget.onArrowClick!(ClickDirection.Left);
},
),
),
@@ -130,16 +131,16 @@ class PlanetSelectorState extends State
return Align(
alignment: Alignment.topRight,
child: FractionalTranslation(
- translation: Offset(-1.0, -0.5),
+ translation: const Offset(-1.0, -0.5),
child: IconButton(
- icon: Icon(
+ icon: const Icon(
Icons.chevron_right,
size: 35.0,
),
onPressed: widget.currentPlanetIndex == planets.length - 1
? null
: () {
- widget.onArrowClick(ClickDirection.Right);
+ widget.onArrowClick!(ClickDirection.Right);
},
),
),
@@ -156,7 +157,7 @@ class PlanetSelectorState extends State
_rightArrowButton()
];
- for (int i = 0; i < widget.planets.length; i++) {
+ for (int i = 0; i < widget.planets!.length; i++) {
final double radialOffset = _widgetHeight / 2;
final double radianDiff = (2 * pi) / planets.length;
final double rotationFactor = _rotationTween.animate(_controller).value;
@@ -176,7 +177,7 @@ class PlanetSelectorState extends State
);
}
- return Container(
+ return SizedBox(
height: _widgetHeight,
child: Stack(
alignment: Alignment.center,
@@ -186,4 +187,5 @@ class PlanetSelectorState extends State
}
}
+// ignore: constant_identifier_names
enum ClickDirection { Left, Right }
diff --git a/lib/planet_widget.dart b/lib/app/widgets/planet_widget.dart
similarity index 71%
rename from lib/planet_widget.dart
rename to lib/app/widgets/planet_widget.dart
index 168f8a4..dc33c95 100644
--- a/lib/planet_widget.dart
+++ b/lib/app/widgets/planet_widget.dart
@@ -1,13 +1,13 @@
import 'dart:math';
import 'package:flutter/material.dart';
-import 'package:flutter_xore/model.dart';
+import '../model/model.dart';
class PlanetWidget extends StatefulWidget {
- final Planet planet;
+ final Planet? planet;
final bool currentlyInMainPos;
- const PlanetWidget({Key key, this.planet, this.currentlyInMainPos = false})
+ const PlanetWidget({Key? key, this.planet, this.currentlyInMainPos = false})
: super(key: key);
@override
_PlanetWidgetState createState() => _PlanetWidgetState();
@@ -17,21 +17,21 @@ class _PlanetWidgetState extends State
with TickerProviderStateMixin {
final double constDiameter = 25.0;
final double moonOrbitRadius = 20.0;
- AnimationController _rotationController;
- AnimationController _moonOrbitLengthController;
- Animation _moonOrbitLength;
+ late AnimationController _rotationController;
+ late AnimationController _moonOrbitLengthController;
+ late Animation _moonOrbitLength;
@override
void initState() {
super.initState();
_rotationController =
- AnimationController(duration: Duration(seconds: 4), vsync: this);
+ AnimationController(duration: const Duration(seconds: 4), vsync: this,);
if (hasMoons) {
_rotationController.repeat();
}
_moonOrbitLengthController =
- AnimationController(duration: Duration(milliseconds: 700), vsync: this)
+ AnimationController(duration: const Duration(milliseconds: 700), vsync: this,)
..addListener(() {
setState(() {});
});
@@ -54,13 +54,13 @@ class _PlanetWidgetState extends State
super.dispose();
}
- bool get hasMoons => widget.planet.moons.length != 0;
+ bool get hasMoons => widget.planet!.moons.isNotEmpty;
- Widget _buildCelestialBody({@required CelestialBody body}) {
+ Widget _buildCelestialBody({required CelestialBody body}) {
return Center(
child: Container(
- width: body.diameter * constDiameter,
- height: body.diameter * constDiameter,
+ width: body.diameter! * constDiameter,
+ height: body.diameter! * constDiameter,
decoration: BoxDecoration(
color: body.color,
shape: BoxShape.circle,
@@ -71,12 +71,12 @@ class _PlanetWidgetState extends State
@override
Widget build(BuildContext context) {
- final Planet planet = widget.planet;
+ final Planet planet = widget.planet!;
final List moons = planet.moons;
final List bodies = [_buildCelestialBody(body: planet)];
- if (moons.length > 0 && widget.currentlyInMainPos) {
+ if (moons.isNotEmpty && widget.currentlyInMainPos) {
for (int i = 0; i < moons.length; i++) {
final double radians = (2 * pi / moons.length) * i;
final double dx = _moonOrbitLength.value * cos(radians);
@@ -93,11 +93,11 @@ class _PlanetWidgetState extends State
return RotationTransition(
turns: _rotationController,
- child: Container(
+ child: SizedBox(
width: 100.0,
height: 100.0,
child: Stack(
- overflow: Overflow.visible,
+ clipBehavior: Clip.none,
children: bodies,
),
),
diff --git a/lib/main.dart b/lib/main.dart
index 297200a..99e854c 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -2,38 +2,44 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
-import 'package:flutter_xore/astronaut.dart';
-import 'package:flutter_xore/model.dart';
-import 'package:flutter_xore/planet_name.dart';
-import 'package:flutter_xore/planet_selector.dart';
+import 'app/page/astronaut.dart';
+import 'app/model/model.dart';
+import 'app/static/planet_name.dart';
+import 'app/widgets/planet_selector.dart';
-void main() => runApp(MyApp());
+void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
+ const MyApp({Key? key}) : super(key: key);
+
@override
Widget build(BuildContext context) {
- SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp ]);
- return MaterialApp(
+ SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
+ return const MaterialApp(
+ debugShowCheckedModeBanner: false,
home: HomePage(),
);
}
}
class HomePage extends StatefulWidget {
+ const HomePage({Key? key}) : super(key: key);
+
@override
HomePageState createState() {
- return new HomePageState();
+ return HomePageState();
}
}
class HomePageState extends State {
final List _planets = planets;
int _currentPlanetIndex = 2;
- final StreamController _navigationStreamCntrllr =
+ final StreamController _navigationStreamController =
StreamController.broadcast();
+ @override
dispose() {
- _navigationStreamCntrllr.close();
+ _navigationStreamController.close();
super.dispose();
}
@@ -61,17 +67,18 @@ class HomePageState extends State {
Align(
alignment: Alignment.bottomCenter,
child: FractionalTranslation(
- translation: Offset(0.0, 0.65),
+ translation: const Offset(0.0, 0.65),
child: PlanetSelector(
screenSize: screenSize,
planets: _planets,
currentPlanetIndex: _currentPlanetIndex,
onArrowClick: _handleArrowClick,
- onPlanetClicked: () => _navigationStreamCntrllr.sink.add(null),
+ onPlanetClicked: () =>
+ _navigationStreamController.sink.add(null),
),
),
),
- Container(
+ SizedBox(
height: screenSize.height * 0.8,
width: double.infinity,
child: Stack(
@@ -82,9 +89,9 @@ class HomePageState extends State {
quarterTurns: 1,
child: Container(
width: 400.0,
- padding: EdgeInsets.only(left: 50.0),
+ padding: const EdgeInsets.only(left: 50.0),
child: PlanetName(
- name: _planets[_currentPlanetIndex].name.toUpperCase(),
+ name: _planets[_currentPlanetIndex].name!.toUpperCase(),
),
),
),
@@ -95,7 +102,7 @@ class HomePageState extends State {
size: screenSize,
planets: _planets,
currentPlanetIndex: _currentPlanetIndex,
- shouldNavigate: _navigationStreamCntrllr.stream,
+ shouldNavigate: _navigationStreamController.stream,
),
),
],
diff --git a/lib/custom_page_routes.dart b/lib/routes.dart
similarity index 67%
rename from lib/custom_page_routes.dart
rename to lib/routes.dart
index e852073..40ff317 100644
--- a/lib/custom_page_routes.dart
+++ b/lib/routes.dart
@@ -1,11 +1,11 @@
import 'package:flutter/material.dart';
class MyPageRoute extends MaterialPageRoute {
- final Duration transDuation;
+ final Duration transDuration;
MyPageRoute({
- this.transDuation = const Duration(milliseconds: 1000),
- WidgetBuilder builder,
- RouteSettings settings,
+ this.transDuration = const Duration(milliseconds: 1000),
+ required WidgetBuilder builder,
+ RouteSettings? settings,
}) : super(builder: builder, settings: settings);
// @override
@@ -18,5 +18,5 @@ class MyPageRoute extends MaterialPageRoute {
// }
@override
- Duration get transitionDuration => transDuation;
+ Duration get transitionDuration => transDuration;
}
diff --git a/pubspec.yaml b/pubspec.yaml
index df6d041..eebfb49 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -3,7 +3,7 @@ description: A new Flutter project.
version: 1.0.0+1
environment:
- sdk: ">=2.0.0 <3.0.0"
+ sdk: '>=2.12.0 <3.0.0'
dependencies:
flutter:
@@ -12,6 +12,8 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
+
+ flutter_lints: ^1.0.0
flutter:
uses-material-design: true
diff --git a/screenshots/badges/Dart-0175C2.svg b/screenshots/badges/Dart-0175C2.svg
new file mode 100644
index 0000000..0659ff3
--- /dev/null
+++ b/screenshots/badges/Dart-0175C2.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/screenshots/badges/Flutter-02569B.svg b/screenshots/badges/Flutter-02569B.svg
new file mode 100644
index 0000000..4753901
--- /dev/null
+++ b/screenshots/badges/Flutter-02569B.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/screenshots/badges/Flutter-3.svg b/screenshots/badges/Flutter-3.svg
new file mode 100644
index 0000000..d50f054
--- /dev/null
+++ b/screenshots/badges/Flutter-3.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/screenshots/badges/built-with-love.svg b/screenshots/badges/built-with-love.svg
new file mode 100644
index 0000000..02d42c8
--- /dev/null
+++ b/screenshots/badges/built-with-love.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/screenshots/badges/dart-null_safety-blue.svg b/screenshots/badges/dart-null_safety-blue.svg
new file mode 100644
index 0000000..84f0701
--- /dev/null
+++ b/screenshots/badges/dart-null_safety-blue.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/screenshots/badges/flutter-dart.svg b/screenshots/badges/flutter-dart.svg
new file mode 100644
index 0000000..7682eb9
--- /dev/null
+++ b/screenshots/badges/flutter-dart.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/screenshots/badges/license-MIT.svg b/screenshots/badges/license-MIT.svg
new file mode 100644
index 0000000..e2a4e03
--- /dev/null
+++ b/screenshots/badges/license-MIT.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/screenshots/gif/demo.gif b/screenshots/gif/demo.gif
new file mode 100644
index 0000000..551a4fb
Binary files /dev/null and b/screenshots/gif/demo.gif differ
diff --git a/screenshots/gif/demo_2.gif b/screenshots/gif/demo_2.gif
new file mode 100644
index 0000000..1962477
Binary files /dev/null and b/screenshots/gif/demo_2.gif differ
diff --git a/screenshots/store_icons/appstore.png b/screenshots/store_icons/appstore.png
new file mode 100644
index 0000000..8694a34
Binary files /dev/null and b/screenshots/store_icons/appstore.png differ
diff --git a/screenshots/store_icons/playstore.png b/screenshots/store_icons/playstore.png
new file mode 100644
index 0000000..4f30fc7
Binary files /dev/null and b/screenshots/store_icons/playstore.png differ
diff --git a/test/widget_test.dart b/test/widget_test.dart
index dae4583..2584ac5 100644
--- a/test/widget_test.dart
+++ b/test/widget_test.dart
@@ -12,7 +12,7 @@ import 'package:flutter_xore/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
- await tester.pumpWidget(new MyApp());
+ await tester.pumpWidget(const MyApp());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
diff --git a/web/favicon.png b/web/favicon.png
new file mode 100644
index 0000000..8aaa46a
Binary files /dev/null and b/web/favicon.png differ
diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png
new file mode 100644
index 0000000..b749bfe
Binary files /dev/null and b/web/icons/Icon-192.png differ
diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png
new file mode 100644
index 0000000..88cfd48
Binary files /dev/null and b/web/icons/Icon-512.png differ
diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png
new file mode 100644
index 0000000..eb9b4d7
Binary files /dev/null and b/web/icons/Icon-maskable-192.png differ
diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png
new file mode 100644
index 0000000..d69c566
Binary files /dev/null and b/web/icons/Icon-maskable-512.png differ
diff --git a/web/index.html b/web/index.html
new file mode 100644
index 0000000..93bb482
--- /dev/null
+++ b/web/index.html
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ flutter_xore
+
+
+
+
+
+
+
+
+
+
diff --git a/web/manifest.json b/web/manifest.json
new file mode 100644
index 0000000..7a04427
--- /dev/null
+++ b/web/manifest.json
@@ -0,0 +1,35 @@
+{
+ "name": "flutter_xore",
+ "short_name": "flutter_xore",
+ "start_url": ".",
+ "display": "standalone",
+ "background_color": "#0175C2",
+ "theme_color": "#0175C2",
+ "description": "A new Flutter project.",
+ "orientation": "portrait-primary",
+ "prefer_related_applications": false,
+ "icons": [
+ {
+ "src": "icons/Icon-192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "icons/Icon-512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ },
+ {
+ "src": "icons/Icon-maskable-192.png",
+ "sizes": "192x192",
+ "type": "image/png",
+ "purpose": "maskable"
+ },
+ {
+ "src": "icons/Icon-maskable-512.png",
+ "sizes": "512x512",
+ "type": "image/png",
+ "purpose": "maskable"
+ }
+ ]
+}