Commit b641f457 authored by Dio Maulana's avatar Dio Maulana

Absensi excelso slicing

parents
# 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
# 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.
version:
revision: eb6d86ee27deecba4a83536aa20f366a6044895c
channel: stable
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- platform: android
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- platform: ios
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- platform: linux
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- platform: macos
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- platform: web
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- platform: windows
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
# 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'
# excelso_attendance
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.
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
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
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 33
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.excelso_attendance"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.excelso_attendance">
<!-- 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>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.excelso_attendance">
<application
android:label="excelso_attendance"
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>
package com.example.excelso_attendance
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}
<?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>
<?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>
<?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>
<?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>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.excelso_attendance">
<!-- 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>
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
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')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
**/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
<?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>
#include "Generated.xcconfig"
#include "Generated.xcconfig"
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
<?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>
<?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>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</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>
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
<?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>
<?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>
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)
}
}
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
{
"images" : [
{
"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"
}
}
# 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.
\ No newline at end of file
<?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>
<?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>
<?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>Excelso Attendance</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>excelso_attendance</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
#import "GeneratedPluginRegistrant.h"
import 'dart:convert';
import 'package:excelso_attendance/helper/logger.dart';
import 'package:excelso_attendance/main.dart';
import 'package:excelso_attendance/models/branch.dart';
import 'package:http/http.dart' as http;
String baseUrl = "";
String endPoint = "rav/attendance/";
class Api {
static Future<Map<String, dynamic>> getNearestBranch() async {
String apiUrl = "$baseUrl${endPoint}nearest_branch_list";
Map<String, dynamic> result;
try {
dynamic jsonObject =
await httpRequest(typePost, apiUrl, "getNearestBranch");
if (jsonObject == false) {
result = {"error": true, "msg": "Can't connect to server"};
return result;
} else {
List<BranchModel> branchList = [];
List<dynamic> branchs = jsonObject['data']['branch_list'];
for (int i = 0; i < branchs.length; i++) {
branchList.add(
BranchModel.json(
branchs[i],
),
);
}
result = {
"error": false,
"msg": "Success get data",
"branchs": branchList,
};
return result;
}
} catch (e) {
result = {
"error": true,
"msg": "Something wrong with our server, try again later"
};
return result;
}
}
}
int typeGet = 1;
int typePost = 2;
Future<dynamic> httpRequest(int typeRequest, String apiUrl, String namaFungsi,
{String? bodies = ''}) async {
dynamic apiResult;
if (typeRequest == typePost) {
apiResult = await http.post(Uri.parse(apiUrl),
headers: {"Content-Type": "application/json"}, body: bodies);
} else if (typeRequest == typeGet) {
apiResult = await http.get(
Uri.parse(apiUrl),
headers: {"Content-Type": "application/json"},
);
} else {
if (debug) {
logd('HTTP REQUEST', 'TIPE REQUEST TIDAK VALID');
}
return false;
}
if (apiResult.statusCode == 200 || apiResult.statusCode == 401) {
var jsonObject = jsonDecode(apiResult.body);
return jsonObject;
} else {
if (debug) {
logd('API CLASS ON API.DART, FUNGSI: $namaFungsi, URL : $apiUrl',
'ERROR CONNECT TO SERVER, RESPONSE CODE : ${apiResult.statusCode}');
}
return false;
}
}
class AbsentCameraArguments {
final bool isIn;
final String outletName;
AbsentCameraArguments({
required this.isIn,
required this.outletName,
});
}
import 'package:excelso_attendance/resource/colors.dart';
import 'package:excelso_attendance/resource/style.dart';
import 'package:flutter/material.dart';
class CustomButton extends StatelessWidget {
const CustomButton({
Key? key,
required this.text,
this.colorText = Colors.white,
this.colorButton,
this.onTap,
}) : super(key: key);
final String text;
final Color colorText;
final Color? colorButton;
final void Function()? onTap;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
width: double.infinity,
height: 45,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: (colorButton == null) ? ColorManager.primary : colorButton,
),
child: Center(
child: Text(
text,
style: getSemiBoldStyle(
color: colorText,
),
),
),
),
);
}
}
import 'package:excelso_attendance/resource/colors.dart';
import 'package:excelso_attendance/resource/size.dart';
import 'package:excelso_attendance/resource/style.dart';
import 'package:flutter/material.dart';
class InputTextField extends StatelessWidget {
const InputTextField({
Key? key,
required this.controller,
required this.labelText,
this.secure = false,
this.enabled = true,
this.showCounter = false,
this.inputType = TextInputType.text,
this.maxLines = 1,
this.maxLength = 100,
this.marginActive = false,
this.isError = false,
this.hintText = '',
this.labelColor,
this.isSuffixActive = false,
this.suffixIcon,
this.onSuffixPress,
this.onChanged,
this.borderSideActive = false,
this.marginTop,
}) : super(key: key);
final TextEditingController controller;
final String labelText;
final bool secure;
final bool enabled;
final bool showCounter;
final TextInputType inputType;
final int maxLines;
final int? maxLength;
final bool marginActive;
final bool isError;
final String hintText;
final Color? labelColor;
final bool isSuffixActive;
final IconData? suffixIcon;
final void Function()? onSuffixPress;
final void Function(String val)? onChanged;
final bool borderSideActive;
final double? marginTop;
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: (marginActive) ? AppPadding.p20 : 0,
),
margin: EdgeInsets.only(
top: (marginTop != null) ? marginTop! : 0,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(
bottom: AppMargin.m12,
),
child: Text(
labelText,
style: getSemiBoldStyle(
color: (labelColor == null) ? Colors.black : labelColor!,
fontSize: 16,
),
),
),
TextField(
maxLength: maxLength,
maxLines: maxLines,
enabled: enabled,
onChanged: onChanged,
obscureText: secure,
keyboardType: inputType,
textInputAction: TextInputAction.done,
controller: controller,
decoration: InputDecoration(
hintText: hintText,
hintStyle: getRegularStyle(
color: Colors.grey,
),
counterText: (showCounter) ? null : "",
enabledBorder: (borderSideActive)
? OutlineInputBorder(
borderSide: BorderSide(
width: 0.4,
color: (isError) ? Colors.red : ColorManager.grey),
borderRadius: BorderRadius.circular(5),
)
: null,
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(width: 0.4, color: ColorManager.grey),
borderRadius: BorderRadius.circular(5),
),
disabledBorder: (borderSideActive)
? OutlineInputBorder(
borderSide:
BorderSide(width: 0.4, color: ColorManager.grey),
borderRadius: BorderRadius.circular(5),
)
: null,
suffixIcon: (isSuffixActive)
? IconButton(
onPressed: onSuffixPress,
icon: Icon(
suffixIcon,
color: Colors.grey,
),
)
: null,
),
style: getRegularStyle(
color: Colors.black,
),
),
],
),
);
}
}
class DateFormatCustom {
static String monthLocal(String month) {
switch (month) {
case "01":
return "Januari";
case "02":
return "Februari";
case "03":
return "Maret";
case "04":
return "April";
case "05":
return "Mei";
case "06":
return "Juni";
case "07":
return "Juli";
case "08":
return "Agustus";
case "09":
return "September";
case "10":
return "Oktober";
case "11":
return "November";
case "12":
return "Desember";
default:
return "Unknown";
}
}
static String localTimeZoneName(String timeZoneOffset) {
String timeZoneSplit = timeZoneOffset.split(":")[0];
switch (timeZoneSplit) {
case "7":
return "WIB";
case "8":
return "WITA";
case "9":
return "WIT";
default:
return "+$timeZoneSplit";
}
}
static String getLocalTime({bool timeZoneActive = false}) {
DateTime localTime = DateTime.now().toLocal();
int hour = localTime.hour;
String min = localTime.minute.toString();
String minute;
if (min.length == 1) {
minute = "0$min";
} else {
minute = min;
}
// int sec = localTime.second;
String timeZone = localTimeZoneName(localTime.timeZoneOffset.toString());
String result;
if (timeZoneActive) {
result = "$hour : $minute $timeZone";
} else {
result = "$hour : $minute";
}
return result;
}
static String getDateLocal() {
DateTime localTime = DateTime.now().toLocal();
int day = localTime.day;
String month = monthLocal(localTime.month.toString());
int year = localTime.year;
String result = "$day $month $year";
return result;
}
}
// ignore_for_file: avoid_print
String logd(String location, String message) {
// buka file dengan path + nama file (yyyymmdd).log
// tulis ke file timestamp + location + message
// tutup file log
print("LOCATION => $location");
print("LOGD => $message");
return message;
}
// ignore_for_file: must_be_immutable
import 'package:excelso_attendance/resource/colors.dart';
import 'package:flutter/material.dart';
class ScreenResponsive extends StatefulWidget {
Widget widget;
double widthScreen;
bool isCoreLayout;
Color? sideColor;
ScreenResponsive({
Key? key,
required this.widget,
required this.widthScreen,
this.isCoreLayout = true,
this.sideColor,
}) : super(key: key);
@override
State<ScreenResponsive> createState() => _ScreenResponsiveState();
}
class _ScreenResponsiveState extends State<ScreenResponsive> {
@override
Widget build(BuildContext context) {
double maxWidthScreen = getMaxWidthScreen(context, true);
if (widget.widthScreen > maxWidthScreen) {
double leftRight = (widget.widthScreen - maxWidthScreen) / 2;
if (widget.isCoreLayout) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: leftRight,
height: MediaQuery.of(context).size.height,
color: (widget.sideColor == null)
? ColorManager.primary
: widget.sideColor,
),
SizedBox(
width: maxWidthScreen,
child: widget.widget,
),
Container(
width: leftRight,
height: MediaQuery.of(context).size.height,
color: (widget.sideColor == null)
? ColorManager.primary
: widget.sideColor,
)
],
);
} else {
return Center(
child: widget.widget,
);
}
} else {
return widget.widget;
}
}
}
const double maxWidthScreens = 500;
double getMaxWidthScreen(context, bool useResponsive) {
double widhtScreen = MediaQuery.of(context).size.width;
if (useResponsive) {
return maxWidthScreens;
} else {
return widhtScreen;
}
}
import 'package:excelso_attendance/resource/routes.dart';
import 'package:flutter/material.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:url_strategy/url_strategy.dart';
bool debug = true;
late SharedPreferences prefs;
String titleApp = 'Excelso Attendances';
void main() {
WidgetsFlutterBinding.ensureInitialized();
setPathUrlStrategy();
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 MaterialApp(
title: titleApp,
debugShowCheckedModeBanner: false,
onGenerateRoute: RouteGenerator.getRoute,
initialRoute: Routes.onBoarding,
);
}
}
class BranchModel {
String id;
String code;
String name;
BranchModel({
required this.id,
required this.code,
required this.name,
});
factory BranchModel.json(Map<String, dynamic> json) {
return BranchModel(
id: json['id'],
code: json['code'],
name: json['name'],
);
}
}
class ShiftModel {
String id;
String name;
String startTime;
String endTime;
ShiftModel({
required this.id,
required this.name,
required this.startTime,
required this.endTime,
});
factory ShiftModel.json(Map<String, dynamic> json) {
return ShiftModel(
id: json['id'],
name: json['name'],
startTime: json['start_time'],
endTime: json['end_time'],
);
}
}
This diff is collapsed.
This diff is collapsed.
import 'package:excelso_attendance/resource/assets.dart';
import 'package:excelso_attendance/resource/colors.dart';
import 'package:excelso_attendance/resource/font.dart';
import 'package:excelso_attendance/resource/routes.dart';
import 'package:excelso_attendance/resource/size.dart';
import 'package:excelso_attendance/resource/style.dart';
import 'package:flutter/material.dart';
class OnBoardingView extends StatelessWidget {
const OnBoardingView({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: ColorManager.backgroundColor,
body: SingleChildScrollView(
child: Column(
children: [
Container(
width: double.infinity,
decoration: BoxDecoration(
color: ColorManager.primary,
borderRadius: const BorderRadius.only(
bottomLeft: Radius.circular(50),
bottomRight: Radius.circular(50),
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.only(
top: AppPadding.safeAreaTop(context) + 38,
left: AppPadding.p20,
right: AppPadding.p20,
),
child: Center(
child: Image(
width: 119,
height: 46,
image: AssetImage(Assets.excelso),
),
),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: AppPadding.p20,
),
margin: EdgeInsets.only(
top: AppMargin.m16,
),
width: double.infinity,
height: 332,
child: Image(
fit: BoxFit.fill,
image: AssetImage(
Assets.onboarding,
),
),
),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 40,
),
margin: const EdgeInsets.only(
top: 32,
bottom: 59,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Attendance",
style: getSemiBoldStyle(
color: Colors.white,
fontSize: 24,
fontFamily: FontConstants.montserrat,
),
),
Text(
'''Memudahkan anda melakukan absen
dengan sekali klik''',
style: getRegularStyle(
color: Colors.white,
fontSize: 12,
),
)
],
),
)
],
),
),
GestureDetector(
onTap: () {
Navigator.pushNamed(context, Routes.home);
},
child: Container(
margin: const EdgeInsets.only(
top: 60,
),
child: Center(
child: Container(
width: 60,
height: 60,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(100),
color: ColorManager.primary,
),
child: const Center(
child: Icon(
Icons.arrow_forward_ios_rounded,
color: Colors.white,
size: 23,
),
),
),
),
),
),
Container(
margin: const EdgeInsets.only(
top: 30,
),
child: Text(
"Since © 2023",
style: getMediumStyle(
color: Colors.black,
),
),
)
],
),
),
);
}
}
const String rootImage = "assets/images/";
const String rootIcon = "assets/icons/";
class Assets {
// images
static String excelso = "${rootImage}excelso.png";
static String excelsoLogo = "${rootImage}excelso_logo.png";
static String onboarding = "${rootImage}onboarding.png";
static String frameOverlay = "${rootImage}frame_overlay.png";
static String frameOverlay2 = "${rootImage}frame_overlay2.png";
// icons
}
import 'package:flutter/material.dart';
class ColorManager {
static Color backgroundColor = Colors.white;
static Color primary = const Color(0xff003366);
static Color pink = const Color(0xffD997DF);
static Color link = const Color(0xff1868AB);
static Color grey = const Color(0xff595959);
static Color softGreen = const Color(0xffA4D8C8);
static Color green = const Color(0xff3CA786);
}
import 'package:flutter/cupertino.dart';
class FontConstants {
static const String openSans = "Open Sans";
static const String montserrat = "Montserrat";
static const String poppins = "Poppins";
}
class FontWeightManager {
static const FontWeight light = FontWeight.w300;
static const FontWeight regular = FontWeight.w400;
static const FontWeight medium = FontWeight.w500;
static const FontWeight semiBold = FontWeight.w600;
static const FontWeight bold = FontWeight.w700;
}
class FontSize {
static const double s8 = 8.0;
static const double s10 = 10.0;
static const double s12 = 12.0;
static const double s14 = 14.0;
static const double s16 = 16.0;
static const double s17 = 17.0;
static const double s18 = 18.0;
static const double s20 = 20.0;
static const double s22 = 22.0;
static const double s24 = 24.0;
}
import 'package:excelso_attendance/helper/arguments/route_args.dart';
import 'package:excelso_attendance/main.dart';
import 'package:excelso_attendance/page/absent_camera/absent_camera.dart';
import 'package:excelso_attendance/page/home/home.dart';
import 'package:excelso_attendance/page/onboarding/onboarding.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class Routes {
static const String onBoarding = "/onboarding";
static const String home = "/home";
static const String absentCamera = "/absent-camera";
}
class RouteGenerator {
static Route<dynamic> getRoute(RouteSettings routeSettings) {
switch (routeSettings.name) {
case Routes.onBoarding:
return pageRouteCustom(const OnBoardingView(),
nameRoute: Routes.onBoarding);
case Routes.home:
return pageRouteCustom(HomeView(), nameRoute: Routes.home);
case Routes.absentCamera:
AbsentCameraArguments args =
routeSettings.arguments as AbsentCameraArguments;
return pageRouteCustom(
AbsentCameraView(
outletName: args.outletName,
isIn: args.isIn,
),
nameRoute: Routes.absentCamera,
routeSettings: routeSettings,
);
default:
return unDefinedRoute();
}
}
static void setTitle(String title) {
SystemChrome.setApplicationSwitcherDescription(
ApplicationSwitcherDescription(label: "$title | $titleApp"),
);
}
static PageRouteBuilder<dynamic> pageRouteCustom(
Widget target, {
required String nameRoute,
String title = "",
RouteSettings? routeSettings,
}) {
// setTitle(title);
if (nameRoute == Routes.absentCamera) {
AbsentCameraArguments args =
routeSettings!.arguments as AbsentCameraArguments;
return PageRouteBuilder(
pageBuilder: (context, a, b) => AbsentCameraView(
outletName: args.outletName,
isIn: args.isIn,
),
transitionDuration: Duration.zero,
reverseTransitionDuration: Duration.zero,
settings: RouteSettings(
name: nameRoute.replaceFirst("/", ""), arguments: args),
);
} else {
return PageRouteBuilder(
pageBuilder: (context, a, b) => target,
transitionDuration: Duration.zero,
reverseTransitionDuration: Duration.zero,
settings: RouteSettings(name: nameRoute.replaceFirst("/", "")),
);
}
}
static Route<dynamic> unDefinedRoute() {
return MaterialPageRoute(
builder: (_) => Scaffold(
appBar: AppBar(
title: const Text("No Route Found"),
),
body: const Center(
child: Text("No Route Found"),
),
),
);
}
}
import 'package:flutter/material.dart';
class AppPadding {
static double safeAreaTop(BuildContext context) {
return MediaQuery.of(context).padding.top;
}
static double safeAreaBot(BuildContext context) {
return MediaQuery.of(context).padding.bottom;
}
static double p8 = 8;
static double p9 = 9;
static double p10 = 10;
static double p12 = 12;
static double p14 = 14;
static double p15 = 15;
static double p20 = 20;
}
class AppMargin {
static double m4 = 4;
static double m6 = 6;
static double m8 = 8;
static double m10 = 10;
static double m12 = 12;
static double m16 = 16;
static double m18 = 18;
static double m20 = 20;
static double m25 = 25;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment