Mobile
|
@ -0,0 +1,2 @@
|
||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
|
@ -0,0 +1,44 @@
|
||||||
|
# Miscellaneous
|
||||||
|
*.class
|
||||||
|
*.log
|
||||||
|
*.pyc
|
||||||
|
*.swp
|
||||||
|
.DS_Store
|
||||||
|
.atom/
|
||||||
|
.buildlog/
|
||||||
|
.history
|
||||||
|
.svn/
|
||||||
|
migrate_working_dir/
|
||||||
|
|
||||||
|
# IntelliJ related
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# The .vscode folder contains launch configuration and tasks you configure in
|
||||||
|
# VS Code which you may wish to be included in version control, so this line
|
||||||
|
# is commented out by default.
|
||||||
|
#.vscode/
|
||||||
|
|
||||||
|
# Flutter/Dart/Pub related
|
||||||
|
**/doc/api/
|
||||||
|
**/ios/Flutter/.last_build_id
|
||||||
|
.dart_tool/
|
||||||
|
.flutter-plugins
|
||||||
|
.flutter-plugins-dependencies
|
||||||
|
.packages
|
||||||
|
.pub-cache/
|
||||||
|
.pub/
|
||||||
|
/build/
|
||||||
|
|
||||||
|
# Symbolication related
|
||||||
|
app.*.symbols
|
||||||
|
|
||||||
|
# Obfuscation related
|
||||||
|
app.*.map.json
|
||||||
|
|
||||||
|
# Android Studio will place build artifacts here
|
||||||
|
/android/app/debug
|
||||||
|
/android/app/profile
|
||||||
|
/android/app/release
|
|
@ -0,0 +1,45 @@
|
||||||
|
# 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: "6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e"
|
||||||
|
channel: "stable"
|
||||||
|
|
||||||
|
project_type: app
|
||||||
|
|
||||||
|
# Tracks metadata for the flutter migrate command
|
||||||
|
migration:
|
||||||
|
platforms:
|
||||||
|
- platform: root
|
||||||
|
create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
- platform: android
|
||||||
|
create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
- platform: ios
|
||||||
|
create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
- platform: linux
|
||||||
|
create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
- platform: macos
|
||||||
|
create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
- platform: web
|
||||||
|
create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
- platform: windows
|
||||||
|
create_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
base_revision: 6c4930c4ac86fb286f30e31d0ec8bffbcbb9953e
|
||||||
|
|
||||||
|
# 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,16 @@
|
||||||
|
# skripsi_pos_dg
|
||||||
|
|
||||||
|
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,13 @@
|
||||||
|
gradle-wrapper.jar
|
||||||
|
/.gradle
|
||||||
|
/captures/
|
||||||
|
/gradlew
|
||||||
|
/gradlew.bat
|
||||||
|
/local.properties
|
||||||
|
GeneratedPluginRegistrant.java
|
||||||
|
|
||||||
|
# Remember to never publicly share your keystore.
|
||||||
|
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||||
|
key.properties
|
||||||
|
**/*.keystore
|
||||||
|
**/*.jks
|
|
@ -0,0 +1,67 @@
|
||||||
|
plugins {
|
||||||
|
id "com.android.application"
|
||||||
|
id "kotlin-android"
|
||||||
|
id "dev.flutter.flutter-gradle-plugin"
|
||||||
|
}
|
||||||
|
|
||||||
|
def localProperties = new Properties()
|
||||||
|
def localPropertiesFile = rootProject.file('local.properties')
|
||||||
|
if (localPropertiesFile.exists()) {
|
||||||
|
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||||
|
localProperties.load(reader)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||||
|
if (flutterVersionCode == null) {
|
||||||
|
flutterVersionCode = '1'
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||||
|
if (flutterVersionName == null) {
|
||||||
|
flutterVersionName = '1.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace "com.example.skripsi_pos_dg"
|
||||||
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
ndkVersion flutter.ndkVersion
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = '1.8'
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main.java.srcDirs += 'src/main/kotlin'
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
|
applicationId "com.example.skripsi_pos_dg"
|
||||||
|
// You can update the following values to match your application needs.
|
||||||
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
|
minSdkVersion flutter.minSdkVersion
|
||||||
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
|
versionCode flutterVersionCode.toInteger()
|
||||||
|
versionName flutterVersionName
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
// TODO: Add your own signing config for the release build.
|
||||||
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||||
|
signingConfig signingConfigs.debug
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
flutter {
|
||||||
|
source '../..'
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {}
|
|
@ -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,33 @@
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<application
|
||||||
|
android:label="skripsi_pos_dg"
|
||||||
|
android:name="${applicationName}"
|
||||||
|
android:icon="@mipmap/ic_launcher">
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:launchMode="singleTop"
|
||||||
|
android:theme="@style/LaunchTheme"
|
||||||
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
|
android:hardwareAccelerated="true"
|
||||||
|
android:windowSoftInputMode="adjustResize">
|
||||||
|
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||||
|
the Android process has started. This theme is visible to the user
|
||||||
|
while the Flutter UI initializes. After that, this theme continues
|
||||||
|
to determine the Window background behind the Flutter UI. -->
|
||||||
|
<meta-data
|
||||||
|
android:name="io.flutter.embedding.android.NormalTheme"
|
||||||
|
android:resource="@style/NormalTheme"
|
||||||
|
/>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<!-- Don't delete the meta-data below.
|
||||||
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||||
|
<meta-data
|
||||||
|
android:name="flutterEmbedding"
|
||||||
|
android:value="2" />
|
||||||
|
</application>
|
||||||
|
</manifest>
|
|
@ -0,0 +1,6 @@
|
||||||
|
package com.example.skripsi_pos_dg
|
||||||
|
|
||||||
|
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,31 @@
|
||||||
|
buildscript {
|
||||||
|
ext.kotlin_version = '1.7.10'
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.android.tools.build:gradle:7.3.0'
|
||||||
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rootProject.buildDir = '../build'
|
||||||
|
subprojects {
|
||||||
|
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||||
|
}
|
||||||
|
subprojects {
|
||||||
|
project.evaluationDependsOn(':app')
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register("clean", Delete) {
|
||||||
|
delete rootProject.buildDir
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
org.gradle.jvmargs=-Xmx1536M
|
||||||
|
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-7.5-all.zip
|
|
@ -0,0 +1,20 @@
|
||||||
|
pluginManagement {
|
||||||
|
def flutterSdkPath = {
|
||||||
|
def properties = new Properties()
|
||||||
|
file("local.properties").withInputStream { properties.load(it) }
|
||||||
|
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||||
|
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||||
|
return flutterSdkPath
|
||||||
|
}
|
||||||
|
settings.ext.flutterSdkPath = flutterSdkPath()
|
||||||
|
|
||||||
|
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
include ":app"
|
||||||
|
|
||||||
|
apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
|
@ -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>11.0</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
|
@ -0,0 +1 @@
|
||||||
|
#include "Generated.xcconfig"
|
|
@ -0,0 +1 @@
|
||||||
|
#include "Generated.xcconfig"
|
|
@ -0,0 +1,614 @@
|
||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 54;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||||
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||||
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||||
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||||
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||||
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||||
|
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
|
||||||
|
remoteInfo = Runner;
|
||||||
|
};
|
||||||
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "";
|
||||||
|
dstSubfolderSpec = 10;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
name = "Embed Frameworks";
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||||
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||||
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||||
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||||
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
|
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||||
|
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||||
|
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
|
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||||
|
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||||
|
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||||
|
);
|
||||||
|
name = Flutter;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
331C807B294A618700263BE5 /* RunnerTests.swift */,
|
||||||
|
);
|
||||||
|
path = RunnerTests;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
97C146E51CF9000F007C117D = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
9740EEB11CF90186004384FC /* Flutter */,
|
||||||
|
97C146F01CF9000F007C117D /* Runner */,
|
||||||
|
97C146EF1CF9000F007C117D /* Products */,
|
||||||
|
331C8082294A63A400263BE5 /* RunnerTests */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
97C146EF1CF9000F007C117D /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||||
|
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
97C146F01CF9000F007C117D /* Runner */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||||
|
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||||
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||||
|
97C147021CF9000F007C117D /* Info.plist */,
|
||||||
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||||
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||||
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||||
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||||
|
);
|
||||||
|
path = Runner;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
331C8080294A63A400263BE5 /* RunnerTests */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||||
|
buildPhases = (
|
||||||
|
331C807D294A63A400263BE5 /* Sources */,
|
||||||
|
331C807E294A63A400263BE5 /* Frameworks */,
|
||||||
|
331C807F294A63A400263BE5 /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
331C8086294A63A400263BE5 /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = RunnerTests;
|
||||||
|
productName = RunnerTests;
|
||||||
|
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
|
||||||
|
productType = "com.apple.product-type.bundle.unit-test";
|
||||||
|
};
|
||||||
|
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
|
buildPhases = (
|
||||||
|
9740EEB61CF901F6004384FC /* Run Script */,
|
||||||
|
97C146EA1CF9000F007C117D /* Sources */,
|
||||||
|
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||||
|
97C146EC1CF9000F007C117D /* Resources */,
|
||||||
|
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||||
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = Runner;
|
||||||
|
productName = Runner;
|
||||||
|
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
97C146E61CF9000F007C117D /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
BuildIndependentTargetsInParallel = YES;
|
||||||
|
LastUpgradeCheck = 1430;
|
||||||
|
ORGANIZATIONNAME = "";
|
||||||
|
TargetAttributes = {
|
||||||
|
331C8080294A63A400263BE5 = {
|
||||||
|
CreatedOnToolsVersion = 14.0;
|
||||||
|
TestTargetID = 97C146ED1CF9000F007C117D;
|
||||||
|
};
|
||||||
|
97C146ED1CF9000F007C117D = {
|
||||||
|
CreatedOnToolsVersion = 7.3.1;
|
||||||
|
LastSwiftMigration = 1100;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||||
|
compatibilityVersion = "Xcode 9.3";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
Base,
|
||||||
|
);
|
||||||
|
mainGroup = 97C146E51CF9000F007C117D;
|
||||||
|
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
97C146ED1CF9000F007C117D /* Runner */,
|
||||||
|
331C8080294A63A400263BE5 /* RunnerTests */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
331C807F294A63A400263BE5 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||||
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||||
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||||
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
|
||||||
|
);
|
||||||
|
name = "Thin Binary";
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||||
|
};
|
||||||
|
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = "Run Script";
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
331C807D294A63A400263BE5 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||||
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXTargetDependency section */
|
||||||
|
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 97C146ED1CF9000F007C117D /* Runner */;
|
||||||
|
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
/* End PBXTargetDependency section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
97C146FB1CF9000F007C117D /* Base */,
|
||||||
|
);
|
||||||
|
name = Main.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
97C147001CF9000F007C117D /* Base */,
|
||||||
|
);
|
||||||
|
name = LaunchScreen.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.skripsiPosDg;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
331C8088294A63A400263BE5 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.skripsiPosDg.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
331C8089294A63A400263BE5 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.skripsiPosDg.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
331C808A294A63A400263BE5 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.skripsiPosDg.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
97C147031CF9000F007C117D /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
97C147041CF9000F007C117D /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
97C147061CF9000F007C117D /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.skripsiPosDg;
|
||||||
|
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.skripsiPosDg;
|
||||||
|
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,98 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1430"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||||
|
BuildableName = "Runner.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||||
|
BuildableName = "Runner.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<Testables>
|
||||||
|
<TestableReference
|
||||||
|
skipped = "NO"
|
||||||
|
parallelizable = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "331C8080294A63A400263BE5"
|
||||||
|
BuildableName = "RunnerTests.xctest"
|
||||||
|
BlueprintName = "RunnerTests"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</TestableReference>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||||
|
BuildableName = "Runner.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Profile"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||||
|
BuildableName = "Runner.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
|
@ -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 UIKit
|
||||||
|
import Flutter
|
||||||
|
|
||||||
|
@UIApplicationMain
|
||||||
|
@objc class AppDelegate: FlutterAppDelegate {
|
||||||
|
override func application(
|
||||||
|
_ application: UIApplication,
|
||||||
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||||
|
) -> Bool {
|
||||||
|
GeneratedPluginRegistrant.register(with: self)
|
||||||
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||||
|
}
|
||||||
|
}
|
|
@ -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 Pos Dg</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_pos_dg</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,10 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AppColor {
|
||||||
|
static const primaryColor = Color(0xff51B1A6);
|
||||||
|
static const secondaryColor = Color(0xffB2DDD8);
|
||||||
|
static const lightGreyColor = Color(0xffE4E7EE);
|
||||||
|
static const darkGreyColor = Color(0xff6C757D);
|
||||||
|
static const whiteColor = Color(0xffFFFFFF);
|
||||||
|
static const blackColor = Color(0xff1E1E1E);
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
|
class AppFormat {
|
||||||
|
static String date(DateTime date) {
|
||||||
|
String result = DateFormat('d MMM yyyy', 'id_ID').format(date);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
// ignore_for_file: constant_identifier_names
|
||||||
|
|
||||||
|
class Api {
|
||||||
|
static const BASE_URL = "https://skripsi-bahrul.farulwananda.com/api";
|
||||||
|
|
||||||
|
static const BASE_URL_FOR_FUZZY =
|
||||||
|
"https://f477-103-109-209-254.ngrok-free.app/deteksi-gizi";
|
||||||
|
}
|
|
@ -0,0 +1,136 @@
|
||||||
|
// import 'dart:convert';
|
||||||
|
|
||||||
|
// import 'package:http/http.dart' as http;
|
||||||
|
|
||||||
|
// class AppRequest{
|
||||||
|
|
||||||
|
// static Future<Map?> getMethod(String url) async {
|
||||||
|
// try {
|
||||||
|
// var response = await http.get(Uri.parse(url));
|
||||||
|
// Map? responseBody = jsonDecode(response.body);
|
||||||
|
// return responseBody;
|
||||||
|
// } catch (e) {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// static Future<Map?> postMethod(String url, Object? body) async {
|
||||||
|
// try {
|
||||||
|
// var response = await http.get(Uri.parse(url));
|
||||||
|
// Map<String, dynamic> responseBody = jsonDecode(response.body);
|
||||||
|
// return responseBody;
|
||||||
|
// } catch (e) {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
import 'package:http/http.dart' as http;
|
||||||
|
|
||||||
|
class AppRequest {
|
||||||
|
static const Map<String, String> headers = {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
};
|
||||||
|
|
||||||
|
static Future<Map?> getMethod(String url, String token) async {
|
||||||
|
try {
|
||||||
|
var response = await http.get(
|
||||||
|
Uri.parse(url),
|
||||||
|
headers: {
|
||||||
|
...headers,
|
||||||
|
'Authorization': 'Bearer $token',
|
||||||
|
},
|
||||||
|
);
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
Map<String, dynamic> responseBody = jsonDecode(response.body);
|
||||||
|
return responseBody;
|
||||||
|
} else {
|
||||||
|
return null; // or handle error
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<Map?> postMethod(String url, Object? body, {String? token}) async {
|
||||||
|
try {
|
||||||
|
var response = await http.post(
|
||||||
|
Uri.parse(url),
|
||||||
|
headers: {
|
||||||
|
...headers,
|
||||||
|
if (token != null) 'Authorization': 'Bearer $token',
|
||||||
|
},
|
||||||
|
body: jsonEncode(body),
|
||||||
|
);
|
||||||
|
if (response.statusCode == 200 || response.statusCode == 201) {
|
||||||
|
Map<String, dynamic> responseBody = jsonDecode(response.body);
|
||||||
|
return responseBody;
|
||||||
|
} else {
|
||||||
|
return null; // or handle error
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<Map?> putMethod(String url, Object? body, String token) async {
|
||||||
|
try {
|
||||||
|
var response = await http.put(
|
||||||
|
Uri.parse(url),
|
||||||
|
headers: {
|
||||||
|
...headers,
|
||||||
|
'Authorization': 'Bearer $token',
|
||||||
|
},
|
||||||
|
body: jsonEncode(body),
|
||||||
|
);
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
Map<String, dynamic> responseBody = jsonDecode(response.body);
|
||||||
|
return responseBody;
|
||||||
|
} else {
|
||||||
|
return null; // or handle error
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<Map?> deleteMethod(String url, String token) async {
|
||||||
|
try {
|
||||||
|
var response = await http.delete(
|
||||||
|
Uri.parse(url),
|
||||||
|
headers: {
|
||||||
|
...headers,
|
||||||
|
'Authorization': 'Bearer $token',
|
||||||
|
},
|
||||||
|
);
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
Map<String, dynamic> responseBody = jsonDecode(response.body);
|
||||||
|
return responseBody;
|
||||||
|
} else {
|
||||||
|
return null; // or handle error
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<Map<String, dynamic>?> postMethodForFuzzy(String url, Map<String, dynamic> body) async {
|
||||||
|
try {
|
||||||
|
final response = await http.post(
|
||||||
|
Uri.parse(url),
|
||||||
|
headers: {"Content-Type": "application/json"},
|
||||||
|
body: json.encode(body),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
return json.decode(response.body);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
print('Error: $e');
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/auth_response_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_auth.dart';
|
||||||
|
|
||||||
|
class Session {
|
||||||
|
//save user and token
|
||||||
|
static Future<bool> saveAuthData(AuthResponseModel user) async {
|
||||||
|
if (user.token == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
final pref = await SharedPreferences.getInstance();
|
||||||
|
await pref.setString('token', user.token!);
|
||||||
|
await pref.setString('user_data', jsonEncode(user.data?.toJson()));
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
cAuth.setData(user);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<AuthResponseModel?> getAuthData() async {
|
||||||
|
final pref = await SharedPreferences.getInstance();
|
||||||
|
String? token = pref.getString('token');
|
||||||
|
String? userDataString = pref.getString('user_data');
|
||||||
|
|
||||||
|
if (token != null && userDataString != null) {
|
||||||
|
Map<String, dynamic> userDataJson = json.decode(userDataString);
|
||||||
|
Data userData = Data.fromJson(userDataJson);
|
||||||
|
AuthResponseModel authResponse = AuthResponseModel(
|
||||||
|
token: token,
|
||||||
|
data: userData,
|
||||||
|
);
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
cAuth.setData(authResponse);
|
||||||
|
return authResponse;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<bool> clearAuthData() async {
|
||||||
|
final pref = await SharedPreferences.getInstance();
|
||||||
|
await pref.remove('token');
|
||||||
|
await pref.remove('user_data');
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
cAuth.setData(AuthResponseModel());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,77 @@
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
AuthResponseModel authResponseModelFromJson(String str) => AuthResponseModel.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String authResponseModelToJson(AuthResponseModel data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class AuthResponseModel {
|
||||||
|
final bool? success;
|
||||||
|
final String? message;
|
||||||
|
final Data? data;
|
||||||
|
final String? token;
|
||||||
|
|
||||||
|
AuthResponseModel({
|
||||||
|
this.success,
|
||||||
|
this.message,
|
||||||
|
this.data,
|
||||||
|
this.token,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory AuthResponseModel.fromJson(Map<String, dynamic> json) => AuthResponseModel(
|
||||||
|
success: json["success"],
|
||||||
|
message: json["message"],
|
||||||
|
data: json["data"] == null ? null : Data.fromJson(json["data"]),
|
||||||
|
token: json["token"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"success": success,
|
||||||
|
"message": message,
|
||||||
|
"data": data?.toJson(),
|
||||||
|
"token": token,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class Data {
|
||||||
|
final int? id;
|
||||||
|
final String? name;
|
||||||
|
final String? email;
|
||||||
|
final String? phone;
|
||||||
|
final String? roles;
|
||||||
|
final String? kodeNikNip;
|
||||||
|
final DateTime? tanggalLahir;
|
||||||
|
final String? alamat;
|
||||||
|
|
||||||
|
Data({
|
||||||
|
this.id,
|
||||||
|
this.name,
|
||||||
|
this.email,
|
||||||
|
this.phone,
|
||||||
|
this.roles,
|
||||||
|
this.kodeNikNip,
|
||||||
|
this.tanggalLahir,
|
||||||
|
this.alamat,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Data.fromJson(Map<String, dynamic> json) => Data(
|
||||||
|
id: json["id"],
|
||||||
|
name: json["name"],
|
||||||
|
email: json["email"],
|
||||||
|
phone: json["phone"],
|
||||||
|
roles: json["roles"],
|
||||||
|
kodeNikNip: json["kode_nik_nip"],
|
||||||
|
tanggalLahir: json["tanggal_lahir"] == null ? null : DateTime.parse(json["tanggal_lahir"]),
|
||||||
|
alamat: json["alamat"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"name": name,
|
||||||
|
"email": email,
|
||||||
|
"phone": phone,
|
||||||
|
"roles": roles,
|
||||||
|
"kode_nik_nip": kodeNikNip,
|
||||||
|
"tanggal_lahir": "${tanggalLahir!.year.toString().padLeft(4, '0')}-${tanggalLahir!.month.toString().padLeft(2, '0')}-${tanggalLahir!.day.toString().padLeft(2, '0')}",
|
||||||
|
"alamat": alamat,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,64 @@
|
||||||
|
import 'dart:convert';
|
||||||
|
import 'dart:ffi';
|
||||||
|
|
||||||
|
BalitaInOrtuModel balitaInOrtuModelFromJson(String str) =>
|
||||||
|
BalitaInOrtuModel.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String balitaInOrtuModelToJson(BalitaInOrtuModel data) =>
|
||||||
|
json.encode(data.toJson());
|
||||||
|
|
||||||
|
class BalitaInOrtuModel {
|
||||||
|
final int? id;
|
||||||
|
final String? name;
|
||||||
|
final DateTime? tanggalLahir;
|
||||||
|
final String? jenisKelamin;
|
||||||
|
final Double? bbLahir;
|
||||||
|
final Double? tbLahir;
|
||||||
|
final int? orangTuaId;
|
||||||
|
final int? posyanduId;
|
||||||
|
final String? createdAt;
|
||||||
|
final String? updatedAt;
|
||||||
|
|
||||||
|
BalitaInOrtuModel({
|
||||||
|
this.id,
|
||||||
|
this.name,
|
||||||
|
this.tanggalLahir,
|
||||||
|
this.jenisKelamin,
|
||||||
|
this.bbLahir,
|
||||||
|
this.tbLahir,
|
||||||
|
this.orangTuaId,
|
||||||
|
this.posyanduId,
|
||||||
|
this.createdAt,
|
||||||
|
this.updatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory BalitaInOrtuModel.fromJson(Map<String, dynamic> json) =>
|
||||||
|
BalitaInOrtuModel(
|
||||||
|
id: json["id"],
|
||||||
|
name: json["name"],
|
||||||
|
tanggalLahir: json["tanggal_lahir"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["tanggal_lahir"]),
|
||||||
|
jenisKelamin: json["jenis_kelamin"],
|
||||||
|
bbLahir: json["bb_lahir"].toDouble(),
|
||||||
|
tbLahir: json["tb_lahir"].toDouble(),
|
||||||
|
orangTuaId: json["orang_tua_id"],
|
||||||
|
posyanduId: json["posyandu_id"],
|
||||||
|
createdAt: json["created_at"],
|
||||||
|
updatedAt: json["updated_at"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"name": name,
|
||||||
|
"tanggal_lahir":
|
||||||
|
"${tanggalLahir!.year.toString().padLeft(4, '0')}-${tanggalLahir!.month.toString().padLeft(2, '0')}-${tanggalLahir!.day.toString().padLeft(2, '0')}",
|
||||||
|
"jenis_kelamin": jenisKelamin,
|
||||||
|
"bb_lahir": bbLahir,
|
||||||
|
"tb_lahir": tbLahir,
|
||||||
|
"orang_tua_id": orangTuaId,
|
||||||
|
"posyandu_id": posyanduId,
|
||||||
|
"created_at": createdAt,
|
||||||
|
"updated_at": updatedAt,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
BalitaInPosyanduModel balitaInPosyanduModelFromJson(String str) =>
|
||||||
|
BalitaInPosyanduModel.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String balitaInPosyanduModelToJson(BalitaInPosyanduModel data) =>
|
||||||
|
json.encode(data.toJson());
|
||||||
|
|
||||||
|
class BalitaInPosyanduModel {
|
||||||
|
final int? id;
|
||||||
|
final String? name;
|
||||||
|
final DateTime? tanggalLahir;
|
||||||
|
final String? jenisKelamin;
|
||||||
|
final String? bbLahir;
|
||||||
|
final String? tbLahir;
|
||||||
|
final int? orangTuaId;
|
||||||
|
final int? posyanduId;
|
||||||
|
|
||||||
|
BalitaInPosyanduModel({
|
||||||
|
this.id,
|
||||||
|
this.name,
|
||||||
|
this.tanggalLahir,
|
||||||
|
this.jenisKelamin,
|
||||||
|
this.bbLahir,
|
||||||
|
this.tbLahir,
|
||||||
|
this.orangTuaId,
|
||||||
|
this.posyanduId,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory BalitaInPosyanduModel.fromJson(Map<String, dynamic> json) =>
|
||||||
|
BalitaInPosyanduModel(
|
||||||
|
id: json["id"],
|
||||||
|
name: json["name"],
|
||||||
|
tanggalLahir: json["tanggal_lahir"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["tanggal_lahir"]),
|
||||||
|
jenisKelamin: json["jenis_kelamin"],
|
||||||
|
bbLahir: json["bb_lahir"],
|
||||||
|
tbLahir: json["tb_lahir"],
|
||||||
|
orangTuaId: json["orang_tua_id"],
|
||||||
|
posyanduId: json["posyandu_id"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"name": name,
|
||||||
|
"tanggal_lahir":
|
||||||
|
"${tanggalLahir!.year.toString().padLeft(4, '0')}-${tanggalLahir!.month.toString().padLeft(2, '0')}-${tanggalLahir!.day.toString().padLeft(2, '0')}",
|
||||||
|
"jenis_kelamin": jenisKelamin,
|
||||||
|
"bb_lahir": bbLahir,
|
||||||
|
"tb_lahir": tbLahir,
|
||||||
|
"orang_tua_id": orangTuaId,
|
||||||
|
"posyandu_id": posyanduId,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,134 @@
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
DetailBalitaModel detailBalitaModelFromJson(String str) =>
|
||||||
|
DetailBalitaModel.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String detailBalitaModelToJson(DetailBalitaModel data) =>
|
||||||
|
json.encode(data.toJson());
|
||||||
|
|
||||||
|
class DetailBalitaModel {
|
||||||
|
final int? id;
|
||||||
|
final int? usia;
|
||||||
|
final String? beratBadan;
|
||||||
|
final String? tinggiBadan;
|
||||||
|
final String? status;
|
||||||
|
final int? jadwalId;
|
||||||
|
final int? balitaId;
|
||||||
|
final DateTime? createdAt;
|
||||||
|
final DateTime? updatedAt;
|
||||||
|
final HasilFuzzy? hasilFuzzy;
|
||||||
|
|
||||||
|
DetailBalitaModel({
|
||||||
|
this.id,
|
||||||
|
this.usia,
|
||||||
|
this.beratBadan,
|
||||||
|
this.tinggiBadan,
|
||||||
|
this.status,
|
||||||
|
this.jadwalId,
|
||||||
|
this.balitaId,
|
||||||
|
this.createdAt,
|
||||||
|
this.updatedAt,
|
||||||
|
this.hasilFuzzy,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory DetailBalitaModel.fromJson(Map<String, dynamic> json) =>
|
||||||
|
DetailBalitaModel(
|
||||||
|
id: json["id"],
|
||||||
|
usia: json["usia"],
|
||||||
|
beratBadan: json["berat_badan"],
|
||||||
|
tinggiBadan: json["tinggi_badan"],
|
||||||
|
status: json["status"],
|
||||||
|
jadwalId: json["jadwal_id"],
|
||||||
|
balitaId: json["balita_id"],
|
||||||
|
createdAt: json["created_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["created_at"]),
|
||||||
|
updatedAt: json["updated_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["updated_at"]),
|
||||||
|
hasilFuzzy: json["hasil_fuzzy"] == null
|
||||||
|
? null
|
||||||
|
: HasilFuzzy.fromJson(json["hasil_fuzzy"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"usia": usia,
|
||||||
|
"berat_badan": beratBadan,
|
||||||
|
"tinggi_badan": tinggiBadan,
|
||||||
|
"status": status,
|
||||||
|
"jadwal_id": jadwalId,
|
||||||
|
"balita_id": balitaId,
|
||||||
|
"created_at": createdAt?.toIso8601String(),
|
||||||
|
"updated_at": updatedAt?.toIso8601String(),
|
||||||
|
"hasil_fuzzy": hasilFuzzy?.toJson(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class HasilFuzzy {
|
||||||
|
final int? id;
|
||||||
|
final int? pemeriksaanId;
|
||||||
|
final String? statusGiziBbU;
|
||||||
|
final double? deffValBbU;
|
||||||
|
final double? valDegreeBbU;
|
||||||
|
final String? statusGiziTbU;
|
||||||
|
final double? deffValTbU;
|
||||||
|
final double? valDegreeTbU;
|
||||||
|
final String? statusGiziBbTb;
|
||||||
|
final double? deffValBbTb;
|
||||||
|
final double? valDegreeBbTb;
|
||||||
|
final DateTime? createdAt;
|
||||||
|
final DateTime? updatedAt;
|
||||||
|
|
||||||
|
HasilFuzzy({
|
||||||
|
this.id,
|
||||||
|
this.pemeriksaanId,
|
||||||
|
this.statusGiziBbU,
|
||||||
|
this.deffValBbU,
|
||||||
|
this.valDegreeBbU,
|
||||||
|
this.statusGiziTbU,
|
||||||
|
this.deffValTbU,
|
||||||
|
this.valDegreeTbU,
|
||||||
|
this.statusGiziBbTb,
|
||||||
|
this.deffValBbTb,
|
||||||
|
this.valDegreeBbTb,
|
||||||
|
this.createdAt,
|
||||||
|
this.updatedAt,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory HasilFuzzy.fromJson(Map<String, dynamic> json) => HasilFuzzy(
|
||||||
|
id: json["id"],
|
||||||
|
pemeriksaanId: json["pemeriksaan_id"],
|
||||||
|
statusGiziBbU: json["status_gizi_bb_u"],
|
||||||
|
deffValBbU: json["deff_val_bb_u"]?.toDouble(),
|
||||||
|
valDegreeBbU: json["val_degree_bb_u"]?.toDouble(),
|
||||||
|
statusGiziTbU: json["status_gizi_tb_u"],
|
||||||
|
deffValTbU: json["deff_val_tb_u"]?.toDouble(),
|
||||||
|
valDegreeTbU: json["val_degree_tb_u"].toDouble(),
|
||||||
|
statusGiziBbTb: json["status_gizi_bb_tb"],
|
||||||
|
deffValBbTb: json["deff_val_bb_tb"]?.toDouble(),
|
||||||
|
valDegreeBbTb: json["val_degree_bb_tb"]?.toDouble(),
|
||||||
|
createdAt: json["created_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["created_at"]),
|
||||||
|
updatedAt: json["updated_at"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["updated_at"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"pemeriksaan_id": pemeriksaanId,
|
||||||
|
"status_gizi_bb_u": statusGiziBbU,
|
||||||
|
"deff_val_bb_u": deffValBbU,
|
||||||
|
"val_degree_bb_u": valDegreeBbU,
|
||||||
|
"status_gizi_tb_u": statusGiziTbU,
|
||||||
|
"deff_val_tb_u": deffValTbU,
|
||||||
|
"val_degree_tb_u": valDegreeTbU,
|
||||||
|
"status_gizi_bb_tb": statusGiziBbTb,
|
||||||
|
"deff_val_bb_tb": deffValBbTb,
|
||||||
|
"val_degree_bb_tb": valDegreeBbTb,
|
||||||
|
"created_at": createdAt,
|
||||||
|
"updated_at": updatedAt,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,179 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final fuzzyModel = fuzzyModelFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
FuzzyModel fuzzyModelFromJson(String str) =>
|
||||||
|
FuzzyModel.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String fuzzyModelToJson(FuzzyModel data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class FuzzyModel {
|
||||||
|
final double? usia;
|
||||||
|
final double? beratBadan;
|
||||||
|
final double? tinggiBadan;
|
||||||
|
final Hasil? hasil;
|
||||||
|
|
||||||
|
FuzzyModel({
|
||||||
|
this.usia,
|
||||||
|
this.beratBadan,
|
||||||
|
this.tinggiBadan,
|
||||||
|
this.hasil,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory FuzzyModel.fromJson(Map<String, dynamic> json) => FuzzyModel(
|
||||||
|
usia: json["usia"].toDouble(),
|
||||||
|
beratBadan: json["berat_badan"].toDouble(),
|
||||||
|
tinggiBadan: json["tinggi_badan"]?.toDouble(),
|
||||||
|
hasil: json["hasil"] == null ? null : Hasil.fromJson(json["hasil"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"usia": usia,
|
||||||
|
"berat_badan": beratBadan,
|
||||||
|
"tinggi_badan": tinggiBadan,
|
||||||
|
"hasil": hasil?.toJson(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class Hasil {
|
||||||
|
final BbU? bbU;
|
||||||
|
final TbU? tbU;
|
||||||
|
final BbTb? bbTb;
|
||||||
|
|
||||||
|
Hasil({
|
||||||
|
this.bbU,
|
||||||
|
this.tbU,
|
||||||
|
this.bbTb,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory Hasil.fromJson(Map<String, dynamic> json) => Hasil(
|
||||||
|
bbU: json["bb_u"] == null ? null : BbU.fromJson(json["bb_u"]),
|
||||||
|
tbU: json["tb_u"] == null ? null : TbU.fromJson(json["tb_u"]),
|
||||||
|
bbTb: json["bb_tb"] == null ? null : BbTb.fromJson(json["bb_tb"]),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"bb_u": bbU?.toJson(),
|
||||||
|
"tb_u": tbU?.toJson(),
|
||||||
|
"bb_tb": bbTb?.toJson(),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class BbTb {
|
||||||
|
final double? defuzzifiedValue;
|
||||||
|
final String? statusGizi;
|
||||||
|
final double? bbTbGiziBurukDegree;
|
||||||
|
final double? bbTbGiziKurangDegree;
|
||||||
|
final double? bbTbGiziNormalDegree;
|
||||||
|
final double? bbTbBrskGiziLebihDegree;
|
||||||
|
final double? bbTbGiziLebihDegree;
|
||||||
|
final double? bbTbGiziObesitasDegree;
|
||||||
|
|
||||||
|
BbTb({
|
||||||
|
this.defuzzifiedValue,
|
||||||
|
this.statusGizi,
|
||||||
|
this.bbTbGiziBurukDegree,
|
||||||
|
this.bbTbGiziKurangDegree,
|
||||||
|
this.bbTbGiziNormalDegree,
|
||||||
|
this.bbTbBrskGiziLebihDegree,
|
||||||
|
this.bbTbGiziLebihDegree,
|
||||||
|
this.bbTbGiziObesitasDegree,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory BbTb.fromJson(Map<String, dynamic> json) => BbTb(
|
||||||
|
defuzzifiedValue: json["defuzzified_value"]?.toDouble(),
|
||||||
|
statusGizi: json["status_gizi"],
|
||||||
|
bbTbGiziBurukDegree: json["bb_tb_gizi_buruk_degree"]?.toDouble(),
|
||||||
|
bbTbGiziKurangDegree: json["bb_tb_gizi_kurang_degree"]?.toDouble(),
|
||||||
|
bbTbGiziNormalDegree: json["bb_tb_gizi_normal_degree"]?.toDouble(),
|
||||||
|
bbTbBrskGiziLebihDegree:
|
||||||
|
json["bb_tb_brsk_gizi_lebih_degree"]?.toDouble(),
|
||||||
|
bbTbGiziLebihDegree: json["bb_tb_gizi_lebih_degree"]?.toDouble(),
|
||||||
|
bbTbGiziObesitasDegree: json["bb_tb_gizi_obesitas_degree"]?.toDouble(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"defuzzified_value": defuzzifiedValue,
|
||||||
|
"status_gizi": statusGizi,
|
||||||
|
"bb_tb_gizi_buruk_degree": bbTbGiziBurukDegree,
|
||||||
|
"bb_tb_gizi_kurang_degree": bbTbGiziKurangDegree,
|
||||||
|
"bb_tb_gizi_normal_degree": bbTbGiziNormalDegree,
|
||||||
|
"bb_tb_brsk_gizi_lebih_degree": bbTbBrskGiziLebihDegree,
|
||||||
|
"bb_tb_gizi_lebih_degree": bbTbGiziLebihDegree,
|
||||||
|
"bb_tb_gizi_obesitas_degree": bbTbGiziObesitasDegree,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class BbU {
|
||||||
|
final double? defuzzifiedValue;
|
||||||
|
final String? statusGizi;
|
||||||
|
final double? bbUSangatKurangDegree;
|
||||||
|
final double? bbUKurangDegree;
|
||||||
|
final double? bbUNormalDegree;
|
||||||
|
final double? bbUResikoBbLebihDegree;
|
||||||
|
|
||||||
|
BbU({
|
||||||
|
this.defuzzifiedValue,
|
||||||
|
this.statusGizi,
|
||||||
|
this.bbUSangatKurangDegree,
|
||||||
|
this.bbUKurangDegree,
|
||||||
|
this.bbUNormalDegree,
|
||||||
|
this.bbUResikoBbLebihDegree,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory BbU.fromJson(Map<String, dynamic> json) => BbU(
|
||||||
|
defuzzifiedValue: json["defuzzified_value"]?.toDouble(),
|
||||||
|
statusGizi: json["status gizi"],
|
||||||
|
bbUSangatKurangDegree: json["bb_u_sangat_kurang_degree"]?.toDouble(),
|
||||||
|
bbUKurangDegree: json["bb_u_kurang_degree"]?.toDouble(),
|
||||||
|
bbUNormalDegree: json["bb_u_normal_degree"]?.toDouble(),
|
||||||
|
bbUResikoBbLebihDegree: json["bb_u_resiko_bb_lebih_degree"]?.toDouble(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"defuzzified_value": defuzzifiedValue,
|
||||||
|
"status gizi": statusGizi,
|
||||||
|
"bb_u_sangat_kurang_degree": bbUSangatKurangDegree,
|
||||||
|
"bb_u_kurang_degree": bbUKurangDegree,
|
||||||
|
"bb_u_normal_degree": bbUNormalDegree,
|
||||||
|
"bb_u_resiko_bb_lebih_degree": bbUResikoBbLebihDegree,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class TbU {
|
||||||
|
final double? defuzzifiedValue;
|
||||||
|
final String? statusGizi;
|
||||||
|
final double? tbUSangatPendekDegree;
|
||||||
|
final double? tbUPendekDegree;
|
||||||
|
final double? tbUNormalDegree;
|
||||||
|
final double? tbUTinggiDegree;
|
||||||
|
|
||||||
|
TbU({
|
||||||
|
this.defuzzifiedValue,
|
||||||
|
this.statusGizi,
|
||||||
|
this.tbUSangatPendekDegree,
|
||||||
|
this.tbUPendekDegree,
|
||||||
|
this.tbUNormalDegree,
|
||||||
|
this.tbUTinggiDegree,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory TbU.fromJson(Map<String, dynamic> json) => TbU(
|
||||||
|
defuzzifiedValue: json["defuzzified_value"]?.toDouble(),
|
||||||
|
statusGizi: json["status_gizi"],
|
||||||
|
tbUSangatPendekDegree: json["tb_u_sangat_pendek_degree"]?.toDouble(),
|
||||||
|
tbUPendekDegree: json["tb_u_pendek_degree"]?.toDouble(),
|
||||||
|
tbUNormalDegree: json["tb_u_normal_degree"]?.toDouble(),
|
||||||
|
tbUTinggiDegree: json["tb_u_tinggi_degree"]?.toDouble(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"defuzzified_value": defuzzifiedValue,
|
||||||
|
"status_gizi": statusGizi,
|
||||||
|
"tb_u_sangat_pendek_degree": tbUSangatPendekDegree,
|
||||||
|
"tb_u_pendek_degree": tbUPendekDegree,
|
||||||
|
"tb_u_normal_degree": tbUNormalDegree,
|
||||||
|
"tb_u_tinggi_degree": tbUTinggiDegree,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
JadwalModel jadwalModelFromJson(String str) =>
|
||||||
|
JadwalModel.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String jadwalModelToJson(JadwalModel data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class JadwalModel {
|
||||||
|
final int? id;
|
||||||
|
final int? posyanduId;
|
||||||
|
final String? namaPosyandu;
|
||||||
|
final DateTime? tanggal;
|
||||||
|
// final List<Bidan>? bidans;
|
||||||
|
|
||||||
|
JadwalModel({
|
||||||
|
this.id,
|
||||||
|
this.posyanduId,
|
||||||
|
this.namaPosyandu,
|
||||||
|
this.tanggal,
|
||||||
|
// this.bidans,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory JadwalModel.fromJson(Map<String, dynamic> json) => JadwalModel(
|
||||||
|
id: json["id"],
|
||||||
|
posyanduId: json["posyandu_id"],
|
||||||
|
namaPosyandu: json["nama_posyandu"],
|
||||||
|
tanggal:
|
||||||
|
json["tanggal"] == null ? null : DateTime.parse(json["tanggal"]),
|
||||||
|
// bidans: json["bidans"] == null ? [] : List<Bidan>.from(json["bidans"]!.map((x) => Bidan.fromJson(x))),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"posyandu_id": posyanduId,
|
||||||
|
"nama_posyandu": namaPosyandu,
|
||||||
|
"tanggal":
|
||||||
|
"${tanggal!.year.toString().padLeft(4, '0')}-${tanggal!.month.toString().padLeft(2, '0')}-${tanggal!.day.toString().padLeft(2, '0')}",
|
||||||
|
// "bidans": bidans == null ? [] : List<dynamic>.from(bidans!.map((x) => x.toJson())),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// class Bidan {
|
||||||
|
// final int? bidanId;
|
||||||
|
// final String? name;
|
||||||
|
|
||||||
|
// Bidan({
|
||||||
|
// this.bidanId,
|
||||||
|
// this.name,
|
||||||
|
// });
|
||||||
|
|
||||||
|
// factory Bidan.fromJson(Map<String, dynamic> json) => Bidan(
|
||||||
|
// bidanId: json["bidan_id"],
|
||||||
|
// name: json["name"],
|
||||||
|
// );
|
||||||
|
|
||||||
|
// Map<String, dynamic> toJson() => {
|
||||||
|
// "bidan_id": bidanId,
|
||||||
|
// "name": name,
|
||||||
|
// };
|
||||||
|
// }
|
|
@ -0,0 +1,63 @@
|
||||||
|
// To parse this JSON data, do
|
||||||
|
//
|
||||||
|
// final pemeriksaanModel = pemeriksaanModelFromJson(jsonString);
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
PemeriksaanModel pemeriksaanModelFromJson(String str) =>
|
||||||
|
PemeriksaanModel.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String pemeriksaanModelToJson(PemeriksaanModel data) =>
|
||||||
|
json.encode(data.toJson());
|
||||||
|
|
||||||
|
class PemeriksaanModel {
|
||||||
|
final int? idPemeriksaan;
|
||||||
|
final int? idBalita;
|
||||||
|
final String? name;
|
||||||
|
final DateTime? tanggalLahir;
|
||||||
|
final String? jenisKelamin;
|
||||||
|
final int? usia;
|
||||||
|
final String? beratBadan;
|
||||||
|
final String? tinggiBadan;
|
||||||
|
final String? status;
|
||||||
|
|
||||||
|
PemeriksaanModel({
|
||||||
|
this.idPemeriksaan,
|
||||||
|
this.idBalita,
|
||||||
|
this.name,
|
||||||
|
this.tanggalLahir,
|
||||||
|
this.jenisKelamin,
|
||||||
|
this.usia,
|
||||||
|
this.beratBadan,
|
||||||
|
this.tinggiBadan,
|
||||||
|
this.status,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory PemeriksaanModel.fromJson(Map<String, dynamic> json) =>
|
||||||
|
PemeriksaanModel(
|
||||||
|
idPemeriksaan: json["id_pemeriksaan"],
|
||||||
|
idBalita: json["id_balita"],
|
||||||
|
name: json["name"],
|
||||||
|
tanggalLahir: json["tanggal_lahir"] == null
|
||||||
|
? null
|
||||||
|
: DateTime.parse(json["tanggal_lahir"]),
|
||||||
|
jenisKelamin: json["jenis_kelamin"],
|
||||||
|
usia: json["usia"],
|
||||||
|
beratBadan: json["berat_badan"],
|
||||||
|
tinggiBadan: json["tinggi_badan"],
|
||||||
|
status: json["status"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id_pemeriksaan": idPemeriksaan,
|
||||||
|
"id_balita": idBalita,
|
||||||
|
"name": name,
|
||||||
|
"tanggal_lahir":
|
||||||
|
"${tanggalLahir!.year.toString().padLeft(4, '0')}-${tanggalLahir!.month.toString().padLeft(2, '0')}-${tanggalLahir!.day.toString().padLeft(2, '0')}",
|
||||||
|
"jenis_kelamin": jenisKelamin,
|
||||||
|
"usia": usia,
|
||||||
|
"berat_badan": beratBadan,
|
||||||
|
"tinggi_badan": tinggiBadan,
|
||||||
|
"status": status,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
PosyanduModel posyanduModelFromJson(String str) =>
|
||||||
|
PosyanduModel.fromJson(json.decode(str));
|
||||||
|
|
||||||
|
String posyanduModelToJson(PosyanduModel data) => json.encode(data.toJson());
|
||||||
|
|
||||||
|
class PosyanduModel {
|
||||||
|
final int? id;
|
||||||
|
final String? name;
|
||||||
|
final String? alamat;
|
||||||
|
|
||||||
|
PosyanduModel({
|
||||||
|
this.id,
|
||||||
|
this.name,
|
||||||
|
this.alamat,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory PosyanduModel.fromJson(Map<String, dynamic> json) => PosyanduModel(
|
||||||
|
id: json["id"],
|
||||||
|
name: json["name"],
|
||||||
|
alamat: json["alamat"],
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => {
|
||||||
|
"id": id,
|
||||||
|
"name": name,
|
||||||
|
"alamat": alamat,
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/auth_response_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/source/s_auth.dart';
|
||||||
|
|
||||||
|
class AuthController extends GetxController {
|
||||||
|
final _data = AuthResponseModel().obs;
|
||||||
|
AuthResponseModel get data => _data.value;
|
||||||
|
set data(AuthResponseModel value) => _data.value = value;
|
||||||
|
void setData(AuthResponseModel value) => _data.value = value;
|
||||||
|
|
||||||
|
final _loading = false.obs;
|
||||||
|
bool get loading => _loading.value;
|
||||||
|
final _successLogin = false.obs;
|
||||||
|
bool get successLogin => _successLogin.value;
|
||||||
|
final _successLogout = false.obs;
|
||||||
|
bool get successLogout => _successLogout.value;
|
||||||
|
|
||||||
|
login(String username, String password) async {
|
||||||
|
_loading.value = true;
|
||||||
|
update();
|
||||||
|
_successLogin.value = await SourceAuth.login(username, password);
|
||||||
|
update();
|
||||||
|
_loading.value = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
logout() async {
|
||||||
|
_loading.value = true;
|
||||||
|
update();
|
||||||
|
_successLogout.value = await SourceAuth.logout();
|
||||||
|
update();
|
||||||
|
_loading.value = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/balita_in_ortu_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/source/s_balita.dart';
|
||||||
|
|
||||||
|
class BalitaController extends GetxController {
|
||||||
|
final _loading = false.obs;
|
||||||
|
bool get loading => _loading.value;
|
||||||
|
|
||||||
|
final _listBalitaForOrtu = <BalitaInOrtuModel>[].obs;
|
||||||
|
List<BalitaInOrtuModel> get listBalitaForOrtu => _listBalitaForOrtu.value;
|
||||||
|
|
||||||
|
getListBalitaForOrtu() async {
|
||||||
|
_loading.value = true;
|
||||||
|
update();
|
||||||
|
_listBalitaForOrtu.value = await SourceBalita.getBalitasForOrtu();
|
||||||
|
update();
|
||||||
|
_loading.value = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/detail_balita_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/source/s_pemeriksaan.dart';
|
||||||
|
|
||||||
|
class DetailBalitaController extends GetxController {
|
||||||
|
final _loading = false.obs;
|
||||||
|
bool get loading => _loading.value;
|
||||||
|
|
||||||
|
final _listDetailBalita = <DetailBalitaModel>[].obs;
|
||||||
|
List<DetailBalitaModel> get listDetailBalita => _listDetailBalita.value;
|
||||||
|
|
||||||
|
getListDetailBalita(int balitaId) async {
|
||||||
|
_loading.value = true;
|
||||||
|
update();
|
||||||
|
_listDetailBalita.value =
|
||||||
|
await SourcePemeriksaan.getListPemeriksaanDetailBalita(balitaId);
|
||||||
|
update();
|
||||||
|
_loading.value = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/balita_in_posyandu_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/source/s_posyandu.dart';
|
||||||
|
|
||||||
|
class DetailPosyanduController extends GetxController {
|
||||||
|
final _loadingBalita = false.obs;
|
||||||
|
bool get loadingBalita => _loadingBalita.value;
|
||||||
|
|
||||||
|
final _listBalitaInPosyandu = <BalitaInPosyanduModel>[].obs;
|
||||||
|
List<BalitaInPosyanduModel> get listBalitaInPosyandu =>
|
||||||
|
_listBalitaInPosyandu.value;
|
||||||
|
|
||||||
|
getListBalitaInPosyandu(int id) async {
|
||||||
|
_loadingBalita.value = true;
|
||||||
|
update();
|
||||||
|
_listBalitaInPosyandu.value = await SourcePosyandu.getBalitasInPosyandu(id);
|
||||||
|
update();
|
||||||
|
_loadingBalita.value = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/fuzzy_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/source/s_fuzzy.dart';
|
||||||
|
|
||||||
|
class FuzzyController extends GetxController {
|
||||||
|
final _loading = false.obs;
|
||||||
|
bool get loading => _loading.value;
|
||||||
|
|
||||||
|
final _successPostFuzzy = false.obs;
|
||||||
|
bool get successPostFuzzy => _successPostFuzzy.value;
|
||||||
|
|
||||||
|
final _responseData = FuzzyModel().obs;
|
||||||
|
FuzzyModel get responseData => _responseData.value;
|
||||||
|
|
||||||
|
postFuzzy(double usia, double beratBadan, double tinggiBadan, String jenisKelamin) async {
|
||||||
|
_loading.value = true;
|
||||||
|
update();
|
||||||
|
|
||||||
|
Map<String, dynamic>? responseBody = await SourceFuzzy.postFuzzy(usia, beratBadan, tinggiBadan, jenisKelamin);
|
||||||
|
|
||||||
|
if (responseBody != null) {
|
||||||
|
_responseData.value = FuzzyModel.fromJson(responseBody);
|
||||||
|
_successPostFuzzy.value = true;
|
||||||
|
} else {
|
||||||
|
_successPostFuzzy.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
_loading.value = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/jadwal_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/source/s_jadwal.dart';
|
||||||
|
|
||||||
|
class JadwalController extends GetxController {
|
||||||
|
final _loading = false.obs;
|
||||||
|
bool get loading => _loading.value;
|
||||||
|
|
||||||
|
final _listJadwal = <JadwalModel>[].obs;
|
||||||
|
List<JadwalModel> get listJadwal => _listJadwal.value;
|
||||||
|
|
||||||
|
getListJadwal() async {
|
||||||
|
_loading.value = true;
|
||||||
|
update();
|
||||||
|
_listJadwal.value = await SourceJadwal.getJadwals();
|
||||||
|
update();
|
||||||
|
_loading.value = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/pemeriksaan_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/source/s_pemeriksaan.dart';
|
||||||
|
|
||||||
|
class PemeriksaanController extends GetxController {
|
||||||
|
final _loading = false.obs;
|
||||||
|
bool get loading => _loading.value;
|
||||||
|
|
||||||
|
final _successPostPemeriksaan = false.obs;
|
||||||
|
bool get successPostPemeriksaan => _successPostPemeriksaan.value;
|
||||||
|
|
||||||
|
final _listPemeriksaan = <PemeriksaanModel>[].obs;
|
||||||
|
List<PemeriksaanModel> get listPemeriksaan => _listPemeriksaan.value;
|
||||||
|
|
||||||
|
List<PemeriksaanModel> get belumPemeriksaan =>
|
||||||
|
_listPemeriksaan.where((item) => item.status == 'belum').toList();
|
||||||
|
|
||||||
|
List<PemeriksaanModel> get sudahPemeriksaan =>
|
||||||
|
_listPemeriksaan.where((item) => item.status == 'sudah').toList();
|
||||||
|
|
||||||
|
getListPemeriksaan(int id) async {
|
||||||
|
_loading.value = true;
|
||||||
|
update();
|
||||||
|
_listPemeriksaan.value = await SourcePemeriksaan.getPemeriksaans(id);
|
||||||
|
update();
|
||||||
|
_loading.value = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
postPemeriksaan(
|
||||||
|
int id,
|
||||||
|
double beratBadan,
|
||||||
|
double tinggiBadan,
|
||||||
|
String statusGiziBBU,
|
||||||
|
double deffValBBU,
|
||||||
|
double valDegreeBBU,
|
||||||
|
String statusGiziTBU,
|
||||||
|
double deffValTBU,
|
||||||
|
double valDegreeTBU,
|
||||||
|
String statusGiziBBTB,
|
||||||
|
double deffValBBTB,
|
||||||
|
double valDegreeBBTB,
|
||||||
|
) async {
|
||||||
|
_loading.value = true;
|
||||||
|
update();
|
||||||
|
_successPostPemeriksaan.value = await SourcePemeriksaan.postPemeriksaan(
|
||||||
|
id,
|
||||||
|
beratBadan,
|
||||||
|
tinggiBadan,
|
||||||
|
statusGiziBBU,
|
||||||
|
deffValBBU,
|
||||||
|
valDegreeBBU,
|
||||||
|
statusGiziTBU,
|
||||||
|
deffValTBU,
|
||||||
|
valDegreeTBU,
|
||||||
|
statusGiziBBTB,
|
||||||
|
deffValBBTB,
|
||||||
|
valDegreeBBTB);
|
||||||
|
update();
|
||||||
|
_loading.value = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/posyandu_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/source/s_posyandu.dart';
|
||||||
|
|
||||||
|
class PosyanduController extends GetxController {
|
||||||
|
final _loading = false.obs;
|
||||||
|
bool get loading => _loading.value;
|
||||||
|
|
||||||
|
final _listPosyandu = <PosyanduModel>[].obs;
|
||||||
|
List<PosyanduModel> get listPosyandu => _listPosyandu.value;
|
||||||
|
|
||||||
|
getListPosyandu() async {
|
||||||
|
_loading.value = true;
|
||||||
|
update();
|
||||||
|
_listPosyandu.value = await SourcePosyandu.getPosyandus();
|
||||||
|
update();
|
||||||
|
_loading.value = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/network/api.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/network/app_request.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/local/session.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/auth_response_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_auth.dart';
|
||||||
|
|
||||||
|
class SourceAuth {
|
||||||
|
static Future<bool> login(String email, String password) async {
|
||||||
|
String url = '${Api.BASE_URL}/login';
|
||||||
|
|
||||||
|
Map? responseBody = await AppRequest.postMethod(
|
||||||
|
url,
|
||||||
|
{'email': email, 'password': password},
|
||||||
|
);
|
||||||
|
|
||||||
|
if (responseBody == null) {
|
||||||
|
print("Response is null");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!responseBody['success']) {
|
||||||
|
// print("Login failed: ${responseBody['message']}");
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
Map<String, dynamic> jsonMap = Map<String, dynamic>.from(responseBody);
|
||||||
|
AuthResponseModel authResponse = AuthResponseModel.fromJson(jsonMap);
|
||||||
|
bool saveSuccess = await Session.saveAuthData(authResponse);
|
||||||
|
if (saveSuccess) {
|
||||||
|
return responseBody['success'];
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<bool> logout() async {
|
||||||
|
String url = '${Api.BASE_URL}/logout';
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
String token = cAuth.data.token!;
|
||||||
|
|
||||||
|
Map? responseBody = await AppRequest.postMethod(url, {}, token: token);
|
||||||
|
|
||||||
|
if (responseBody == null || !responseBody['success']) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
bool saveSuccess = await Session.clearAuthData();
|
||||||
|
return saveSuccess && responseBody['success'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/network/api.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/network/app_request.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/balita_in_ortu_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_auth.dart';
|
||||||
|
|
||||||
|
class SourceBalita {
|
||||||
|
static Future<List<BalitaInOrtuModel>> getBalitasForOrtu() async {
|
||||||
|
String url = '${Api.BASE_URL}/balitas';
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
String token = cAuth.data.token!;
|
||||||
|
Map? responseBody = await AppRequest.getMethod(url, token);
|
||||||
|
|
||||||
|
if (responseBody == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
if (!responseBody['success']) {
|
||||||
|
return [];
|
||||||
|
} else {
|
||||||
|
List list = responseBody['data'];
|
||||||
|
return list.map((e) => BalitaInOrtuModel.fromJson(e)).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
import 'package:skripsi_pos_dg/config/network/api.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/network/app_request.dart';
|
||||||
|
|
||||||
|
class SourceFuzzy {
|
||||||
|
static Future<Map<String, dynamic>?> postFuzzy(double usia, double beratBadan,
|
||||||
|
double tinggiBadan, String jenisKelamin) async {
|
||||||
|
String url = Api.BASE_URL_FOR_FUZZY;
|
||||||
|
Map<String, dynamic>? responseBody = await AppRequest.postMethodForFuzzy(
|
||||||
|
url,
|
||||||
|
{
|
||||||
|
"usia": usia,
|
||||||
|
"bb": beratBadan,
|
||||||
|
"tb": tinggiBadan,
|
||||||
|
"jk": jenisKelamin,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
return responseBody;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/network/api.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/network/app_request.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/jadwal_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_auth.dart';
|
||||||
|
|
||||||
|
class SourceJadwal {
|
||||||
|
static Future<List<JadwalModel>> getJadwals() async {
|
||||||
|
String url = '${Api.BASE_URL}/jadwals';
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
String token = cAuth.data.token!;
|
||||||
|
Map? responseBody = await AppRequest.getMethod(url, token);
|
||||||
|
|
||||||
|
if (responseBody == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!responseBody['success']) {
|
||||||
|
return [];
|
||||||
|
} else {
|
||||||
|
List list = responseBody['data'];
|
||||||
|
return list.map((e) => JadwalModel.fromJson(e)).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,90 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/network/api.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/network/app_request.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/detail_balita_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/pemeriksaan_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_auth.dart';
|
||||||
|
|
||||||
|
class SourcePemeriksaan {
|
||||||
|
static Future<List<PemeriksaanModel>> getPemeriksaans(int id) async {
|
||||||
|
String url = '${Api.BASE_URL}/jadwals/$id';
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
String token = cAuth.data.token!;
|
||||||
|
Map? responseBody = await AppRequest.getMethod(url, token);
|
||||||
|
|
||||||
|
if (responseBody == null) {
|
||||||
|
// print("Response is null");
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!responseBody['success']) {
|
||||||
|
// print("Login failed: ${responseBody['message']}");
|
||||||
|
return [];
|
||||||
|
} else {
|
||||||
|
List list = responseBody['data'];
|
||||||
|
return list.map((e) => PemeriksaanModel.fromJson(e)).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<List<DetailBalitaModel>> getListPemeriksaanDetailBalita(
|
||||||
|
int balitaId) async {
|
||||||
|
String url = '${Api.BASE_URL}/pemeriksaan/$balitaId';
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
String token = cAuth.data.token!;
|
||||||
|
Map? responseBody = await AppRequest.getMethod(url, token);
|
||||||
|
|
||||||
|
if (responseBody == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!responseBody['success']) {
|
||||||
|
return [];
|
||||||
|
} else {
|
||||||
|
List list = responseBody['data'];
|
||||||
|
return list.map((e) => DetailBalitaModel.fromJson(e)).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<bool> postPemeriksaan(
|
||||||
|
int id,
|
||||||
|
double beratBadan,
|
||||||
|
double tinggiBadan,
|
||||||
|
String statusGiziBBU,
|
||||||
|
double deffValBBU,
|
||||||
|
double valDegreeBBU,
|
||||||
|
String statusGiziTBU,
|
||||||
|
double deffValTBU,
|
||||||
|
double valDegreeTBU,
|
||||||
|
String statusGiziBBTB,
|
||||||
|
double deffValBBTB,
|
||||||
|
double valDegreeBBTB,
|
||||||
|
) async {
|
||||||
|
String url = '${Api.BASE_URL}/post-pemeriksaan';
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
String token = cAuth.data.token!;
|
||||||
|
Map? responseBody = await AppRequest.postMethod(
|
||||||
|
url,
|
||||||
|
{
|
||||||
|
'id': id,
|
||||||
|
'berat_badan': beratBadan,
|
||||||
|
'tinggi_badan': tinggiBadan,
|
||||||
|
'status_gizi_bb_u': statusGiziBBU,
|
||||||
|
'deff_val_bb_u': deffValBBU,
|
||||||
|
'val_degree_bb_u': valDegreeBBU,
|
||||||
|
'status_gizi_tb_u': statusGiziTBU,
|
||||||
|
'deff_val_tb_u': deffValTBU,
|
||||||
|
'val_degree_tb_u': valDegreeTBU,
|
||||||
|
'status_gizi_bb_tb': statusGiziBBTB,
|
||||||
|
'deff_val_bb_tb': deffValBBTB,
|
||||||
|
'val_degree_bb_tb': valDegreeBBTB
|
||||||
|
},
|
||||||
|
token: token,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (responseBody == null || !responseBody['success']) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return responseBody['success'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/network/api.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/network/app_request.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/balita_in_posyandu_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/posyandu_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_auth.dart';
|
||||||
|
|
||||||
|
class SourcePosyandu {
|
||||||
|
static Future<List<PosyanduModel>> getPosyandus() async {
|
||||||
|
String url = '${Api.BASE_URL}/posyandu-by-bidan';
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
String token = cAuth.data.token!;
|
||||||
|
Map? responseBody = await AppRequest.getMethod(url, token);
|
||||||
|
|
||||||
|
if (responseBody == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!responseBody['success']) {
|
||||||
|
return [];
|
||||||
|
} else {
|
||||||
|
List list = responseBody['data'];
|
||||||
|
return list.map((e) => PosyanduModel.fromJson(e)).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<List<BalitaInPosyanduModel>> getBalitasInPosyandu(
|
||||||
|
int id) async {
|
||||||
|
String url = '${Api.BASE_URL}/posyandu/$id';
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
String token = cAuth.data.token!;
|
||||||
|
Map? responseBody = await AppRequest.getMethod(url, token);
|
||||||
|
|
||||||
|
if (responseBody == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
if (!responseBody['success']) {
|
||||||
|
return [];
|
||||||
|
} else {
|
||||||
|
List list = responseBody['data'];
|
||||||
|
return list.map((e) => BalitaInPosyanduModel.fromJson(e)).toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:intl/date_symbol_data_local.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/app_color.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/splashscreen.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
initializeDateFormatting(
|
||||||
|
'id_ID',
|
||||||
|
).then((value) {
|
||||||
|
runApp(const MyApp());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyApp extends StatelessWidget {
|
||||||
|
const MyApp({super.key});
|
||||||
|
|
||||||
|
// This widget is the root of your application.
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return ScreenUtilInit(
|
||||||
|
designSize: Size(
|
||||||
|
MediaQuery.sizeOf(context).width,
|
||||||
|
MediaQuery.sizeOf(context).height,
|
||||||
|
),
|
||||||
|
builder: (_, child) {
|
||||||
|
return GetMaterialApp(
|
||||||
|
debugShowCheckedModeBanner: false,
|
||||||
|
// theme: ThemeData(
|
||||||
|
// colorScheme: ColorScheme.fromSeed(seedColor: AppColor.primaryColor),
|
||||||
|
// useMaterial3: true,
|
||||||
|
// ),
|
||||||
|
// theme: ThemeData.light(useMaterial3: true),
|
||||||
|
theme: ThemeData.light().copyWith(
|
||||||
|
primaryColor: AppColor.primaryColor,
|
||||||
|
colorScheme: const ColorScheme.light().copyWith(
|
||||||
|
primary: AppColor.primaryColor,
|
||||||
|
secondary: AppColor.secondaryColor,
|
||||||
|
),
|
||||||
|
appBarTheme: const AppBarTheme(
|
||||||
|
backgroundColor: AppColor.primaryColor,
|
||||||
|
foregroundColor: AppColor.whiteColor,
|
||||||
|
),
|
||||||
|
useMaterial3: true),
|
||||||
|
// darkTheme: ThemeData.dark(useMaterial3: true),
|
||||||
|
home: child,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: const SplashscreenPage(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,138 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/app_color.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/detail_balita_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_detail_balita.dart';
|
||||||
|
|
||||||
|
class BalitaDetailPage extends StatefulWidget {
|
||||||
|
final int balitaID;
|
||||||
|
final String balitaName;
|
||||||
|
const BalitaDetailPage(
|
||||||
|
{super.key, required this.balitaID, required this.balitaName});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<BalitaDetailPage> createState() => _BalitaDetailPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _BalitaDetailPageState extends State<BalitaDetailPage> {
|
||||||
|
final cDetailBalita = Get.put(DetailBalitaController());
|
||||||
|
|
||||||
|
refresh() {
|
||||||
|
cDetailBalita.getListDetailBalita(widget.balitaID);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
refresh();
|
||||||
|
cDetailBalita.getListDetailBalita(widget.balitaID);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text(widget.balitaName),
|
||||||
|
),
|
||||||
|
body: Padding(
|
||||||
|
padding: EdgeInsets.only(top: 4.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: GetBuilder<DetailBalitaController>(
|
||||||
|
builder: (_) {
|
||||||
|
if (_.loading) {
|
||||||
|
return Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
);
|
||||||
|
} else if (_.listDetailBalita.isEmpty) {
|
||||||
|
return Center(
|
||||||
|
child: Text('Catatan Pemeriksaan Belum Ada'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return RefreshIndicator(
|
||||||
|
onRefresh: () async => refresh(),
|
||||||
|
child: buildListDetailBalita(_.listDetailBalita),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
buildListDetailBalita(List<DetailBalitaModel> listDetailBalita) {
|
||||||
|
return ListView.builder(
|
||||||
|
itemCount: listDetailBalita.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: AppColor.lightGreyColor,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(16))),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text('Usia : ${listDetailBalita[index].usia} Bulan'),
|
||||||
|
Text('Berat : ${listDetailBalita[index].beratBadan} Kg'),
|
||||||
|
Text('Tinggi : ${listDetailBalita[index].tinggiBadan} Cm'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 8.0,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const Text('BB/U'),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.h,
|
||||||
|
),
|
||||||
|
const Text('TB/U'),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.h,
|
||||||
|
),
|
||||||
|
const Text('BB/TB'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 16.0,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'${listDetailBalita[index].hasilFuzzy!.statusGiziBbU}'),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.h,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'${listDetailBalita[index].hasilFuzzy!.statusGiziTbU}'),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.h,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'${listDetailBalita[index].hasilFuzzy!.statusGiziBbTb}'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class BalitaPage extends StatelessWidget {
|
||||||
|
const BalitaPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return const Scaffold(
|
||||||
|
body: Center(
|
||||||
|
child: Text('Balita Page'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,67 @@
|
||||||
|
import 'package:d_info/d_info.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_auth.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/login_page.dart';
|
||||||
|
|
||||||
|
class HomePageBidan extends StatefulWidget {
|
||||||
|
const HomePageBidan({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<HomePageBidan> createState() => _HomePageBidanState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _HomePageBidanState extends State<HomePageBidan> {
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
const Text('Ini halaman home'),
|
||||||
|
if (cAuth.data.token != null) Text(cAuth.data.token!),
|
||||||
|
if (cAuth.data.data != null) ...[
|
||||||
|
Text(cAuth.data.data!.name ?? 'No Name'),
|
||||||
|
Text(cAuth.data.data!.email ?? 'No Email'),
|
||||||
|
Text(cAuth.data.data!.alamat ?? 'No Address'),
|
||||||
|
Text(cAuth.data.data!.kodeNikNip ?? 'No Kode Nik Nip'),
|
||||||
|
Text(cAuth.data.data!.roles ?? 'No Roles'),
|
||||||
|
Text(cAuth.data.data!.tanggalLahir?.toString() ??
|
||||||
|
'No Date of Birth'),
|
||||||
|
],
|
||||||
|
const SizedBox(
|
||||||
|
height: 32.0,
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
logout();
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'Logout',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void logout() async {
|
||||||
|
await cAuth.logout();
|
||||||
|
if (cAuth.successLogout) {
|
||||||
|
DInfo.dialogSuccess(context, 'Berhasil Logout');
|
||||||
|
DInfo.closeDialog(context, actionAfterClose: () {
|
||||||
|
Get.off(() => const LoginPage());
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
DInfo.dialogError(context, 'Gagal Logout');
|
||||||
|
DInfo.closeDialog(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,257 @@
|
||||||
|
import 'package:d_info/d_info.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/app_color.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/pemeriksaan_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_pemeriksaan.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/bidan/periksa_page_bidan.dart';
|
||||||
|
|
||||||
|
class JadwalDetailPageBidan extends StatefulWidget {
|
||||||
|
final int id;
|
||||||
|
const JadwalDetailPageBidan({super.key, required this.id});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<JadwalDetailPageBidan> createState() => _JadwalDetailPageBidanState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _JadwalDetailPageBidanState extends State<JadwalDetailPageBidan>
|
||||||
|
with SingleTickerProviderStateMixin {
|
||||||
|
final cPemeriksaans = Get.put(PemeriksaanController());
|
||||||
|
late TabController _tabController;
|
||||||
|
|
||||||
|
refresh() {
|
||||||
|
cPemeriksaans.getListPemeriksaan(widget.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
refresh();
|
||||||
|
_tabController = TabController(length: 2, vsync: this);
|
||||||
|
cPemeriksaans.getListPemeriksaan(widget.id);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_tabController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildListBelum(List<PemeriksaanModel> list) {
|
||||||
|
return ListView.builder(
|
||||||
|
itemCount: list.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
PemeriksaanModel pemeriksaan = list[index];
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {},
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: AppColor.lightGreyColor,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(16))),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
const SizedBox(
|
||||||
|
width: 4.0,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const Text('Nama'),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.h,
|
||||||
|
),
|
||||||
|
const Text('Jenis Kelamin'),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.h,
|
||||||
|
),
|
||||||
|
const Text('Usia'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 16.0,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('${pemeriksaan.name}'),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.h,
|
||||||
|
),
|
||||||
|
Text('${pemeriksaan.jenisKelamin}'),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.h,
|
||||||
|
),
|
||||||
|
Text('${pemeriksaan.usia}'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 8.0,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () async {
|
||||||
|
bool? result = await Get.to(
|
||||||
|
() => PeriksaPageBidan(
|
||||||
|
idPemeriksaan: pemeriksaan.idPemeriksaan,
|
||||||
|
namaBalita: pemeriksaan.name,
|
||||||
|
usiaBalita: pemeriksaan.usia?.toDouble(),
|
||||||
|
jenisKelaminBalita: pemeriksaan.jenisKelamin,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
if (result == true) {
|
||||||
|
refresh();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: const Text('Periksa'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildListSudah(List<PemeriksaanModel> list) {
|
||||||
|
return ListView.builder(
|
||||||
|
itemCount: list.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
PemeriksaanModel pemeriksaan = list[index];
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {},
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: AppColor.lightGreyColor,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(16))),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
const SizedBox(
|
||||||
|
width: 4.0,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const Text('Nama'),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.h,
|
||||||
|
),
|
||||||
|
const Text('Jenis Kelamin'),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.h,
|
||||||
|
),
|
||||||
|
const Text('Usia'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 16.0,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('${pemeriksaan.name}'),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.h,
|
||||||
|
),
|
||||||
|
Text('${pemeriksaan.jenisKelamin}'),
|
||||||
|
SizedBox(
|
||||||
|
height: 4.h,
|
||||||
|
),
|
||||||
|
Text('${pemeriksaan.usia}'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 8.0,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
DInfo.dialogSuccess(context,
|
||||||
|
'Pemeriksaan Sudah Selesai dengan detail : BB = ${pemeriksaan.beratBadan}');
|
||||||
|
DInfo.closeDialog(context);
|
||||||
|
// Get.to(
|
||||||
|
// () => PeriksaPageBidan(
|
||||||
|
// idPemeriksaan: pemeriksaan.idPemeriksaan,
|
||||||
|
// namaBalita: pemeriksaan.name,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
},
|
||||||
|
child: const Text('Lihat'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
title: const Text('List Pemeriksaan'),
|
||||||
|
centerTitle: true,
|
||||||
|
bottom: TabBar(
|
||||||
|
controller: _tabController,
|
||||||
|
tabs: const [
|
||||||
|
Tab(
|
||||||
|
child: Text(
|
||||||
|
'belum',
|
||||||
|
style: TextStyle(color: AppColor.whiteColor),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Tab(
|
||||||
|
child: Text(
|
||||||
|
'sudah',
|
||||||
|
style: TextStyle(color: AppColor.whiteColor),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: GetBuilder<PemeriksaanController>(
|
||||||
|
builder: (_) {
|
||||||
|
if (_.loading) {
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return TabBarView(controller: _tabController, children: [
|
||||||
|
RefreshIndicator(
|
||||||
|
onRefresh: () async => refresh(),
|
||||||
|
child: buildListBelum(_.belumPemeriksaan),
|
||||||
|
),
|
||||||
|
RefreshIndicator(
|
||||||
|
onRefresh: () async => refresh(),
|
||||||
|
child: buildListSudah(_.sudahPemeriksaan),
|
||||||
|
)
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,131 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/app_color.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/app_format.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/jadwal_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_jadwal.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/bidan/jadwal_detail_page_bidan.dart';
|
||||||
|
|
||||||
|
class JadwalPageBidan extends StatefulWidget {
|
||||||
|
const JadwalPageBidan({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<JadwalPageBidan> createState() => _JadwalPageBidanState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _JadwalPageBidanState extends State<JadwalPageBidan> {
|
||||||
|
final cJadwal = Get.put(JadwalController());
|
||||||
|
|
||||||
|
refresh() {
|
||||||
|
cJadwal.getListJadwal();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
refresh();
|
||||||
|
cJadwal.getListJadwal();
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
// title: Text('jadwal'),
|
||||||
|
),
|
||||||
|
body: Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 4.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: GetBuilder<JadwalController>(
|
||||||
|
builder: (_) {
|
||||||
|
if (_.loading) {
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return RefreshIndicator(
|
||||||
|
onRefresh: () async => refresh(),
|
||||||
|
child: buildListJadwal(_.listJadwal),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildListJadwal(List<JadwalModel> list) {
|
||||||
|
return ListView.builder(
|
||||||
|
itemCount: list.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
JadwalModel jadwal = list[index];
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {},
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.all(12.0),
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: AppColor.lightGreyColor,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(16))),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
const SizedBox(
|
||||||
|
width: 4.0,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
const Text('Posyandu'),
|
||||||
|
SizedBox(
|
||||||
|
height: 8.h,
|
||||||
|
),
|
||||||
|
const Text('Tanggal'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 16.0,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('${jadwal.namaPosyandu}'),
|
||||||
|
SizedBox(
|
||||||
|
height: 8.h,
|
||||||
|
),
|
||||||
|
Text(AppFormat.date(jadwal.tanggal!)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 8.0,
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
Get.to(
|
||||||
|
() => JadwalDetailPageBidan(
|
||||||
|
id: jadwal.id!,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: const Text('Detail'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,186 @@
|
||||||
|
import 'package:d_info/d_info.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/app_color.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/fuzzy_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_fuzzy.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_pemeriksaan.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/widget/custom_dialog_for_fuzzy.dart';
|
||||||
|
|
||||||
|
class PeriksaPageBidan extends StatefulWidget {
|
||||||
|
final int? idPemeriksaan;
|
||||||
|
final double? usiaBalita;
|
||||||
|
final String? namaBalita, jenisKelaminBalita;
|
||||||
|
const PeriksaPageBidan(
|
||||||
|
{super.key,
|
||||||
|
this.idPemeriksaan,
|
||||||
|
this.namaBalita,
|
||||||
|
this.usiaBalita,
|
||||||
|
this.jenisKelaminBalita});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<PeriksaPageBidan> createState() => _PeriksaPageBidanState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PeriksaPageBidanState extends State<PeriksaPageBidan> {
|
||||||
|
final cPemeriksaan = Get.put(PemeriksaanController());
|
||||||
|
final cFuzzy = Get.put(FuzzyController());
|
||||||
|
final formKey = GlobalKey<FormState>();
|
||||||
|
|
||||||
|
final TextEditingController beratBadanController = TextEditingController();
|
||||||
|
final TextEditingController tinggiBadanController = TextEditingController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
double checkDeggreForAll(List<double> degree) {
|
||||||
|
double result = 0.0;
|
||||||
|
for (int i = 0; i < degree.length; i++) {
|
||||||
|
if (degree[i] != 0.0) {
|
||||||
|
result = degree[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
postPemeriksaan(FuzzyModel data) async {
|
||||||
|
List<double> listDegreeBBU = [
|
||||||
|
data.hasil!.bbU!.bbUSangatKurangDegree!,
|
||||||
|
data.hasil!.bbU!.bbUKurangDegree!,
|
||||||
|
data.hasil!.bbU!.bbUNormalDegree!,
|
||||||
|
data.hasil!.bbU!.bbUResikoBbLebihDegree!,
|
||||||
|
];
|
||||||
|
List<double> listDegreeTBU = [
|
||||||
|
data.hasil!.tbU!.tbUSangatPendekDegree!,
|
||||||
|
data.hasil!.tbU!.tbUPendekDegree!,
|
||||||
|
data.hasil!.tbU!.tbUNormalDegree!,
|
||||||
|
data.hasil!.tbU!.tbUPendekDegree!,
|
||||||
|
];
|
||||||
|
List<double> listDegreeBBTB = [
|
||||||
|
data.hasil!.bbTb!.bbTbGiziBurukDegree!,
|
||||||
|
data.hasil!.bbTb!.bbTbGiziKurangDegree!,
|
||||||
|
data.hasil!.bbTb!.bbTbGiziNormalDegree!,
|
||||||
|
data.hasil!.bbTb!.bbTbBrskGiziLebihDegree!,
|
||||||
|
data.hasil!.bbTb!.bbTbGiziLebihDegree!,
|
||||||
|
data.hasil!.bbTb!.bbTbGiziObesitasDegree!,
|
||||||
|
];
|
||||||
|
final degreeBBU = checkDeggreForAll(listDegreeBBU);
|
||||||
|
final degreeTBU = checkDeggreForAll(listDegreeTBU);
|
||||||
|
final degreeBBTB = checkDeggreForAll(listDegreeBBTB);
|
||||||
|
|
||||||
|
await cPemeriksaan.postPemeriksaan(
|
||||||
|
widget.idPemeriksaan!,
|
||||||
|
data.beratBadan!,
|
||||||
|
data.tinggiBadan!,
|
||||||
|
data.hasil!.bbU!.statusGizi!,
|
||||||
|
data.hasil!.bbU!.defuzzifiedValue!,
|
||||||
|
degreeBBU,
|
||||||
|
data.hasil!.tbU!.statusGizi!,
|
||||||
|
data.hasil!.tbU!.defuzzifiedValue!,
|
||||||
|
degreeTBU,
|
||||||
|
data.hasil!.bbTb!.statusGizi!,
|
||||||
|
data.hasil!.bbTb!.defuzzifiedValue!,
|
||||||
|
degreeBBTB,
|
||||||
|
);
|
||||||
|
if (cPemeriksaan.successPostPemeriksaan) {
|
||||||
|
DInfo.dialogSuccess(context, 'Berhasil Menyimpan Data');
|
||||||
|
// DInfo.dialogNetral(context, degreeBBU.toString());
|
||||||
|
DInfo.closeDialog(context, actionAfterClose: () {
|
||||||
|
Get.back(result: true);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
DInfo.dialogError(context, 'Gagal Menyimpan Data');
|
||||||
|
DInfo.closeDialog(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
postPemeriksaanForGetFuzzy() async {
|
||||||
|
await cFuzzy.postFuzzy(
|
||||||
|
widget.usiaBalita!,
|
||||||
|
double.parse(beratBadanController.value.text),
|
||||||
|
double.parse(tinggiBadanController.value.text),
|
||||||
|
widget.jenisKelaminBalita!,
|
||||||
|
);
|
||||||
|
if (cFuzzy.successPostFuzzy) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
barrierDismissible: false,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return CustomDialogForFuzzy(
|
||||||
|
responseData: cFuzzy.responseData,
|
||||||
|
onConfirm: () {
|
||||||
|
postPemeriksaan(cFuzzy.responseData);
|
||||||
|
},
|
||||||
|
onClose: () {});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
DInfo.dialogError(context, 'Gagal Menyimpan Data');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
),
|
||||||
|
body: Stack(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Text('${widget.namaBalita}'),
|
||||||
|
Text('Usia: ${widget.usiaBalita} Bulan'),
|
||||||
|
Text('Jenis Kelamin: ${widget.jenisKelaminBalita}'),
|
||||||
|
TextFormField(
|
||||||
|
controller: beratBadanController,
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
labelText: 'Berat Badan (Kg)',
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
color: AppColor.darkGreyColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
),
|
||||||
|
TextFormField(
|
||||||
|
controller: tinggiBadanController,
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
labelText: 'Tinggi Badan (Cm)',
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
color: AppColor.darkGreyColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 16.0,
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
if (beratBadanController.value.text.isEmpty) {
|
||||||
|
DInfo.dialogError(context, 'Berat Badan can\'t be empty');
|
||||||
|
} else {
|
||||||
|
if (tinggiBadanController.value.text.isEmpty) {
|
||||||
|
DInfo.dialogError(
|
||||||
|
context, 'Tinggi Badan can\'t be empty');
|
||||||
|
} else {
|
||||||
|
// postPemeriksaan();
|
||||||
|
postPemeriksaanForGetFuzzy();
|
||||||
|
// DInfo.dialogSuccess(context, 'fungsi login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: const Text('Periksa'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,85 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/app_format.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/balita_in_posyandu_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_detail_posyandu.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/balita/balita_detail_page.dart';
|
||||||
|
|
||||||
|
class PosyanduDetailPageBidan extends StatefulWidget {
|
||||||
|
final int id;
|
||||||
|
const PosyanduDetailPageBidan({super.key, required this.id});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<PosyanduDetailPageBidan> createState() =>
|
||||||
|
_PosyanduDetailPageBidanState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PosyanduDetailPageBidanState extends State<PosyanduDetailPageBidan> {
|
||||||
|
final cDetailPosyandu = Get.put(DetailPosyanduController());
|
||||||
|
|
||||||
|
refresh() {
|
||||||
|
cDetailPosyandu.getListBalitaInPosyandu(widget.id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
refresh();
|
||||||
|
cDetailPosyandu.getListBalitaInPosyandu(widget.id);
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text('Balita di Posyandu'),
|
||||||
|
),
|
||||||
|
body: Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 4.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: GetBuilder<DetailPosyanduController>(
|
||||||
|
builder: (_) {
|
||||||
|
if (_.loadingBalita) {
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return RefreshIndicator(
|
||||||
|
onRefresh: () async => refresh(),
|
||||||
|
child: buildListBalitaInPosyandu(_.listBalitaInPosyandu),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
buildListBalitaInPosyandu(List<BalitaInPosyanduModel> listBalitaInPosyandu) {
|
||||||
|
return ListView.builder(
|
||||||
|
itemCount: listBalitaInPosyandu.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
return Card(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
Get.to(() => BalitaDetailPage(
|
||||||
|
balitaID: listBalitaInPosyandu[index].id!,
|
||||||
|
balitaName: listBalitaInPosyandu[index].name!,
|
||||||
|
));
|
||||||
|
},
|
||||||
|
child: ListTile(
|
||||||
|
title: Text(listBalitaInPosyandu[index].name!),
|
||||||
|
subtitle: Text(listBalitaInPosyandu[index].jenisKelamin!),
|
||||||
|
trailing: Text(
|
||||||
|
AppFormat.date(listBalitaInPosyandu[index].tanggalLahir!)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,79 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/models/posyandu_model.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_posyandu.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/bidan/posyandu_detail_page.dart';
|
||||||
|
|
||||||
|
class PosyanduPageBidan extends StatefulWidget {
|
||||||
|
const PosyanduPageBidan({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<PosyanduPageBidan> createState() => _PosyanduPageBidanState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PosyanduPageBidanState extends State<PosyanduPageBidan> {
|
||||||
|
final cPosyandu = Get.put(PosyanduController());
|
||||||
|
|
||||||
|
refresh() {
|
||||||
|
cPosyandu.getListPosyandu();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
refresh();
|
||||||
|
cPosyandu.getListPosyandu();
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
// title: Text('posyandu'),
|
||||||
|
),
|
||||||
|
body: Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 4.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: GetBuilder<PosyanduController>(
|
||||||
|
builder: (_) {
|
||||||
|
if (_.loading) {
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return RefreshIndicator(
|
||||||
|
onRefresh: () async => refresh(),
|
||||||
|
child: buildListPosyandu(_.listPosyandu),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
buildListPosyandu(List<PosyanduModel> listPosyandu) {
|
||||||
|
return ListView.builder(
|
||||||
|
itemCount: listPosyandu.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
PosyanduModel posyandu = listPosyandu[index];
|
||||||
|
return Card(
|
||||||
|
child: ListTile(
|
||||||
|
title: Text(posyandu.name!),
|
||||||
|
subtitle: Text(posyandu.alamat!),
|
||||||
|
onTap: () {
|
||||||
|
Get.to(
|
||||||
|
() => PosyanduDetailPageBidan(id: posyandu.id!),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,116 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:skripsi_pos_dg/config/app_color.dart';
|
||||||
|
import 'package:skripsi_pos_dg/data/remote/controller/c_auth.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/balita_page.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/bidan/posyandu_page_bidan.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/info_page.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/jadwal_page.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/bidan/home_page_bidan.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/bidan/jadwal_page_bidan.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/orangtua/balita_page_ortu.dart';
|
||||||
|
import 'package:skripsi_pos_dg/view/pages/orangtua/home_page_ortu.dart';
|
||||||
|
|
||||||
|
class HomePage extends StatefulWidget {
|
||||||
|
const HomePage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<HomePage> createState() => _HomePageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _HomePageState extends State<HomePage> {
|
||||||
|
final cAuth = Get.put(AuthController());
|
||||||
|
int _selectedIndex = 0;
|
||||||
|
|
||||||
|
final List<Widget> _pagesForOrtu = [
|
||||||
|
const HomePageOrtu(),
|
||||||
|
const JadwalPage(),
|
||||||
|
const BalitaPageOrtu(),
|
||||||
|
const InfoPage(),
|
||||||
|
];
|
||||||
|
|
||||||
|
final List<Widget> _pagesForBidan = [
|
||||||
|
const HomePageBidan(),
|
||||||
|
const JadwalPageBidan(),
|
||||||
|
const PosyanduPageBidan(),
|
||||||
|
const Center(
|
||||||
|
child: Text('Info for Bidan'),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
|
||||||
|
void _onItemTapped(int index) {
|
||||||
|
setState(() {
|
||||||
|
_selectedIndex = index;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
//if user / orang tua
|
||||||
|
if (cAuth.data.data!.roles == "user") {
|
||||||
|
return Scaffold(
|
||||||
|
body: IndexedStack(
|
||||||
|
index: _selectedIndex,
|
||||||
|
children: _pagesForOrtu,
|
||||||
|
),
|
||||||
|
bottomNavigationBar: BottomNavigationBar(
|
||||||
|
items: const <BottomNavigationBarItem>[
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.home),
|
||||||
|
label: 'Home',
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.schedule),
|
||||||
|
label: 'Jadwal',
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.child_care_rounded),
|
||||||
|
label: 'Balita',
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.info),
|
||||||
|
label: 'Info',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
currentIndex: _selectedIndex,
|
||||||
|
selectedItemColor: AppColor.primaryColor,
|
||||||
|
unselectedItemColor: AppColor.darkGreyColor,
|
||||||
|
onTap: _onItemTapped,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// if bidan / nakes
|
||||||
|
else {
|
||||||
|
return Scaffold(
|
||||||
|
body: IndexedStack(
|
||||||
|
index: _selectedIndex,
|
||||||
|
children: _pagesForBidan,
|
||||||
|
),
|
||||||
|
bottomNavigationBar: BottomNavigationBar(
|
||||||
|
items: const <BottomNavigationBarItem>[
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.home),
|
||||||
|
label: 'Home',
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.schedule),
|
||||||
|
label: 'Jadwal',
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.list_rounded),
|
||||||
|
label: 'Posyandu',
|
||||||
|
),
|
||||||
|
BottomNavigationBarItem(
|
||||||
|
icon: Icon(Icons.info),
|
||||||
|
label: 'Info',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
currentIndex: _selectedIndex,
|
||||||
|
selectedItemColor: AppColor.primaryColor,
|
||||||
|
unselectedItemColor: AppColor.darkGreyColor,
|
||||||
|
onTap: _onItemTapped,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|