initial commit
|
@ -0,0 +1 @@
|
|||
TMDB_API_KEY="eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJkMTc4NDg0Zjk1ZDI3ZDBjMzMyZTg3MDEyOWQyZjY0NSIsIm5iZiI6MTczMDIyOTM4OS4yMzYxNjUzLCJzdWIiOiI2NjYzM2FkODc1NWMxYzEzYWRmMGVkN2MiLCJzY29wZXMiOlsiYXBpX3JlYWQiXSwidmVyc2lvbiI6MX0.1OSY4s6LofPCfMX2jOfdxehloUqkm26f_1xOIH3ZGaA"
|
|
@ -0,0 +1,48 @@
|
|||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.build/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
.swiftpm/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
||||
|
||||
# FVM Version Cache
|
||||
.fvm/
|
|
@ -0,0 +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.
|
||||
|
||||
version:
|
||||
revision: "ea121f8859e4b13e47a8f845e4586164519588bc"
|
||||
channel: "stable"
|
||||
|
||||
project_type: app
|
||||
|
||||
# Tracks metadata for the flutter migrate command
|
||||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: ea121f8859e4b13e47a8f845e4586164519588bc
|
||||
base_revision: ea121f8859e4b13e47a8f845e4586164519588bc
|
||||
- platform: android
|
||||
create_revision: ea121f8859e4b13e47a8f845e4586164519588bc
|
||||
base_revision: ea121f8859e4b13e47a8f845e4586164519588bc
|
||||
|
||||
# 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'
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"dart.flutterSdkPath": ".fvm/versions/3.0.0"
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
# skripsi_getit
|
||||
|
||||
A new Flutter project.
|
||||
|
||||
## Getting Started
|
||||
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||
|
||||
For help getting started with Flutter development, view the
|
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
|
@ -0,0 +1,28 @@
|
|||
# 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.dev/lints.
|
||||
#
|
||||
# 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
|
|
@ -0,0 +1,14 @@
|
|||
gradle-wrapper.jar
|
||||
/.gradle
|
||||
/captures/
|
||||
/gradlew
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
GeneratedPluginRegistrant.java
|
||||
.cxx/
|
||||
|
||||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/to/reference-keystore
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
|
@ -0,0 +1,44 @@
|
|||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.example.skripsi_getit"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId = "com.example.skripsi_getit"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||
minSdk = flutter.minSdkVersion
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
|
@ -0,0 +1,45 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application
|
||||
android:label="skripsi_getit"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
<!-- Required to query activities that can process text, see:
|
||||
https://developer.android.com/training/package-visibility and
|
||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||||
|
||||
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
|
@ -0,0 +1,5 @@
|
|||
package com.example.skripsi_getit
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity : FlutterActivity()
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
After Width: | Height: | Size: 544 B |
After Width: | Height: | Size: 442 B |
After Width: | Height: | Size: 721 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -0,0 +1,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
|
@ -0,0 +1,21 @@
|
|||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
|
||||
rootProject.layout.buildDirectory.value(newBuildDir)
|
||||
|
||||
subprojects {
|
||||
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
|
||||
project.layout.buildDirectory.value(newSubprojectBuildDir)
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(":app")
|
||||
}
|
||||
|
||||
tasks.register<Delete>("clean") {
|
||||
delete(rootProject.layout.buildDirectory)
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
|
@ -0,0 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
|
@ -0,0 +1,25 @@
|
|||
pluginManagement {
|
||||
val flutterSdkPath = run {
|
||||
val properties = java.util.Properties()
|
||||
file("local.properties").inputStream().use { properties.load(it) }
|
||||
val flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
|
||||
flutterSdkPath
|
||||
}
|
||||
|
||||
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
||||
id("com.android.application") version "8.7.0" apply false
|
||||
id("org.jetbrains.kotlin.android") version "1.8.22" apply false
|
||||
}
|
||||
|
||||
include(":app")
|
|
@ -0,0 +1,3 @@
|
|||
description: This file stores settings for Dart & Flutter DevTools.
|
||||
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
|
||||
extensions:
|
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 2.0 KiB |
|
@ -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
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>12.0</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1 @@
|
|||
#include "Generated.xcconfig"
|
|
@ -0,0 +1 @@
|
|||
#include "Generated.xcconfig"
|
|
@ -0,0 +1,616 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
|
||||
remoteInfo = Runner;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */,
|
||||
);
|
||||
path = RunnerTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
331C8082294A63A400263BE5 /* RunnerTests */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
331C8080294A63A400263BE5 /* RunnerTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||
buildPhases = (
|
||||
331C807D294A63A400263BE5 /* Sources */,
|
||||
331C807F294A63A400263BE5 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
331C8086294A63A400263BE5 /* PBXTargetDependency */,
|
||||
);
|
||||
name = RunnerTests;
|
||||
productName = RunnerTests;
|
||||
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 1510;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
331C8080294A63A400263BE5 = {
|
||||
CreatedOnToolsVersion = 14.0;
|
||||
TestTargetID = 97C146ED1CF9000F007C117D;
|
||||
};
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
331C8080294A63A400263BE5 /* RunnerTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
331C807F294A63A400263BE5 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
331C807D294A63A400263BE5 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 97C146ED1CF9000F007C117D /* Runner */;
|
||||
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C146FB1CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
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;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
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 = 12.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.skripsiGetit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
331C8088294A63A400263BE5 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.skripsiGetit.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
331C8089294A63A400263BE5 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.skripsiGetit.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
331C808A294A63A400263BE5 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.skripsiGetit.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
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;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
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 = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
97C147061CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.skripsiGetit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147071CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.skripsiGetit;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
331C8088294A63A400263BE5 /* Debug */,
|
||||
331C8089294A63A400263BE5 /* Release */,
|
||||
331C808A294A63A400263BE5 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147031CF9000F007C117D /* Debug */,
|
||||
97C147041CF9000F007C117D /* Release */,
|
||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147061CF9000F007C117D /* Debug */,
|
||||
97C147071CF9000F007C117D /* Release */,
|
||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1510"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO"
|
||||
parallelizable = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "331C8080294A63A400263BE5"
|
||||
BuildableName = "RunnerTests.xctest"
|
||||
BlueprintName = "RunnerTests"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
enableGPUValidationMode = "1"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,13 @@
|
|||
import Flutter
|
||||
import UIKit
|
||||
|
||||
@main
|
||||
@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)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 295 B |
After Width: | Height: | Size: 406 B |
After Width: | Height: | Size: 450 B |
After Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 704 B |
After Width: | Height: | Size: 406 B |
After Width: | Height: | Size: 586 B |
After Width: | Height: | Size: 862 B |
After Width: | Height: | Size: 862 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 762 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 68 B |
|
@ -0,0 +1,5 @@
|
|||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Skripsi Getit</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>skripsi_getit</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1 @@
|
|||
#import "GeneratedPluginRegistrant.h"
|
|
@ -0,0 +1,12 @@
|
|||
import Flutter
|
||||
import UIKit
|
||||
import XCTest
|
||||
|
||||
class RunnerTests: XCTestCase {
|
||||
|
||||
func testExample() {
|
||||
// If you add code to the Runner application, consider adding tests here.
|
||||
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,261 @@
|
|||
class DetailMovie {
|
||||
bool? adult;
|
||||
String? backdropPath;
|
||||
BelongsToCollection? belongsToCollection;
|
||||
int? budget;
|
||||
List<Genres>? genres;
|
||||
String? homepage;
|
||||
int? id;
|
||||
String? imdbId;
|
||||
List<String>? originCountry;
|
||||
String? originalLanguage;
|
||||
String? originalTitle;
|
||||
String? overview;
|
||||
double? popularity;
|
||||
String? posterPath;
|
||||
List<ProductionCompanies>? productionCompanies;
|
||||
List<ProductionCountries>? productionCountries;
|
||||
String? releaseDate;
|
||||
int? revenue;
|
||||
int? runtime;
|
||||
List<SpokenLanguages>? spokenLanguages;
|
||||
String? status;
|
||||
String? tagline;
|
||||
String? title;
|
||||
bool? video;
|
||||
double? voteAverage;
|
||||
int? voteCount;
|
||||
|
||||
DetailMovie(
|
||||
{this.adult,
|
||||
this.backdropPath,
|
||||
this.belongsToCollection,
|
||||
this.budget,
|
||||
this.genres,
|
||||
this.homepage,
|
||||
this.id,
|
||||
this.imdbId,
|
||||
this.originCountry,
|
||||
this.originalLanguage,
|
||||
this.originalTitle,
|
||||
this.overview,
|
||||
this.popularity,
|
||||
this.posterPath,
|
||||
this.productionCompanies,
|
||||
this.productionCountries,
|
||||
this.releaseDate,
|
||||
this.revenue,
|
||||
this.runtime,
|
||||
this.spokenLanguages,
|
||||
this.status,
|
||||
this.tagline,
|
||||
this.title,
|
||||
this.video,
|
||||
this.voteAverage,
|
||||
this.voteCount});
|
||||
|
||||
DetailMovie.fromJson(Map<String, dynamic> json) {
|
||||
adult = json['adult'];
|
||||
backdropPath = json['backdrop_path'];
|
||||
belongsToCollection = json['belongs_to_collection'] != null
|
||||
? new BelongsToCollection.fromJson(json['belongs_to_collection'])
|
||||
: null;
|
||||
budget = json['budget'];
|
||||
if (json['genres'] != null) {
|
||||
genres = <Genres>[];
|
||||
json['genres'].forEach((v) {
|
||||
genres!.add(new Genres.fromJson(v));
|
||||
});
|
||||
}
|
||||
homepage = json['homepage'];
|
||||
id = json['id'];
|
||||
imdbId = json['imdb_id'];
|
||||
originCountry = json['origin_country'].cast<String>();
|
||||
originalLanguage = json['original_language'];
|
||||
originalTitle = json['original_title'];
|
||||
overview = json['overview'];
|
||||
popularity = json['popularity'];
|
||||
posterPath = json['poster_path'];
|
||||
if (json['production_companies'] != null) {
|
||||
productionCompanies = <ProductionCompanies>[];
|
||||
json['production_companies'].forEach((v) {
|
||||
productionCompanies!.add(new ProductionCompanies.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['production_countries'] != null) {
|
||||
productionCountries = <ProductionCountries>[];
|
||||
json['production_countries'].forEach((v) {
|
||||
productionCountries!.add(new ProductionCountries.fromJson(v));
|
||||
});
|
||||
}
|
||||
releaseDate = json['release_date'];
|
||||
revenue = json['revenue'];
|
||||
runtime = json['runtime'];
|
||||
if (json['spoken_languages'] != null) {
|
||||
spokenLanguages = <SpokenLanguages>[];
|
||||
json['spoken_languages'].forEach((v) {
|
||||
spokenLanguages!.add(new SpokenLanguages.fromJson(v));
|
||||
});
|
||||
}
|
||||
status = json['status'];
|
||||
tagline = json['tagline'];
|
||||
title = json['title'];
|
||||
video = json['video'];
|
||||
voteAverage = json['vote_average'];
|
||||
voteCount = json['vote_count'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['adult'] = this.adult;
|
||||
data['backdrop_path'] = this.backdropPath;
|
||||
if (this.belongsToCollection != null) {
|
||||
data['belongs_to_collection'] = this.belongsToCollection!.toJson();
|
||||
}
|
||||
data['budget'] = this.budget;
|
||||
if (this.genres != null) {
|
||||
data['genres'] = this.genres!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['homepage'] = this.homepage;
|
||||
data['id'] = this.id;
|
||||
data['imdb_id'] = this.imdbId;
|
||||
data['origin_country'] = this.originCountry;
|
||||
data['original_language'] = this.originalLanguage;
|
||||
data['original_title'] = this.originalTitle;
|
||||
data['overview'] = this.overview;
|
||||
data['popularity'] = this.popularity;
|
||||
data['poster_path'] = this.posterPath;
|
||||
if (this.productionCompanies != null) {
|
||||
data['production_companies'] =
|
||||
this.productionCompanies!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this.productionCountries != null) {
|
||||
data['production_countries'] =
|
||||
this.productionCountries!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['release_date'] = this.releaseDate;
|
||||
data['revenue'] = this.revenue;
|
||||
data['runtime'] = this.runtime;
|
||||
if (this.spokenLanguages != null) {
|
||||
data['spoken_languages'] =
|
||||
this.spokenLanguages!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['status'] = this.status;
|
||||
data['tagline'] = this.tagline;
|
||||
data['title'] = this.title;
|
||||
data['video'] = this.video;
|
||||
data['vote_average'] = this.voteAverage;
|
||||
data['vote_count'] = this.voteCount;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class BelongsToCollection {
|
||||
int? id;
|
||||
String? name;
|
||||
String? posterPath;
|
||||
String? backdropPath;
|
||||
|
||||
BelongsToCollection({this.id, this.name, this.posterPath, this.backdropPath});
|
||||
|
||||
BelongsToCollection.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
posterPath = json['poster_path'];
|
||||
backdropPath = json['backdrop_path'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['poster_path'] = this.posterPath;
|
||||
data['backdrop_path'] = this.backdropPath;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Genres {
|
||||
int? id;
|
||||
String? name;
|
||||
|
||||
Genres({this.id, this.name});
|
||||
|
||||
Genres.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ProductionCompanies {
|
||||
int? id;
|
||||
String? logoPath;
|
||||
String? name;
|
||||
String? originCountry;
|
||||
|
||||
ProductionCompanies({this.id, this.logoPath, this.name, this.originCountry});
|
||||
|
||||
ProductionCompanies.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
logoPath = json['logo_path'];
|
||||
name = json['name'];
|
||||
originCountry = json['origin_country'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['logo_path'] = this.logoPath;
|
||||
data['name'] = this.name;
|
||||
data['origin_country'] = this.originCountry;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ProductionCountries {
|
||||
String? iso31661;
|
||||
String? name;
|
||||
|
||||
ProductionCountries({this.iso31661, this.name});
|
||||
|
||||
ProductionCountries.fromJson(Map<String, dynamic> json) {
|
||||
iso31661 = json['iso_3166_1'];
|
||||
name = json['name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['iso_3166_1'] = this.iso31661;
|
||||
data['name'] = this.name;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class SpokenLanguages {
|
||||
String? englishName;
|
||||
String? iso6391;
|
||||
String? name;
|
||||
|
||||
SpokenLanguages({this.englishName, this.iso6391, this.name});
|
||||
|
||||
SpokenLanguages.fromJson(Map<String, dynamic> json) {
|
||||
englishName = json['english_name'];
|
||||
iso6391 = json['iso_639_1'];
|
||||
name = json['name'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['english_name'] = this.englishName;
|
||||
data['iso_639_1'] = this.iso6391;
|
||||
data['name'] = this.name;
|
||||
return data;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
class DetailVideoMovie {
|
||||
int? id;
|
||||
List<Results>? results;
|
||||
|
||||
DetailVideoMovie({this.id, this.results});
|
||||
|
||||
DetailVideoMovie.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
if (json['results'] != null) {
|
||||
results = <Results>[];
|
||||
json['results'].forEach((v) {
|
||||
results!.add(new Results.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
if (this.results != null) {
|
||||
data['results'] = this.results!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Results {
|
||||
String? iso6391;
|
||||
String? iso31661;
|
||||
String? name;
|
||||
String? key;
|
||||
String? site;
|
||||
int? size;
|
||||
String? type;
|
||||
bool? official;
|
||||
String? publishedAt;
|
||||
String? id;
|
||||
|
||||
Results(
|
||||
{this.iso6391,
|
||||
this.iso31661,
|
||||
this.name,
|
||||
this.key,
|
||||
this.site,
|
||||
this.size,
|
||||
this.type,
|
||||
this.official,
|
||||
this.publishedAt,
|
||||
this.id});
|
||||
|
||||
Results.fromJson(Map<String, dynamic> json) {
|
||||
iso6391 = json['iso_639_1'];
|
||||
iso31661 = json['iso_3166_1'];
|
||||
name = json['name'];
|
||||
key = json['key'];
|
||||
site = json['site'];
|
||||
size = json['size'];
|
||||
type = json['type'];
|
||||
official = json['official'];
|
||||
publishedAt = json['published_at'];
|
||||
id = json['id'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['iso_639_1'] = this.iso6391;
|
||||
data['iso_3166_1'] = this.iso31661;
|
||||
data['name'] = this.name;
|
||||
data['key'] = this.key;
|
||||
data['site'] = this.site;
|
||||
data['size'] = this.size;
|
||||
data['type'] = this.type;
|
||||
data['official'] = this.official;
|
||||
data['published_at'] = this.publishedAt;
|
||||
data['id'] = this.id;
|
||||
return data;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
class Movie {
|
||||
int? page;
|
||||
List<Results>? results;
|
||||
int? totalPages;
|
||||
int? totalResults;
|
||||
|
||||
Movie({this.page, this.results, this.totalPages, this.totalResults});
|
||||
|
||||
Movie.fromJson(Map<String, dynamic> json) {
|
||||
page = json['page'];
|
||||
if (json['results'] != null) {
|
||||
results = <Results>[];
|
||||
json['results'].forEach((v) {
|
||||
results!.add(new Results.fromJson(v));
|
||||
});
|
||||
}
|
||||
totalPages = json['total_pages'];
|
||||
totalResults = json['total_results'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['page'] = this.page;
|
||||
if (this.results != null) {
|
||||
data['results'] = this.results!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['total_pages'] = this.totalPages;
|
||||
data['total_results'] = this.totalResults;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Results {
|
||||
bool? adult;
|
||||
String? backdropPath;
|
||||
List<int>? genreIds;
|
||||
int? id;
|
||||
String? originalLanguage;
|
||||
String? originalTitle;
|
||||
String? overview;
|
||||
double? popularity;
|
||||
String? posterPath;
|
||||
String? releaseDate;
|
||||
String? title;
|
||||
bool? video;
|
||||
double? voteAverage;
|
||||
int? voteCount;
|
||||
|
||||
Results(
|
||||
{this.adult,
|
||||
this.backdropPath,
|
||||
this.genreIds,
|
||||
this.id,
|
||||
this.originalLanguage,
|
||||
this.originalTitle,
|
||||
this.overview,
|
||||
this.popularity,
|
||||
this.posterPath,
|
||||
this.releaseDate,
|
||||
this.title,
|
||||
this.video,
|
||||
this.voteAverage,
|
||||
this.voteCount});
|
||||
|
||||
Results.fromJson(Map<String, dynamic> json) {
|
||||
adult = json['adult'];
|
||||
backdropPath = json['backdrop_path'];
|
||||
genreIds = json['genre_ids'].cast<int>();
|
||||
id = json['id'];
|
||||
originalLanguage = json['original_language'];
|
||||
originalTitle = json['original_title'];
|
||||
overview = json['overview'];
|
||||
popularity = json['popularity'];
|
||||
posterPath = json['poster_path'];
|
||||
releaseDate = json['release_date'];
|
||||
title = json['title'];
|
||||
video = json['video'];
|
||||
voteAverage = json['vote_average'];
|
||||
voteCount = json['vote_count'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['adult'] = this.adult;
|
||||
data['backdrop_path'] = this.backdropPath;
|
||||
data['genre_ids'] = this.genreIds;
|
||||
data['id'] = this.id;
|
||||
data['original_language'] = this.originalLanguage;
|
||||
data['original_title'] = this.originalTitle;
|
||||
data['overview'] = this.overview;
|
||||
data['popularity'] = this.popularity;
|
||||
data['poster_path'] = this.posterPath;
|
||||
data['release_date'] = this.releaseDate;
|
||||
data['title'] = this.title;
|
||||
data['video'] = this.video;
|
||||
data['vote_average'] = this.voteAverage;
|
||||
data['vote_count'] = this.voteCount;
|
||||
return data;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
class User {
|
||||
final int? id;
|
||||
final String username;
|
||||
final String email;
|
||||
final String? password;
|
||||
|
||||
User({this.id, required this.username, required this.email, this.password});
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'id': id,
|
||||
'username': username,
|
||||
'email': email,
|
||||
'password': password,
|
||||
};
|
||||
}
|
||||
|
||||
static User fromMap(Map<String, dynamic> map) {
|
||||
return User(
|
||||
id: map['id'],
|
||||
username: map['username'],
|
||||
email: map['email'],
|
||||
password: map['password'],
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
import 'package:skripsi_getit/data/model/detail_movie_model.dart';
|
||||
import 'package:skripsi_getit/data/model/movie.dart';
|
||||
|
||||
class MovieState {
|
||||
final bool isLoading;
|
||||
final List<Results> movies;
|
||||
final bool hasMoreData;
|
||||
final String errorMessage;
|
||||
|
||||
MovieState({
|
||||
this.isLoading = false,
|
||||
this.movies = const [],
|
||||
this.hasMoreData = true,
|
||||
this.errorMessage = '',
|
||||
});
|
||||
|
||||
factory MovieState.initial() {
|
||||
return MovieState(
|
||||
isLoading: false,
|
||||
movies: [],
|
||||
hasMoreData: true,
|
||||
errorMessage: '',
|
||||
);
|
||||
}
|
||||
|
||||
MovieState copyWith({
|
||||
bool? isLoading,
|
||||
List<Results>? movies,
|
||||
bool? hasMoreData,
|
||||
String? errorMessage,
|
||||
}) {
|
||||
return MovieState(
|
||||
isLoading: isLoading ?? this.isLoading,
|
||||
movies: movies ?? this.movies,
|
||||
hasMoreData: hasMoreData ?? this.hasMoreData,
|
||||
errorMessage: errorMessage ?? this.errorMessage,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class DetailMovieState {
|
||||
final bool isLoading;
|
||||
final DetailMovie movies;
|
||||
final String errorMessage;
|
||||
|
||||
DetailMovieState({
|
||||
this.isLoading = false,
|
||||
DetailMovie? movies,
|
||||
this.errorMessage = '',
|
||||
}) : movies = movies ?? DetailMovie();
|
||||
|
||||
DetailMovieState copyWith({
|
||||
bool? isLoading,
|
||||
DetailMovie? movies,
|
||||
String? errorMessage,
|
||||
}) {
|
||||
return DetailMovieState(
|
||||
isLoading: isLoading ?? this.isLoading,
|
||||
movies: movies ?? this.movies,
|
||||
errorMessage: errorMessage ?? this.errorMessage,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
import 'package:skripsi_getit/data/model/detail_video_movie_model.dart';
|
||||
|
||||
class DetailVideosState {
|
||||
final bool isLoading;
|
||||
final DetailVideoMovie movies;
|
||||
final String errorMessage;
|
||||
|
||||
DetailVideosState({
|
||||
this.isLoading = false,
|
||||
DetailVideoMovie? movies,
|
||||
this.errorMessage = '',
|
||||
}) : movies = movies ?? DetailVideoMovie();
|
||||
|
||||
DetailVideosState copyWith({
|
||||
bool? isLoading,
|
||||
DetailVideoMovie? movies,
|
||||
String? errorMessage,
|
||||
}) {
|
||||
return DetailVideosState(
|
||||
isLoading: isLoading ?? this.isLoading,
|
||||
movies: movies ?? this.movies,
|
||||
errorMessage: errorMessage ?? this.errorMessage,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:skripsi_getit/services/cubit/auth_cubit.dart';
|
||||
import 'package:skripsi_getit/services/cubit/detail_movie_cubit.dart';
|
||||
import 'package:skripsi_getit/services/cubit/detail_video_cubit.dart';
|
||||
import 'package:skripsi_getit/services/cubit/popular_movie_cubit.dart';
|
||||
import 'package:skripsi_getit/services/cubit/recommendations_cubit.dart';
|
||||
import 'package:skripsi_getit/services/cubit/search_movie_cubit.dart';
|
||||
import 'package:skripsi_getit/services/cubit/test_cubit.dart';
|
||||
import 'package:skripsi_getit/services/cubit/top_rated_movie_cubit.dart';
|
||||
import 'package:skripsi_getit/services/cubit/upcoming_movie_cubit.dart';
|
||||
import 'package:skripsi_getit/services/helper/database_helper.dart';
|
||||
import 'package:skripsi_getit/services/repository/auth_repository.dart';
|
||||
import 'package:skripsi_getit/services/repository/movie_repository.dart';
|
||||
import 'package:skripsi_getit/services/repository/search_repository.dart';
|
||||
import 'package:skripsi_getit/ui/home/search_movie.dart';
|
||||
import 'package:skripsi_getit/ui/profile/profile.dart';
|
||||
import 'package:skripsi_getit/utils/api_config.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:skripsi_getit/ui/auth/login/login.dart';
|
||||
import 'package:skripsi_getit/ui/auth/register/register.dart';
|
||||
import 'package:skripsi_getit/ui/home/home.dart';
|
||||
import 'package:skripsi_getit/ui/splash.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await setupDependencies();
|
||||
await dotenv.load(fileName: ".env");
|
||||
runApp(const MyApp());
|
||||
}
|
||||
|
||||
Future<void> setupDependencies() async {
|
||||
final getIt = GetIt.instance;
|
||||
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
|
||||
getIt.registerSingleton<DatabaseHelper>(DatabaseHelper.instance);
|
||||
|
||||
getIt.registerSingleton<AuthRepository>(
|
||||
AuthRepository(databaseHelper: getIt<DatabaseHelper>()),
|
||||
);
|
||||
|
||||
getIt.registerLazySingleton<MovieRepository>(
|
||||
() => MovieRepository(apiUrl: ApiConfig.apiUrl, token: ApiConfig.token),
|
||||
);
|
||||
|
||||
getIt.registerLazySingleton<SearchRepository>(
|
||||
() => SearchRepository(
|
||||
apiUrl: ApiConfig.apiSearchUrl,
|
||||
token: ApiConfig.token,
|
||||
),
|
||||
);
|
||||
|
||||
getIt.registerSingleton<AuthCubit>(AuthCubit(getIt<AuthRepository>(), prefs));
|
||||
getIt.registerFactory<TopRatedMovieCubit>(
|
||||
() => TopRatedMovieCubit(getIt<MovieRepository>()),
|
||||
);
|
||||
getIt.registerFactory<PopularMovieCubit>(
|
||||
() => PopularMovieCubit(getIt<MovieRepository>()),
|
||||
);
|
||||
getIt.registerFactory<UpcomingMovieCubit>(
|
||||
() => UpcomingMovieCubit(getIt<MovieRepository>()),
|
||||
);
|
||||
getIt.registerFactory<SearchMovieCubit>(
|
||||
() => SearchMovieCubit(getIt<SearchRepository>()),
|
||||
);
|
||||
getIt.registerFactory<DetailMovieCubit>(
|
||||
() => DetailMovieCubit(getIt<MovieRepository>()),
|
||||
);
|
||||
getIt.registerFactory<DetailVideoCubit>(
|
||||
() => DetailVideoCubit(getIt<MovieRepository>()),
|
||||
);
|
||||
getIt.registerFactory<RecommendationsCubit>(
|
||||
() => RecommendationsCubit(getIt<MovieRepository>()),
|
||||
);
|
||||
getIt.registerFactory<TestCubit>(() => TestCubit(getIt<MovieRepository>()));
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MultiBlocProvider(
|
||||
providers: [
|
||||
BlocProvider(create: (_) => GetIt.I<AuthCubit>()),
|
||||
BlocProvider(create: (_) => GetIt.I<TopRatedMovieCubit>()),
|
||||
BlocProvider(create: (_) => GetIt.I<PopularMovieCubit>()),
|
||||
BlocProvider(create: (_) => GetIt.I<UpcomingMovieCubit>()),
|
||||
BlocProvider(create: (_) => GetIt.I<SearchMovieCubit>()),
|
||||
BlocProvider(create: (_) => GetIt.I<DetailMovieCubit>()),
|
||||
BlocProvider(create: (_) => GetIt.I<DetailVideoCubit>()),
|
||||
BlocProvider(create: (_) => GetIt.I<RecommendationsCubit>()),
|
||||
BlocProvider(create: (_) => GetIt.I<TestCubit>()),
|
||||
],
|
||||
child: MaterialApp(
|
||||
title: 'FlickNite GetIt',
|
||||
theme: ThemeData(
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
|
||||
useMaterial3: true,
|
||||
),
|
||||
initialRoute: '/splash',
|
||||
debugShowCheckedModeBanner: false,
|
||||
routes: {
|
||||
'/splash': (context) => Splash(),
|
||||
'/login': (context) => Login(),
|
||||
'/register': (context) => Register(),
|
||||
'/home': (context) => Home(),
|
||||
'/profile': (context) => Profile(),
|
||||
'/search': (context) => SearchMovie(),
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:skripsi_getit/services/repository/auth_repository.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../../data/model/user.dart';
|
||||
|
||||
class AuthCubit extends Cubit<User?> {
|
||||
final AuthRepository authRepository;
|
||||
final SharedPreferences prefs;
|
||||
|
||||
AuthCubit(this.authRepository, this.prefs) : super(null) {
|
||||
initializeUser();
|
||||
}
|
||||
|
||||
Future<void> initializeUser() async {
|
||||
final isLoggedIn = prefs.getBool('isLoggedIn') ?? false;
|
||||
if (isLoggedIn) {
|
||||
final email = prefs.getString('email');
|
||||
if (email != null) {
|
||||
final user = await authRepository.getUserByEmail(email);
|
||||
if (user != null) {
|
||||
emit(user);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> login(String email, String password) async {
|
||||
final user = await authRepository.login(email, password);
|
||||
if (user != null) {
|
||||
emit(user);
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setBool('isLoggedIn', true);
|
||||
await prefs.setString('email', email);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Future<bool> register(String username, String email, String password) async {
|
||||
try {
|
||||
await authRepository.register(username, email, password);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> logout() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
await prefs.clear();
|
||||
emit(null);
|
||||
}
|
||||
|
||||
User? getDataUser() {
|
||||
return state;
|
||||
}
|
||||
|
||||
Future<void> updateUserData(String name, String email) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
await prefs.clear();
|
||||
await prefs.setString('username', name);
|
||||
await prefs.setString('email', email);
|
||||
|
||||
emit(User(username: name, email: email));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:skripsi_getit/data/state/movie_state.dart';
|
||||
import 'package:skripsi_getit/services/repository/movie_repository.dart';
|
||||
|
||||
class DetailMovieCubit extends Cubit<DetailMovieState> {
|
||||
final MovieRepository movieRepository;
|
||||
|
||||
DetailMovieCubit(this.movieRepository) : super(DetailMovieState());
|
||||
|
||||
Future<void> getDetailMovies(int movieId) async {
|
||||
if (state.isLoading) return;
|
||||
|
||||
emit(state.copyWith(isLoading: true, errorMessage: ''));
|
||||
|
||||
try {
|
||||
final newMovies = await movieRepository.getDetailMovie(movieId);
|
||||
|
||||
emit(state.copyWith(isLoading: false, movies: newMovies));
|
||||
} catch (error) {
|
||||
emit(state.copyWith(isLoading: false, errorMessage: error.toString()));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:skripsi_getit/data/state/video_state.dart';
|
||||
import 'package:skripsi_getit/services/repository/movie_repository.dart';
|
||||
|
||||
class DetailVideoCubit extends Cubit<DetailVideosState> {
|
||||
final MovieRepository movieRepository;
|
||||
|
||||
DetailVideoCubit(this.movieRepository) : super(DetailVideosState());
|
||||
|
||||
Future<void> getVideosMovies(int movieId) async {
|
||||
if (state.isLoading) return;
|
||||
|
||||
emit(state.copyWith(isLoading: true, errorMessage: ''));
|
||||
|
||||
try {
|
||||
final newMovies = await movieRepository.getVideoDetailMovie(movieId);
|
||||
|
||||
emit(state.copyWith(isLoading: false, movies: newMovies));
|
||||
} catch (error) {
|
||||
emit(state.copyWith(isLoading: false, errorMessage: error.toString()));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:skripsi_getit/data/model/movie.dart';
|
||||
import 'package:skripsi_getit/data/state/movie_state.dart';
|
||||
import 'package:skripsi_getit/services/repository/movie_repository.dart';
|
||||
|
||||
class PopularMovieCubit extends Cubit<MovieState> {
|
||||
final MovieRepository movieRepository;
|
||||
|
||||
PopularMovieCubit(this.movieRepository) : super(MovieState());
|
||||
|
||||
int currentPage = 1;
|
||||
|
||||
Future<void> fetchPopularMovies() async {
|
||||
if (state.isLoading || !state.hasMoreData) return;
|
||||
|
||||
emit(state.copyWith(isLoading: true));
|
||||
|
||||
try {
|
||||
final newMovies = await movieRepository.fetchPopularMovies(
|
||||
page: currentPage,
|
||||
);
|
||||
|
||||
final updatedMovies = List<Results>.from(state.movies)
|
||||
..addAll(newMovies.results!);
|
||||
|
||||
emit(
|
||||
state.copyWith(
|
||||
isLoading: false,
|
||||
movies: updatedMovies,
|
||||
hasMoreData: newMovies.results!.length >= 10,
|
||||
),
|
||||
);
|
||||
|
||||
currentPage++;
|
||||
} catch (error) {
|
||||
emit(state.copyWith(isLoading: false, errorMessage: error.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> fetchWithForLoop(int count) async {
|
||||
for (int i = 0; i < count; i++) {
|
||||
await fetchPopularMovies();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> fetchWithWhileLoop(int count) async {
|
||||
int i = 0;
|
||||
while (i < count) {
|
||||
await fetchPopularMovies();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> fetchWithDoWhileLoop(int count) async {
|
||||
int i = 0;
|
||||
do {
|
||||
await fetchPopularMovies();
|
||||
i++;
|
||||
} while (i < count);
|
||||
}
|
||||
|
||||
Future<void> fetchPopularMoviesInBulk(int movieCount) async {
|
||||
final stopWatch = Stopwatch()..start();
|
||||
|
||||
currentPage = 1; // reset current page
|
||||
emit(
|
||||
MovieState(isLoading: true, movies: [], hasMoreData: true),
|
||||
); // reset state
|
||||
|
||||
try {
|
||||
List<Results> allMovies = [];
|
||||
|
||||
int page = 1;
|
||||
while (allMovies.length < movieCount) {
|
||||
final movie = await movieRepository.fetchPopularMovies(page: page);
|
||||
if (movie.results == null || movie.results!.isEmpty) break;
|
||||
|
||||
allMovies.addAll(movie.results!);
|
||||
page++;
|
||||
}
|
||||
|
||||
emit(
|
||||
state.copyWith(
|
||||
isLoading: false,
|
||||
movies: allMovies.take(movieCount).toList(),
|
||||
hasMoreData: false,
|
||||
),
|
||||
);
|
||||
stopWatch.stop();
|
||||
print(
|
||||
'${movieCount.toString()} completed in ${stopWatch.elapsed.inSeconds} seconds',
|
||||
);
|
||||
} catch (e) {
|
||||
emit(state.copyWith(isLoading: false, errorMessage: e.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
void reset() {
|
||||
currentPage = 1;
|
||||
emit(MovieState());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:skripsi_getit/data/model/movie.dart';
|
||||
import 'package:skripsi_getit/data/state/movie_state.dart';
|
||||
import 'package:skripsi_getit/services/repository/movie_repository.dart';
|
||||
|
||||
class RecommendationsCubit extends Cubit<MovieState> {
|
||||
final MovieRepository movieRepository;
|
||||
|
||||
RecommendationsCubit(this.movieRepository) : super(MovieState());
|
||||
|
||||
int currentPage = 1;
|
||||
|
||||
Future<void> fetchRecommendationsMovies(int movieId) async {
|
||||
if (state.isLoading || !state.hasMoreData) return;
|
||||
|
||||
emit(state.copyWith(isLoading: true));
|
||||
|
||||
try {
|
||||
final newMovies = await movieRepository.fetchRecommendationMovie(
|
||||
movieId,
|
||||
currentPage,
|
||||
);
|
||||
final updatedMovies = List<Results>.from(state.movies)
|
||||
..addAll(newMovies.results!);
|
||||
|
||||
emit(
|
||||
state.copyWith(
|
||||
isLoading: false,
|
||||
movies: updatedMovies,
|
||||
hasMoreData: newMovies.results!.length >= 10,
|
||||
),
|
||||
);
|
||||
|
||||
currentPage++;
|
||||
} catch (error) {
|
||||
emit(state.copyWith(isLoading: false, errorMessage: error.toString()));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:skripsi_getit/data/model/movie.dart';
|
||||
import 'package:skripsi_getit/data/state/movie_state.dart';
|
||||
import 'package:skripsi_getit/services/repository/search_repository.dart';
|
||||
|
||||
class SearchMovieCubit extends Cubit<MovieState> {
|
||||
final SearchRepository searchRepository;
|
||||
|
||||
SearchMovieCubit(this.searchRepository) : super(MovieState());
|
||||
|
||||
int currentPage = 1;
|
||||
|
||||
void clearSearchResults() {
|
||||
emit(MovieState());
|
||||
}
|
||||
|
||||
Future<void> fetchSearchMovies(String query) async {
|
||||
if (state.isLoading || !state.hasMoreData) return;
|
||||
|
||||
emit(state.copyWith(isLoading: true));
|
||||
|
||||
try {
|
||||
final newMovies = await searchRepository.searchMovie(query, currentPage);
|
||||
|
||||
final updatedMovies = List<Results>.from(state.movies)
|
||||
..addAll(newMovies.results!);
|
||||
|
||||
emit(
|
||||
state.copyWith(
|
||||
isLoading: false,
|
||||
movies: updatedMovies,
|
||||
hasMoreData: newMovies.results!.length >= 10,
|
||||
),
|
||||
);
|
||||
|
||||
currentPage++;
|
||||
} catch (error) {
|
||||
emit(state.copyWith(isLoading: false, errorMessage: error.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
void reset() {
|
||||
currentPage = 1;
|
||||
emit(MovieState.initial());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:skripsi_getit/data/model/movie.dart' show Results;
|
||||
import 'package:skripsi_getit/services/repository/movie_repository.dart';
|
||||
|
||||
class TestCubit extends Cubit<List<Results>> {
|
||||
final MovieRepository movieRepository;
|
||||
|
||||
TestCubit(this.movieRepository) : super([]);
|
||||
|
||||
Future<void> fetchDataForLoop({int count = 50}) async {
|
||||
final stopWatch = Stopwatch()..start();
|
||||
|
||||
List<Results> allMovies = [];
|
||||
int totalPages = (count / 20).ceil();
|
||||
|
||||
for (int page = 1; page <= totalPages; page++) {
|
||||
final movies = await movieRepository.fetchMoviesforTesting(page: page);
|
||||
allMovies.addAll(movies);
|
||||
}
|
||||
|
||||
stopWatch.stop();
|
||||
print('For Loop completed in ${stopWatch.elapsed.inSeconds} seconds');
|
||||
emit(allMovies);
|
||||
}
|
||||
|
||||
Future<void> fetchDataWhileLoop({int count = 50}) async {
|
||||
final stopWatch = Stopwatch()..start();
|
||||
|
||||
List<Results> allMovies = [];
|
||||
int totalPages = (count / 20).ceil();
|
||||
int page = 1;
|
||||
|
||||
while (page <= totalPages) {
|
||||
final movies = await movieRepository.fetchMoviesforTesting(page: page);
|
||||
allMovies.addAll(movies);
|
||||
page++;
|
||||
}
|
||||
|
||||
stopWatch.stop();
|
||||
print('While Loop completed in ${stopWatch.elapsed.inSeconds} seconds');
|
||||
emit(allMovies);
|
||||
}
|
||||
|
||||
Future<void> fetchDataDoWhileLoop({int count = 50}) async {
|
||||
final stopWatch = Stopwatch()..start();
|
||||
|
||||
List<Results> allMovies = [];
|
||||
int totalPages = (count / 20).ceil();
|
||||
int page = 1;
|
||||
|
||||
do {
|
||||
final movies = await movieRepository.fetchMoviesforTesting(page: page);
|
||||
allMovies.addAll(movies);
|
||||
page++;
|
||||
} while (page <= totalPages);
|
||||
|
||||
stopWatch.stop();
|
||||
print('Do While Loop completed in ${stopWatch.elapsed.inSeconds} seconds');
|
||||
emit(allMovies);
|
||||
}
|
||||
|
||||
Results? binarySearchByTitle(String title) {
|
||||
final sortedList = [...state];
|
||||
sortedList.sort((a, b) => (a.title ?? '').compareTo(b.title ?? ''));
|
||||
|
||||
int left = 0;
|
||||
int right = sortedList.length - 1;
|
||||
|
||||
while (left <= right) {
|
||||
int mid = (left + right) ~/ 2;
|
||||
String midTitle = sortedList[mid].title ?? '';
|
||||
|
||||
if (midTitle == title) {
|
||||
return sortedList[mid];
|
||||
} else if (midTitle.compareTo(title) < 0) {
|
||||
left = mid + 1;
|
||||
} else {
|
||||
right = mid - 1;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
void compareAllMoviesByRating() {
|
||||
final stopwatch = Stopwatch()..start();
|
||||
|
||||
for (int i = 0; i < state.length; i++) {
|
||||
for (int j = 0; j < state.length; j++) {
|
||||
if (i != j) {
|
||||
final movieA = state[i];
|
||||
final movieB = state[j];
|
||||
bool sameRating = movieA.voteAverage == movieB.voteAverage;
|
||||
|
||||
if (sameRating) {
|
||||
print(
|
||||
'${movieA.title} dan ${movieB.title} memiliki rating yang sama',
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stopwatch.stop();
|
||||
print("O(n²) selesai dalam: ${stopwatch.elapsedMilliseconds} ms");
|
||||
}
|
||||
|
||||
void reset() {
|
||||
emit([]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:skripsi_getit/data/model/movie.dart';
|
||||
import 'package:skripsi_getit/data/state/movie_state.dart';
|
||||
import 'package:skripsi_getit/services/repository/movie_repository.dart';
|
||||
|
||||
class TopRatedMovieCubit extends Cubit<MovieState> {
|
||||
final MovieRepository movieRepository;
|
||||
|
||||
TopRatedMovieCubit(this.movieRepository) : super(MovieState());
|
||||
|
||||
int currentPage = 1;
|
||||
|
||||
Future<void> fetchTopRatedMovies() async {
|
||||
if (state.isLoading || !state.hasMoreData) return;
|
||||
|
||||
emit(state.copyWith(isLoading: true));
|
||||
|
||||
try {
|
||||
final newMovies = await movieRepository.fetchTopRatedMovies(currentPage);
|
||||
|
||||
final updatedMovies = List<Results>.from(state.movies)
|
||||
..addAll(newMovies.results!);
|
||||
|
||||
emit(
|
||||
state.copyWith(
|
||||
isLoading: false,
|
||||
movies: updatedMovies,
|
||||
hasMoreData: newMovies.results!.length >= 10,
|
||||
),
|
||||
);
|
||||
|
||||
currentPage++;
|
||||
} catch (error) {
|
||||
emit(state.copyWith(isLoading: false, errorMessage: error.toString()));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:skripsi_getit/data/model/movie.dart';
|
||||
import 'package:skripsi_getit/data/state/movie_state.dart';
|
||||
import 'package:skripsi_getit/services/repository/movie_repository.dart';
|
||||
|
||||
class UpcomingMovieCubit extends Cubit<MovieState> {
|
||||
final MovieRepository movieRepository;
|
||||
|
||||
UpcomingMovieCubit(this.movieRepository) : super(MovieState());
|
||||
|
||||
int currentPage = 1;
|
||||
|
||||
Future<void> fetchUpcomingMovies() async {
|
||||
if (state.isLoading || !state.hasMoreData) return;
|
||||
|
||||
emit(state.copyWith(isLoading: true));
|
||||
|
||||
try {
|
||||
final newMovies = await movieRepository.fetchUpcomingMovies(currentPage);
|
||||
|
||||
final updatedMovies = List<Results>.from(state.movies)
|
||||
..addAll(newMovies.results!);
|
||||
|
||||
emit(
|
||||
state.copyWith(
|
||||
isLoading: false,
|
||||
movies: updatedMovies,
|
||||
hasMoreData: newMovies.results!.length >= 10,
|
||||
),
|
||||
);
|
||||
|
||||
currentPage++;
|
||||
} catch (error) {
|
||||
emit(state.copyWith(isLoading: false, errorMessage: error.toString()));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
import 'package:skripsi_getit/data/model/user.dart';
|
||||
import 'package:sqflite/sqflite.dart';
|
||||
import 'package:path/path.dart';
|
||||
|
||||
class DatabaseHelper {
|
||||
static final DatabaseHelper instance = DatabaseHelper._internal();
|
||||
DatabaseHelper._internal();
|
||||
|
||||
static Database? _database;
|
||||
|
||||
Future<Database> get database async {
|
||||
if (_database != null) return _database!;
|
||||
_database = await _initDB();
|
||||
return _database!;
|
||||
}
|
||||
|
||||
Future<Database> _initDB() async {
|
||||
String path = join(await getDatabasesPath(), 'app_database.db');
|
||||
return await openDatabase(
|
||||
path,
|
||||
version: 1,
|
||||
onCreate: (db, version) {
|
||||
return db.execute(
|
||||
'CREATE TABLE users(id INTEGER PRIMARY KEY, username TEXT, email TEXT, password TEXT)',
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> insertUser(User user) async {
|
||||
final db = await database;
|
||||
await db.insert(
|
||||
'users',
|
||||
user.toMap(),
|
||||
conflictAlgorithm: ConflictAlgorithm.replace,
|
||||
);
|
||||
}
|
||||
|
||||
Future<User?> getUser(String email, String password) async {
|
||||
final db = await database;
|
||||
final maps = await db.query(
|
||||
'users',
|
||||
where: 'email = ? AND password = ?',
|
||||
whereArgs: [email, password],
|
||||
);
|
||||
|
||||
if (maps.isNotEmpty) {
|
||||
return User.fromMap(maps.first);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
import 'package:skripsi_getit/data/model/user.dart';
|
||||
import 'package:skripsi_getit/services/helper/database_helper.dart';
|
||||
|
||||
class AuthRepository {
|
||||
final DatabaseHelper databaseHelper;
|
||||
|
||||
AuthRepository({required this.databaseHelper});
|
||||
|
||||
Future<User?> login(String email, String password) async {
|
||||
return await databaseHelper.getUser(email, password);
|
||||
}
|
||||
|
||||
Future<void> register(String username, String email, String password) async {
|
||||
final user = User(username: username, email: email, password: password);
|
||||
await databaseHelper.insertUser(user);
|
||||
}
|
||||
|
||||
Future<User?> getUserByEmail(String email) async {
|
||||
final db = await databaseHelper.database;
|
||||
final maps = await db.query(
|
||||
'users',
|
||||
where: 'email = ?',
|
||||
whereArgs: [email],
|
||||
);
|
||||
|
||||
if (maps.isNotEmpty) {
|
||||
return User.fromMap(maps.first);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
import 'dart:convert';
|
||||
import 'package:skripsi_getit/data/model/detail_movie_model.dart';
|
||||
import 'package:skripsi_getit/data/model/detail_video_movie_model.dart';
|
||||
import 'package:skripsi_getit/data/model/movie.dart' as ResultsModel;
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../../data/model/movie.dart';
|
||||
|
||||
class MovieRepository {
|
||||
final String apiUrl;
|
||||
final String token;
|
||||
|
||||
MovieRepository({required this.apiUrl, required this.token});
|
||||
|
||||
Future<Movie> fetchTopRatedMovies(int page) async {
|
||||
final response = await http.get(
|
||||
Uri.parse('$apiUrl/top_rated?language=en-US&page=$page'),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return Movie.fromJson(json.decode(response.body));
|
||||
} else {
|
||||
throw Exception('Failed to load top rated movies');
|
||||
}
|
||||
}
|
||||
|
||||
Future<Movie> fetchPopularMovies({int? page}) async {
|
||||
final response = await http.get(
|
||||
Uri.parse('$apiUrl/popular?language=en-US&page=$page'),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return Movie.fromJson(json.decode(response.body));
|
||||
} else {
|
||||
throw Exception('Failed to load popular movies');
|
||||
}
|
||||
}
|
||||
|
||||
Future<Movie> fetchUpcomingMovies(int page) async {
|
||||
final response = await http.get(
|
||||
Uri.parse('$apiUrl/upcoming?language=en-US&page=$page'),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return Movie.fromJson(json.decode(response.body));
|
||||
} else {
|
||||
throw Exception('Failed to load upcoming movies');
|
||||
}
|
||||
}
|
||||
|
||||
Future<DetailMovie> getDetailMovie(int movieId) async {
|
||||
final response = await http.get(
|
||||
Uri.parse('$apiUrl/$movieId'),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return DetailMovie.fromJson(json.decode(response.body));
|
||||
} else {
|
||||
throw Exception('Failed to load detail movies');
|
||||
}
|
||||
}
|
||||
|
||||
Future<DetailVideoMovie> getVideoDetailMovie(int movieId) async {
|
||||
final response = await http.get(
|
||||
Uri.parse('$apiUrl/$movieId/videos'),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return DetailVideoMovie.fromJson(json.decode(response.body));
|
||||
} else {
|
||||
throw Exception('Failed to load videos detail movies');
|
||||
}
|
||||
}
|
||||
|
||||
Future<Movie> fetchRecommendationMovie(int movieId, int page) async {
|
||||
final response = await http.get(
|
||||
Uri.parse('$apiUrl/$movieId/recommendations?language=en-US&page=$page'),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return Movie.fromJson(json.decode(response.body));
|
||||
} else {
|
||||
throw Exception('Failed to load recommendation detail movies');
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<ResultsModel.Results>> fetchMoviesforTesting({int? page}) async {
|
||||
final response = await http.get(
|
||||
Uri.parse('$apiUrl/popular?language=en-US&page=$page'),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
final jsonData = json.decode(response.body);
|
||||
final List<dynamic> resultsData = jsonData['results'];
|
||||
return resultsData
|
||||
.map((result) => ResultsModel.Results.fromJson(result))
|
||||
.toList();
|
||||
} else {
|
||||
throw Exception('Failed to load popular movies');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:skripsi_getit/data/model/movie.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
class SearchRepository {
|
||||
final String apiUrl;
|
||||
final String token;
|
||||
|
||||
SearchRepository({required this.apiUrl, required this.token});
|
||||
|
||||
Future<Movie> searchMovie(String query, int page) async {
|
||||
final response = await http.get(
|
||||
Uri.parse(
|
||||
'$apiUrl/search/movie?query=$query&include_adult=false&language=en-US&page=$page',
|
||||
),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
return Movie.fromJson(json.decode(response.body));
|
||||
} else {
|
||||
throw Exception('Failed to load top rated movies');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
Color primaryColor = Color(0xff161D2C);
|
||||
Color secondaryColor = Color(0xff2D3C5D);
|
||||
Color whiteColor = Colors.white;
|
||||
Color blackColor = Colors.black;
|
||||
Color blueColor = Color(0xff0008D4);
|
||||
Color darkColor = Color(0xff131820);
|
|
@ -0,0 +1,61 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
class AppFonts {
|
||||
static const String defaultFontFamily = 'Poppins';
|
||||
|
||||
final double fontSize;
|
||||
final Color color;
|
||||
final FontWeight fontWeight;
|
||||
final String fontFamily;
|
||||
|
||||
const AppFonts({
|
||||
required this.fontSize,
|
||||
required this.color,
|
||||
this.fontWeight = FontWeight.normal,
|
||||
this.fontFamily = defaultFontFamily,
|
||||
});
|
||||
|
||||
TextStyle get textStyle => GoogleFonts.getFont(
|
||||
fontFamily,
|
||||
fontSize: fontSize,
|
||||
color: color,
|
||||
fontWeight: fontWeight,
|
||||
);
|
||||
|
||||
static TextStyle poppins({
|
||||
required double fontSize,
|
||||
required Color color,
|
||||
FontWeight fontWeight = FontWeight.normal,
|
||||
}) {
|
||||
return GoogleFonts.poppins(
|
||||
fontSize: fontSize,
|
||||
color: color,
|
||||
fontWeight: fontWeight,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle inter({
|
||||
required double fontSize,
|
||||
required Color color,
|
||||
FontWeight fontWeight = FontWeight.normal,
|
||||
}) {
|
||||
return GoogleFonts.inter(
|
||||
fontSize: fontSize,
|
||||
color: color,
|
||||
fontWeight: fontWeight,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle montserrat({
|
||||
required double fontSize,
|
||||
required Color color,
|
||||
FontWeight fontWeight = FontWeight.normal,
|
||||
}) {
|
||||
return GoogleFonts.montserrat(
|
||||
fontSize: fontSize,
|
||||
color: color,
|
||||
fontWeight: fontWeight,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:skripsi_getit/themes/colors.dart';
|
||||
import 'package:skripsi_getit/themes/fonts.dart';
|
||||
import 'package:skripsi_getit/ui/auth/login/widgets/widget_form_login.dart';
|
||||
import 'package:skripsi_getit/utils/extensions.dart';
|
||||
|
||||
class Login extends StatelessWidget {
|
||||
const Login({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final deviceSize = context.deviceSize;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: primaryColor,
|
||||
body: SafeArea(
|
||||
child: Container(
|
||||
height: deviceSize.height,
|
||||
width: deviceSize.width,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [primaryColor, secondaryColor],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Lets sign you in",
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 24,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"Welcome back. You've been missed",
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 14,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.w200,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 40),
|
||||
WidgetFormLogin(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,159 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:skripsi_getit/services/cubit/auth_cubit.dart';
|
||||
import 'package:skripsi_getit/themes/colors.dart';
|
||||
import 'package:skripsi_getit/themes/fonts.dart';
|
||||
import 'package:skripsi_getit/utils/extensions.dart';
|
||||
import 'package:skripsi_getit/utils/custom_textfield.dart';
|
||||
|
||||
class WidgetFormLogin extends StatelessWidget {
|
||||
const WidgetFormLogin({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final formKey = GlobalKey<FormState>();
|
||||
final TextEditingController emailController = TextEditingController();
|
||||
final TextEditingController passwordController = TextEditingController();
|
||||
String? validateEmail(String? value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Email tidak boleh kosong';
|
||||
}
|
||||
if (!RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(value)) {
|
||||
return 'Masukkan email yang valid';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
String? validatePassword(String? value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Password tidak boleh kosong';
|
||||
}
|
||||
if (value.length < 6) {
|
||||
return 'Password harus lebih dari 6 karakter';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
void login() async {
|
||||
final email = emailController.text.trim();
|
||||
final password = passwordController.text.trim();
|
||||
|
||||
final success = await context.read<AuthCubit>().login(email, password);
|
||||
if (success) {
|
||||
Navigator.pushReplacementNamed(context, '/home');
|
||||
Fluttertoast.showToast(msg: "Login Successfully");
|
||||
} else {
|
||||
Fluttertoast.showToast(
|
||||
msg: "Login failed. Please check your credentials",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
final deviceSize = context.deviceSize;
|
||||
|
||||
return Form(
|
||||
key: formKey,
|
||||
child: Column(
|
||||
children: [
|
||||
CustomTextField(
|
||||
hintText: "Email",
|
||||
icon: Icons.mail,
|
||||
controller: emailController,
|
||||
validator: validateEmail,
|
||||
),
|
||||
const Gap(15),
|
||||
CustomTextField(
|
||||
hintText: "Password",
|
||||
icon: Icons.lock,
|
||||
isObs: true,
|
||||
controller: passwordController,
|
||||
validator: validatePassword,
|
||||
),
|
||||
Container(
|
||||
margin: const EdgeInsets.only(top: 30),
|
||||
height: 48,
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
if (formKey.currentState!.validate()) {
|
||||
login();
|
||||
}
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: blueColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
shadowColor: Colors.transparent,
|
||||
),
|
||||
child: Text(
|
||||
"Login",
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 16,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 15),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(child: Container(height: 1, color: whiteColor)),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
child: Text(
|
||||
"OR",
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 14,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(child: Container(height: 1, color: whiteColor)),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 48,
|
||||
width: deviceSize.width,
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, '/register');
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.transparent,
|
||||
shadowColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(width: 1, color: whiteColor),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
"Register",
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 16,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(50),
|
||||
Text(
|
||||
"Copyright@2024",
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:skripsi_getit/themes/fonts.dart';
|
||||
import 'package:skripsi_getit/ui/auth/register/widgets/widget_form_register.dart';
|
||||
|
||||
import '../../../themes/colors.dart';
|
||||
|
||||
class Register extends StatelessWidget {
|
||||
const Register({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
leading: IconButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
icon: Icon(Icons.keyboard_arrow_left_rounded, color: whiteColor),
|
||||
),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
body: SafeArea(
|
||||
child: Container(
|
||||
height: MediaQuery.of(context).size.height,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [primaryColor, secondaryColor],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Join us for free",
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 24,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"Find the best movie of your choice",
|
||||
textAlign: TextAlign.center,
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 14,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.w200,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 40),
|
||||
const WidgetFormRegister(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:skripsi_getit/services/cubit/auth_cubit.dart';
|
||||
import 'package:skripsi_getit/themes/colors.dart';
|
||||
import 'package:skripsi_getit/themes/fonts.dart';
|
||||
import 'package:skripsi_getit/utils/extensions.dart';
|
||||
import 'package:skripsi_getit/utils/custom_textfield.dart';
|
||||
|
||||
class WidgetFormRegister extends StatelessWidget {
|
||||
const WidgetFormRegister({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final formKey = GlobalKey<FormState>();
|
||||
final TextEditingController emailController = TextEditingController();
|
||||
final TextEditingController nameController = TextEditingController();
|
||||
final TextEditingController passwordController = TextEditingController();
|
||||
final TextEditingController confPasswordController =
|
||||
TextEditingController();
|
||||
|
||||
String? validateName(String? value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Name is required';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
String? validateEmail(String? value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Email is required';
|
||||
}
|
||||
if (!RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(value)) {
|
||||
return 'Email format must be valid';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
String? validatePassword(String? value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Password is required';
|
||||
}
|
||||
if (value.length < 6) {
|
||||
return 'Password must be more than 6 characters';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
String? validateConfPassword(String? value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Confirm password is required';
|
||||
}
|
||||
if (value.length < 6) {
|
||||
return 'Password must be more than 6 characters';
|
||||
}
|
||||
if (value != confPasswordController.text) {
|
||||
return 'Passwords must match';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
void register() async {
|
||||
final username = nameController.text.trim();
|
||||
final email = emailController.text.trim();
|
||||
final password = passwordController.text.trim();
|
||||
|
||||
final success = await context.read<AuthCubit>().register(
|
||||
username,
|
||||
email,
|
||||
password,
|
||||
);
|
||||
if (success) {
|
||||
Navigator.pushReplacementNamed(context, '/login');
|
||||
Fluttertoast.showToast(msg: "Registered Successfully");
|
||||
} else {
|
||||
Fluttertoast.showToast(msg: "Registration failed. Try again.");
|
||||
}
|
||||
}
|
||||
|
||||
final deviceSize = context.deviceSize;
|
||||
|
||||
return Form(
|
||||
key: formKey,
|
||||
child: Column(
|
||||
children: [
|
||||
CustomTextField(
|
||||
hintText: "Name",
|
||||
icon: Icons.person,
|
||||
controller: nameController,
|
||||
validator: validateName,
|
||||
),
|
||||
const Gap(15),
|
||||
CustomTextField(
|
||||
hintText: "Email",
|
||||
icon: Icons.mail,
|
||||
controller: emailController,
|
||||
validator: validateEmail,
|
||||
),
|
||||
const Gap(15),
|
||||
CustomTextField(
|
||||
hintText: "Password",
|
||||
icon: Icons.lock,
|
||||
isObs: true,
|
||||
controller: passwordController,
|
||||
validator: validatePassword,
|
||||
),
|
||||
const Gap(15),
|
||||
CustomTextField(
|
||||
hintText: "Confirm Password",
|
||||
icon: Icons.lock,
|
||||
isObs: true,
|
||||
controller: confPasswordController,
|
||||
validator: validateConfPassword,
|
||||
),
|
||||
const Gap(30),
|
||||
SizedBox(
|
||||
height: 48,
|
||||
width: deviceSize.width,
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
if (formKey.currentState!.validate()) {
|
||||
register();
|
||||
}
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: blueColor,
|
||||
shadowColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
"Register",
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 16,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(50),
|
||||
Text(
|
||||
"Copyright@2024",
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,248 @@
|
|||
import 'package:card_loading/card_loading.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:skripsi_getit/data/state/movie_state.dart';
|
||||
import 'package:skripsi_getit/services/cubit/popular_movie_cubit.dart';
|
||||
import 'package:skripsi_getit/themes/colors.dart';
|
||||
import 'package:skripsi_getit/themes/fonts.dart';
|
||||
import 'package:skripsi_getit/utils/api_config.dart';
|
||||
|
||||
class AllPopularMovie extends StatefulWidget {
|
||||
const AllPopularMovie({super.key});
|
||||
|
||||
@override
|
||||
State<AllPopularMovie> createState() => _AllPopularMovieState();
|
||||
}
|
||||
|
||||
class _AllPopularMovieState extends State<AllPopularMovie> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final cubit = context.read<PopularMovieCubit>();
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
title: Text(
|
||||
"Loop Test Movie",
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 16,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
leading: IconButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
icon: Icon(Icons.keyboard_arrow_left_rounded, color: whiteColor),
|
||||
),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
body: SafeArea(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: BlocBuilder<PopularMovieCubit, MovieState>(
|
||||
builder: (context, state) {
|
||||
if (state.isLoading && state.movies.isEmpty) {
|
||||
return ListView.builder(
|
||||
itemCount: 5,
|
||||
scrollDirection: Axis.vertical,
|
||||
itemBuilder: (context, index) {
|
||||
return loadDataMovie();
|
||||
},
|
||||
);
|
||||
} else if (state.errorMessage.isNotEmpty) {
|
||||
return Center(
|
||||
child: Text(
|
||||
state.errorMessage,
|
||||
style: AppFonts.montserrat(fontSize: 12, color: whiteColor),
|
||||
),
|
||||
);
|
||||
} else if (state.movies.isEmpty) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'No movies available',
|
||||
style: AppFonts.montserrat(fontSize: 12, color: whiteColor),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Wrap(
|
||||
spacing: 8,
|
||||
children: [
|
||||
ElevatedButton(
|
||||
onPressed:
|
||||
state.isLoading
|
||||
? null
|
||||
: () async {
|
||||
cubit.reset();
|
||||
await cubit.fetchWithForLoop(5);
|
||||
},
|
||||
child: const Text("Loop For"),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed:
|
||||
state.isLoading
|
||||
? null
|
||||
: () async {
|
||||
cubit.reset();
|
||||
await cubit.fetchWithWhileLoop(5);
|
||||
},
|
||||
child: const Text("Loop While"),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed:
|
||||
state.isLoading
|
||||
? null
|
||||
: () async {
|
||||
cubit.reset();
|
||||
await cubit.fetchWithDoWhileLoop(5);
|
||||
},
|
||||
child: const Text("Loop Do-While"),
|
||||
),
|
||||
],
|
||||
),
|
||||
Gap(10),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.vertical,
|
||||
itemCount: state.movies.length,
|
||||
itemBuilder: (context, index) {
|
||||
final movie = state.movies[index];
|
||||
return Container(
|
||||
width: 120,
|
||||
margin: const EdgeInsets.only(bottom: 10),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
movie.posterPath != null
|
||||
? Container(
|
||||
padding: const EdgeInsets.all(5),
|
||||
width: 120,
|
||||
height: 170,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
image: DecorationImage(
|
||||
image: NetworkImage(
|
||||
'${ApiConfig.imageUrl}${movie.posterPath}',
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: CircleAvatar(
|
||||
radius: 20,
|
||||
backgroundColor: primaryColor
|
||||
.withOpacity(0.8),
|
||||
child: Text(
|
||||
'${index + 1}',
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 12,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
: CardLoading(
|
||||
height: 170,
|
||||
width: 120,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
movie.title ?? '',
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 16,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Rating: ${(movie.voteAverage! * 10).toStringAsFixed(0)}%',
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 14,
|
||||
color: whiteColor,
|
||||
),
|
||||
),
|
||||
const Gap(10),
|
||||
Text(
|
||||
movie.overview ?? "",
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 12,
|
||||
color: whiteColor,
|
||||
),
|
||||
maxLines: 4,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget loadDataMovie() {
|
||||
return Container(
|
||||
width: 120,
|
||||
margin: const EdgeInsets.only(bottom: 8),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CardLoading(
|
||||
height: 170,
|
||||
width: 120,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CardLoading(
|
||||
height: 15,
|
||||
width: 120,
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
margin: const EdgeInsets.only(bottom: 3),
|
||||
),
|
||||
CardLoading(
|
||||
margin: const EdgeInsets.only(bottom: 3),
|
||||
height: 10,
|
||||
width: 80,
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
CardLoading(
|
||||
height: 10,
|
||||
width: 100,
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
import 'package:card_loading/card_loading.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:skripsi_getit/data/state/movie_state.dart';
|
||||
import 'package:skripsi_getit/services/cubit/detail_movie_cubit.dart';
|
||||
import 'package:skripsi_getit/themes/colors.dart';
|
||||
import 'package:skripsi_getit/themes/fonts.dart';
|
||||
import 'package:skripsi_getit/ui/home/detail/widgets/detail_movie_header.dart';
|
||||
import 'package:skripsi_getit/ui/home/detail/widgets/recommendations_movie.dart';
|
||||
import 'package:skripsi_getit/ui/home/detail/widgets/videos_movie.dart';
|
||||
import 'package:skripsi_getit/utils/extensions.dart';
|
||||
|
||||
class DetailMovie extends StatefulWidget {
|
||||
final int movieId;
|
||||
const DetailMovie({super.key, required this.movieId});
|
||||
|
||||
@override
|
||||
State<DetailMovie> createState() => _DetailMovieState();
|
||||
}
|
||||
|
||||
class _DetailMovieState extends State<DetailMovie> {
|
||||
late DetailMovieCubit detailMovieCubit;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
detailMovieCubit = context.read<DetailMovieCubit>();
|
||||
detailMovieCubit.getDetailMovies(widget.movieId);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final deviceSize = context.deviceSize;
|
||||
return Scaffold(
|
||||
backgroundColor: primaryColor,
|
||||
body: SafeArea(
|
||||
child: SingleChildScrollView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
child: BlocBuilder<DetailMovieCubit, DetailMovieState>(
|
||||
builder: (context, state) {
|
||||
if (state.isLoading) {
|
||||
return Center(
|
||||
child: CircularProgressIndicator(color: whiteColor),
|
||||
);
|
||||
} else if (state.errorMessage.isNotEmpty) {
|
||||
return Center(
|
||||
child: Text(
|
||||
"Error: ${state.errorMessage}",
|
||||
style: AppFonts.montserrat(fontSize: 12, color: whiteColor),
|
||||
),
|
||||
);
|
||||
// ignore: unnecessary_null_comparison
|
||||
} else if (state.movies != null) {
|
||||
final movie = state.movies;
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
movie.backdropPath != null
|
||||
? DetailMovieHeader(detailMovie: movie)
|
||||
: CardLoading(height: 250, width: deviceSize.width),
|
||||
VideosMovie(movieId: widget.movieId),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(15.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 30,
|
||||
backgroundColor: whiteColor,
|
||||
child: CircleAvatar(
|
||||
radius: 28,
|
||||
backgroundColor: primaryColor,
|
||||
child: Text(
|
||||
movie.voteAverage != null
|
||||
? '${(movie.voteAverage! * 10).toStringAsFixed(0)}%'
|
||||
: 'N/A',
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 14,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(8),
|
||||
Text(
|
||||
"Vote\nAverage",
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 14,
|
||||
color: whiteColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(14),
|
||||
Text(
|
||||
movie.overview ?? "",
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 12,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
),
|
||||
const Gap(10),
|
||||
RecommendationsMovie(movieId: widget.movieId),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
return Center(
|
||||
child: Text(
|
||||
"No movie details available.",
|
||||
style: AppFonts.montserrat(fontSize: 12, color: whiteColor),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,231 @@
|
|||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:skripsi_getit/data/model/detail_movie_model.dart';
|
||||
import 'package:skripsi_getit/themes/colors.dart';
|
||||
import 'package:skripsi_getit/themes/fonts.dart';
|
||||
import 'package:skripsi_getit/utils/api_config.dart';
|
||||
import 'package:skripsi_getit/utils/date_formatter.dart';
|
||||
import 'package:skripsi_getit/utils/extensions.dart';
|
||||
|
||||
class DetailMovieHeader extends StatelessWidget {
|
||||
final DetailMovie detailMovie;
|
||||
const DetailMovieHeader({super.key, required this.detailMovie});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final deviceSize = context.deviceSize;
|
||||
return SizedBox(
|
||||
height: 275,
|
||||
width: deviceSize.width,
|
||||
child: Stack(
|
||||
children: [
|
||||
ClipRRect(
|
||||
child: Image.network(
|
||||
'https://image.tmdb.org/t/p/w500${detailMovie.backdropPath}',
|
||||
fit: BoxFit.cover,
|
||||
width: deviceSize.width,
|
||||
height: 275,
|
||||
),
|
||||
),
|
||||
Positioned.fill(
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 1, sigmaY: 1),
|
||||
child: Container(color: Colors.black.withOpacity(0.6)),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(15),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(10)),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 20,
|
||||
backgroundColor: whiteColor.withOpacity(0.3),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.keyboard_arrow_left_rounded,
|
||||
color: whiteColor,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
),
|
||||
// CircleAvatar(
|
||||
// radius: 20,
|
||||
// backgroundColor: whiteColor.withOpacity(0.3),
|
||||
// child: IconButton(
|
||||
// onPressed: () {},
|
||||
// icon: Icon(
|
||||
// Icons.favorite_border,
|
||||
// color: whiteColor,
|
||||
// size: 20,
|
||||
// )),
|
||||
// )
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
child: Image.network(
|
||||
'${ApiConfig.imageUrl}${detailMovie.posterPath}',
|
||||
fit: BoxFit.cover,
|
||||
width: 120,
|
||||
height: 170,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
detailMovie.title ?? "",
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 18,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
formatDate(detailMovie.releaseDate ?? ""),
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 12,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
detailMovie.originCountry != null &&
|
||||
detailMovie.originCountry!.isNotEmpty
|
||||
? '(${detailMovie.originCountry!.join(', ')})'
|
||||
: '(Unknown)',
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 12,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Wrap(
|
||||
spacing: 2,
|
||||
children:
|
||||
detailMovie.genres != null
|
||||
? detailMovie.genres!.map((genre) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 6,
|
||||
vertical: 3,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1,
|
||||
color: whiteColor,
|
||||
),
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(
|
||||
4,
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
genre.name ?? '',
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 11,
|
||||
color: whiteColor,
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList()
|
||||
: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 8,
|
||||
vertical: 4,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1,
|
||||
color: whiteColor,
|
||||
),
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(
|
||||
4,
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
'No Genres Available',
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 14,
|
||||
color: whiteColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Gap(5),
|
||||
Text(
|
||||
detailMovie.tagline ?? "",
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Colors.grey,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
// Container(
|
||||
// margin: const EdgeInsets.only(top: 10),
|
||||
// // width: 150,
|
||||
// padding: const EdgeInsets.symmetric(
|
||||
// horizontal: 10, vertical: 5),
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(8),
|
||||
// border:
|
||||
// Border.all(width: 1, color: whiteColor)),
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: [
|
||||
// Icon(
|
||||
// Icons.favorite,
|
||||
// color: whiteColor,
|
||||
// size: 15,
|
||||
// ),
|
||||
// const Gap(8),
|
||||
// Text(
|
||||
// "Your Favorite",
|
||||
// style: AppFonts.montserrat(
|
||||
// fontSize: 12, color: whiteColor),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:skripsi_getit/data/state/movie_state.dart';
|
||||
import 'package:skripsi_getit/services/cubit/recommendations_cubit.dart';
|
||||
import 'package:skripsi_getit/themes/colors.dart';
|
||||
import 'package:skripsi_getit/themes/fonts.dart';
|
||||
import 'package:skripsi_getit/ui/home/widgets/load_movie_placeholder.dart';
|
||||
import 'package:skripsi_getit/ui/home/widgets/movie_card.dart';
|
||||
|
||||
class RecommendationsMovie extends StatefulWidget {
|
||||
final int movieId;
|
||||
const RecommendationsMovie({super.key, required this.movieId});
|
||||
|
||||
@override
|
||||
State<RecommendationsMovie> createState() => _RecommendationsMovieState();
|
||||
}
|
||||
|
||||
class _RecommendationsMovieState extends State<RecommendationsMovie> {
|
||||
late ScrollController _scrollController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_scrollController = ScrollController();
|
||||
_scrollController.addListener(_scrollListener);
|
||||
context.read<RecommendationsCubit>().fetchRecommendationsMovies(
|
||||
widget.movieId,
|
||||
);
|
||||
}
|
||||
|
||||
void _scrollListener() {
|
||||
if (_scrollController.position.pixels ==
|
||||
_scrollController.position.maxScrollExtent) {
|
||||
context.read<RecommendationsCubit>().fetchRecommendationsMovies(
|
||||
widget.movieId,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_scrollController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Text(
|
||||
'Recommendations',
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 16,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 220,
|
||||
child: BlocBuilder<RecommendationsCubit, MovieState>(
|
||||
builder: (context, state) {
|
||||
if (state.isLoading && state.movies.isEmpty) {
|
||||
return ListView.builder(
|
||||
itemCount: 5,
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemBuilder: (context, index) {
|
||||
return const LoadMoviePlaceholder();
|
||||
},
|
||||
);
|
||||
} else if (state.errorMessage.isNotEmpty) {
|
||||
return Center(
|
||||
child: Text(
|
||||
state.errorMessage,
|
||||
style: AppFonts.montserrat(fontSize: 12, color: whiteColor),
|
||||
),
|
||||
);
|
||||
} else if (state.movies.isEmpty) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'No movies available',
|
||||
style: AppFonts.montserrat(fontSize: 12, color: whiteColor),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return ListView.builder(
|
||||
controller: _scrollController,
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: state.movies.length + (state.isLoading ? 1 : 0),
|
||||
itemBuilder: (context, index) {
|
||||
if (index == state.movies.length) {
|
||||
return Center(
|
||||
child: CircularProgressIndicator(color: whiteColor),
|
||||
);
|
||||
} else {
|
||||
return MovieCard(movie: state.movies[index]);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,169 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:skripsi_getit/data/state/video_state.dart';
|
||||
import 'package:skripsi_getit/services/cubit/detail_video_cubit.dart';
|
||||
import 'package:skripsi_getit/themes/colors.dart';
|
||||
import 'package:skripsi_getit/themes/fonts.dart';
|
||||
import 'package:skripsi_getit/utils/date_formatter.dart';
|
||||
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
|
||||
|
||||
class VideosMovie extends StatefulWidget {
|
||||
final int movieId;
|
||||
const VideosMovie({super.key, required this.movieId});
|
||||
|
||||
@override
|
||||
State<VideosMovie> createState() => _VideosMovieState();
|
||||
}
|
||||
|
||||
class _VideosMovieState extends State<VideosMovie> {
|
||||
late DetailVideoCubit detailVideoCubit;
|
||||
YoutubePlayerController? ytController;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
super.initState();
|
||||
detailVideoCubit = context.read<DetailVideoCubit>();
|
||||
detailVideoCubit.getVideosMovies(widget.movieId);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
ytController?.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void initializeYoutubePlayer(String videoKey) {
|
||||
ytController = YoutubePlayerController(
|
||||
initialVideoId: videoKey,
|
||||
flags: const YoutubePlayerFlags(autoPlay: false, mute: false),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 215,
|
||||
margin: const EdgeInsets.fromLTRB(15, 15, 0, 15),
|
||||
child: BlocBuilder<DetailVideoCubit, DetailVideosState>(
|
||||
builder: (context, state) {
|
||||
if (state.isLoading) {
|
||||
return Center(child: CircularProgressIndicator(color: whiteColor));
|
||||
} else if (state.errorMessage.isNotEmpty) {
|
||||
return Center(
|
||||
child: Text(
|
||||
"Error: ${state.errorMessage}",
|
||||
style: AppFonts.montserrat(fontSize: 12, color: whiteColor),
|
||||
),
|
||||
);
|
||||
} else if (state.movies.results != null) {
|
||||
return ListView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
shrinkWrap: true,
|
||||
itemCount: state.movies.results?.length ?? 0,
|
||||
itemBuilder: (context, index) {
|
||||
final video = state.movies.results![index];
|
||||
final videoKey = video.key;
|
||||
if (videoKey != null && ytController == null) {
|
||||
initializeYoutubePlayer(videoKey);
|
||||
}
|
||||
return SizedBox(
|
||||
width: 250,
|
||||
child: Column(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// ignore: unnecessary_null_comparison
|
||||
if (videoKey != null) {
|
||||
initializeYoutubePlayer(videoKey);
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
height: 150,
|
||||
width: 250,
|
||||
margin: const EdgeInsets.only(right: 10),
|
||||
child:
|
||||
ytController != null &&
|
||||
ytController!.initialVideoId == videoKey
|
||||
? YoutubePlayer(
|
||||
controller: ytController!,
|
||||
showVideoProgressIndicator: true,
|
||||
)
|
||||
: Container(
|
||||
color: secondaryColor.withOpacity(0.7),
|
||||
alignment: Alignment.center,
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
"images/youtube.png",
|
||||
height: 50,
|
||||
),
|
||||
Text(
|
||||
"Tap to play",
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 12,
|
||||
color: whiteColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(8),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
formatDate(video.publishedAt ?? ""),
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 11,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
textAlign: TextAlign.right,
|
||||
),
|
||||
),
|
||||
),
|
||||
const Gap(8),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
video.name ?? 'No Title',
|
||||
style: AppFonts.montserrat(
|
||||
fontSize: 12,
|
||||
color: whiteColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
// return const SizedBox.shrink();
|
||||
},
|
||||
);
|
||||
}
|
||||
return Center(
|
||||
child: Text(
|
||||
"No videos available.",
|
||||
style: AppFonts.montserrat(fontSize: 12, color: whiteColor),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:skripsi_getit/themes/colors.dart';
|
||||
import 'package:skripsi_getit/ui/home/movie/popular_bulk_movie.dart';
|
||||
import 'package:skripsi_getit/ui/home/movie/popular_movie.dart';
|
||||
import 'package:skripsi_getit/ui/home/movie/top_rated_movie.dart';
|
||||
import 'package:skripsi_getit/ui/home/movie/upcoming_movie.dart';
|
||||
import 'package:skripsi_getit/ui/home/test_view.dart';
|
||||
import 'package:skripsi_getit/ui/home/widgets/widget_top_home.dart';
|
||||
|
||||
import '../../themes/fonts.dart';
|
||||
|
||||
class Home extends StatefulWidget {
|
||||
const Home({super.key});
|
||||
|
||||
@override
|
||||
State<Home> createState() => _HomeState();
|
||||
}
|
||||
|
||||
class _HomeState extends State<Home> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: primaryColor,
|
||||
body: SafeArea(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(20),
|
||||
physics: const BouncingScrollPhysics(),
|
||||
child: Column(
|
||||
children: [
|
||||
const WidgetTopHome(),
|
||||
Gap(15),
|
||||
SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
children: [
|
||||
ElevatedButton.icon(
|
||||
icon: Icon(Icons.search, color: whiteColor),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: darkColor,
|
||||
shadowColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, '/search');
|
||||
},
|
||||
label: Text(
|
||||
"Search",
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: whiteColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
Gap(20),
|
||||
|
||||
ElevatedButton.icon(
|
||||
icon: Icon(Icons.loop, color: whiteColor),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: darkColor,
|
||||
shadowColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const TestView(),
|
||||
),
|
||||
);
|
||||
},
|
||||
label: Text(
|
||||
"Loop Movie",
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: whiteColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
Gap(20),
|
||||
ElevatedButton.icon(
|
||||
icon: Icon(Icons.download, color: whiteColor),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: darkColor,
|
||||
shadowColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const PopularBulkViewBloc(),
|
||||
),
|
||||
);
|
||||
},
|
||||
label: Text(
|
||||
"Load Movie",
|
||||
style: AppFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: whiteColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
TopRatedMovie(),
|
||||
PopularMovie(),
|
||||
UpcomingMovie(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|