Showing preview only (499K chars total). Download the full file or copy to clipboard to get everything.
Repository: ryanaidilp/sistem_absensi_pegawai_app
Branch: master
Commit: 896c2201a003
Files: 107
Total size: 466.7 KB
Directory structure:
gitextract_q81wuefv/
├── .gitignore
├── .metadata
├── LICENSE
├── README.md
├── analysis_options.yaml
├── android/
│ ├── .gitignore
│ ├── app/
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── debug/
│ │ │ └── AndroidManifest.xml
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin/
│ │ │ │ └── com/
│ │ │ │ └── banuacoders/
│ │ │ │ └── siap/
│ │ │ │ └── MainActivity.kt
│ │ │ └── res/
│ │ │ ├── drawable/
│ │ │ │ ├── gradient_background.xml
│ │ │ │ └── launch_background.xml
│ │ │ ├── mipmap-anydpi-v26/
│ │ │ │ └── ic_launcher.xml
│ │ │ └── values/
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ └── profile/
│ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ └── gradle-wrapper.properties
│ ├── gradle.properties
│ ├── settings.gradle
│ └── settings_aar.gradle
├── assets/
│ └── flare/
│ ├── documents.flr
│ ├── empty.flr
│ ├── failure.flr
│ ├── not_found.flr
│ ├── qrcode.flr
│ └── success.flr
├── ios/
│ ├── .gitignore
│ ├── Flutter/
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner/
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.imageset/
│ │ │ ├── Contents.json
│ │ │ └── README.md
│ │ ├── Base.lproj/
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
│ ├── Runner.xcodeproj/
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata/
│ │ └── xcschemes/
│ │ └── Runner.xcscheme
│ └── Runner.xcworkspace/
│ ├── contents.xcworkspacedata
│ └── xcshareddata/
│ ├── IDEWorkspaceChecks.plist
│ └── WorkspaceSettings.xcsettings
├── lib/
│ ├── main.dart
│ ├── models/
│ │ ├── absent_permission.dart
│ │ ├── employee.dart
│ │ ├── holiday.dart
│ │ ├── location.dart
│ │ ├── notification.dart
│ │ ├── outstation.dart
│ │ ├── paid_leave.dart
│ │ ├── presence.dart
│ │ ├── report/
│ │ │ ├── absent_report.dart
│ │ │ ├── daily.dart
│ │ │ ├── monthly.dart
│ │ │ └── yearly.dart
│ │ └── user.dart
│ ├── network/
│ │ ├── api.dart
│ │ └── api_service.dart
│ ├── repositories/
│ │ └── data_repository.dart
│ ├── screen/
│ │ ├── application_screen.dart
│ │ ├── bottom_nav_screen.dart
│ │ ├── change_absent_permission_photo_screen.dart
│ │ ├── change_outstation_photo_screen.dart
│ │ ├── change_paid_leave_photo_screen.dart
│ │ ├── change_pass_screen.dart
│ │ ├── create_notification_screen.dart
│ │ ├── create_outstation_screen.dart
│ │ ├── create_paid_leave_screen.dart
│ │ ├── create_permission_screen.dart
│ │ ├── employee_attendance_screen.dart
│ │ ├── employee_list_screen.dart
│ │ ├── employee_outstation.dart
│ │ ├── employee_paid_leave_screen.dart
│ │ ├── employee_permission.dart
│ │ ├── forgot_pass_screen.dart
│ │ ├── home_screen.dart
│ │ ├── image_detail_screen.dart
│ │ ├── login_screen.dart
│ │ ├── notification_list_screen.dart
│ │ ├── on_boarding_screen.dart
│ │ ├── outstation_list_screen.dart
│ │ ├── paid_leave_list_screen.dart
│ │ ├── permission_list_screen.dart
│ │ ├── presence_screen.dart
│ │ ├── regulation_screen.dart
│ │ ├── report_screen.dart
│ │ └── splash_screen.dart
│ ├── utils/
│ │ ├── app_const.dart
│ │ ├── extensions.dart
│ │ ├── file_util.dart
│ │ └── view_util.dart
│ └── widgets/
│ ├── employee_presence_card_widget.dart
│ ├── employee_proposal_info_widget.dart
│ ├── employee_proposal_widget.dart
│ ├── image_placeholder_widget.dart
│ ├── next_presence_empty_card_widget.dart
│ ├── statistics_card_widget.dart
│ └── user_info_card_widget.dart
├── privacy-policy.md
├── pubspec.yaml
└── test/
└── widget_test.dart
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# Environment Variable
.env
# 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/
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
================================================
FILE: .metadata
================================================
# 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: 8874f21e79d7ec66d0457c7ab338348e31b17f1d
channel: stable
project_type: app
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
================================================
FILE: README.md
================================================
<p align="center">
<img src="https://i.ibb.co/jGgBj1n/icon.png" height="200"/>
</p>
<h1 align="center">SiAP</h1>
Aplikasi Android untuk manajemen data presensi pegawai di lingkungan kantor pemerintahan Kecamatan Balaesang. Aplikasi ini dibangun dengan [Flutter](https://flutter.dev)
[](https://play.google.com/store/apps/details?id=com.banuacoders.siap)
## About
Aplikasi ini dibangun untuk mengatasi permasalahan pencatatan absensi pegawai di lingkungan kantor pemerintahan Kecamatan Balaesang. Pencatatan kehadiran pegawai di kantor pemerintahan Kecamatan Balaesang selama ini masih dilakukan secara manual yaitu dengan memberi paraf pada absensi.
Permasalahan timbul saat sebagian besar pegawai tidak jujur dalam mengisi absen tersebut, ada yang titip ke teman untuk diparaf namanya, ada yang langsung isi absen sampai beberapa hari ke depan, ada yang mengisi absen diluar waktunya, dsb. Dengan adanya sistem ini, diharapkan bisa membantu mengatasi permasalahan-permasalahan yang telah disebutkan.
## License
**SiAP** is open-sourced software licensed under the [GPL v2.0](https://www.gnu.org/licenses/gpl-2.0.html).
## Konfigurasi
*Clone* repository back-end aplikasinya [disini](https://github.com/ryanaidilp/sistem_absensi_pegawai). Buat file **.env** pada root folder aplikasi ini lalu tambahkan variabel berikut
```dotenv
BASE_URL=BASE URL ONLINE
LOCAL_URL=LOCAL_URL #Jika kamu ingin menyambungkian ke server di localhost
ONE_SIGNAL_APP_ID=APP ID UNTUK ONE SIGNAL
ADMIN_PHONE_NUMBER=Nomor handphone admin server
```
Isikan variabel sesuai dengan konfigurasi anda.
Untuk mendapatkan `ONE_SIGNAL_APP_ID`, buat akun di [One Signal](https://app.onesignal.com) lalu ikuti petunjuk cara untuk mendapatkan `APP_KEY` melalui dokumentasi resmi One Signal.
Pastikan `ONE_SIGNAL_APP_ID` pada aplikasi ini sama dengan yang digunakan di aplikasi [backend](https://github.com/ryanaidilp/sistem_absensi_pegawai)
## Screenshoot

================================================
FILE: analysis_options.yaml
================================================
include: package:lint/analysis_options.yaml
================================================
FILE: android/.gitignore
================================================
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
================================================
FILE: android/app/build.gradle
================================================
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"
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply from: project(':flutter_config').projectDir.getPath() + "/dotenv.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if(keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 30
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "com.banuacoders.siap"
minSdkVersion 24
targetSdkVersion 30
versionCode 46
versionName '5.0.3'
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
================================================
FILE: android/app/proguard-rules.pro
================================================
-keep class com.banuacoders.siap.BuildConfig{ *; }
## Flutter wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
-dontwarn io.flutter.embedding.**
## Gson rules
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-dontwarn sun.misc.**
#-keep class com.google.gson.stream.** { *; }
# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}
================================================
FILE: android/app/src/debug/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.banuacoders.siap">
<!-- Flutter 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>
================================================
FILE: android/app/src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.banuacoders.siap">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:name="io.flutter.app.FlutterApplication"
android:requestLegacyExternalStorage="true"
android:label="SiAP Balaesang"
android:roundIcon="@mipmap/ic_launcher_round"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:showWhenLocked="true"
android:turnScreenOn="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"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<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>
================================================
FILE: android/app/src/main/kotlin/com/banuacoders/siap/MainActivity.kt
================================================
package com.banuacoders.siap
import io.flutter.embedding.android.FlutterActivity
import android.os.Build
import android.view.ViewTreeObserver
import android.view.WindowManager
class MainActivity: FlutterActivity()
================================================
FILE: android/app/src/main/res/drawable/gradient_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:startColor="@color/splash_color"
android:angle="90"
android:endColor="@color/end_color"/>
</shape>
================================================
FILE: android/app/src/main/res/drawable/launch_background.xml
================================================
<?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="@drawable/gradient_background" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
<item>
<bitmap android:gravity="center" android:src="@drawable/splash" />
</item>
</layer-list>
================================================
FILE: android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
================================================
FILE: android/app/src/main/res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="splash_color">#0C2979</color>
<color name="end_color">#71A7F8</color>
</resources>
================================================
FILE: android/app/src/main/res/values/styles.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter 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:color/white</item>
</style>
</resources>
================================================
FILE: android/app/src/profile/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.banuacoders.siap">
<!-- Flutter 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>
================================================
FILE: android/build.gradle
================================================
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.9, 0.99.99]'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
================================================
FILE: android/gradle/wrapper/gradle-wrapper.properties
================================================
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
================================================
FILE: android/gradle.properties
================================================
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
android.enableR8=true
================================================
FILE: android/settings.gradle
================================================
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"
================================================
FILE: android/settings_aar.gradle
================================================
include ':app'
================================================
FILE: ios/.gitignore
================================================
*.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/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
================================================
FILE: ios/Flutter/AppFrameworkInfo.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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</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>9.0</string>
</dict>
</plist>
================================================
FILE: ios/Flutter/Debug.xcconfig
================================================
#include "Generated.xcconfig"
================================================
FILE: ios/Flutter/Release.xcconfig
================================================
#include "Generated.xcconfig"
================================================
FILE: ios/Runner/AppDelegate.swift
================================================
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
var flutter_native_splash = 1
UIApplication.shared.isStatusBarHidden = false
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
================================================
FILE: ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"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"
}
}
================================================
FILE: ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
================================================
{
"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"
}
}
================================================
FILE: ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
================================================
# 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.
================================================
FILE: ios/Runner/Base.lproj/LaunchScreen.storyboard
================================================
<?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="0.4196078431372549" green="0.5568627450980392" blue="0.9372549019607843" 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="512" height="512"/>
</resources>
</document>
================================================
FILE: ios/Runner/Base.lproj/Main.storyboard
================================================
<?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>
================================================
FILE: ios/Runner/Info.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>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</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>spo_balaesang</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>UIStatusBarHidden</key>
<true/>
</dict>
</plist>
================================================
FILE: ios/Runner/Runner-Bridging-Header.h
================================================
#import "GeneratedPluginRegistrant.h"
================================================
FILE: ios/Runner.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
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 */; };
/* End PBXBuildFile 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>"; };
/* 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>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
);
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 */
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "";
TargetAttributes = {
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 */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
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;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
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;
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 */
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase 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 = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Profile;
};
249021D4217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.banuacoders.siapesang;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
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 = 9.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 = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
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;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.banuacoders.siapesang;
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;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.banuacoders.siapesang;
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 */
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 */;
}
================================================
FILE: ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
================================================
FILE: ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
================================================
<?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>
================================================
FILE: ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
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">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</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>
<AdditionalOptions>
</AdditionalOptions>
</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>
================================================
FILE: ios/Runner.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
================================================
FILE: ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
================================================
<?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>
================================================
FILE: lib/main.dart
================================================
import 'dart:math';
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_config/flutter_config.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:get/get.dart';
import 'package:intl/date_symbol_data_local.dart';
import 'package:intl/intl.dart';
import 'package:onesignal_flutter/onesignal_flutter.dart';
import 'package:provider/provider.dart';
import 'package:spo_balaesang/network/api.dart';
import 'package:spo_balaesang/repositories/data_repository.dart';
import 'package:spo_balaesang/screen/splash_screen.dart';
import 'package:timezone/data/latest.dart' as tz;
import 'package:timezone/timezone.dart' as tz;
import 'network/api_service.dart';
final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
FlutterLocalNotificationsPlugin();
Future<void> main() async {
await initializeDateFormatting();
WidgetsFlutterBinding.ensureInitialized();
await FlutterConfig.loadEnvVariables();
Intl.defaultLocale = 'id_ID';
OneSignal.shared.setLogLevel(OSLogLevel.verbose, OSLogLevel.none);
OneSignal.shared.setLocationShared(true);
OneSignal.shared.init(FlutterConfig.get("ONE_SIGNAL_APP_ID").toString(),
iOSSettings: {
OSiOSSettings.autoPrompt: false,
OSiOSSettings.inAppLaunchUrl: false
});
OneSignal.shared
.setInFocusDisplayType(OSNotificationDisplayType.notification);
const initializedSettingsAndroid =
AndroidInitializationSettings('ic_stat_onesignal_default');
const initializationSettings =
InitializationSettings(android: initializedSettingsAndroid);
await flutterLocalNotificationsPlugin.initialize(initializationSettings);
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
.then((_) {
runApp(MyApp());
});
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return Provider(
create: (_) => DataRepository(apiService: ApiService(api: API())),
child: GetMaterialApp(
debugShowCheckedModeBanner: false,
title: 'SIAP Balaesang',
theme: ThemeData(
primarySwatch: Colors.blue,
backgroundColor: Colors.white,
scaffoldBackgroundColor: Colors.grey[100],
appBarTheme: const AppBarTheme(
brightness: Brightness.dark,
)),
home: SplashScreen()),
);
}
}
Future<void> scheduleAlarm(
DateTime scheduledNotificationDateTime, String body) async {
final androidPlatformChannelSpecifics = AndroidNotificationDetails(
'alarm_id', 'alarm_id', 'Channel alarm',
icon: 'ic_stat_onesignal_default',
enableLights: true,
priority: Priority.high,
importance: Importance.max,
vibrationPattern: Int64List.fromList([0, 1000, 5000, 2000]));
tz.initializeTimeZones();
tz.setLocalLocation(tz.getLocation('Asia/Makassar'));
final scheduleTime = tz.TZDateTime.from(
scheduledNotificationDateTime, tz.getLocation('Asia/Makassar'));
final platformChannelSpecifics =
NotificationDetails(android: androidPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.zonedSchedule(
Random().nextInt(int.parse(pow(2, 31).toString())),
'Pengingat',
body,
scheduleTime,
platformChannelSpecifics,
uiLocalNotificationDateInterpretation:
UILocalNotificationDateInterpretation.absoluteTime,
androidAllowWhileIdle: true,
);
}
================================================
FILE: lib/models/absent_permission.dart
================================================
import 'package:spo_balaesang/models/user.dart';
import 'package:spo_balaesang/utils/app_const.dart';
class AbsentPermission {
const AbsentPermission(
{this.id,
this.title,
this.dueDate,
this.startDate,
this.description,
this.photo,
this.approvalStatus,
this.isApproved,
this.user});
final int id;
final String title;
final String description;
final bool isApproved;
final String photo;
final String approvalStatus;
final DateTime dueDate;
final DateTime startDate;
final User user;
factory AbsentPermission.fromJson(Map<String, dynamic> json) {
return AbsentPermission(
id: json[absentPermissionIdField] as int,
title: json[absentPermissionTitleField] as String,
description: json[absentPermissionDescriptionField] as String,
isApproved: json[absentPermissionIsApprovedField] as bool,
photo: json[absentPermissionPhotoField] as String,
approvalStatus: json[approvalStatusField] as String,
dueDate: DateTime.parse(json[absentPermissionDueDateField].toString()),
startDate:
DateTime.parse(json[absentPermissionStartDateField].toString()),
user: json[absentPermissionUserField] != null
? User.fromJson(
json[absentPermissionUserField] as Map<String, dynamic>)
: null);
}
}
================================================
FILE: lib/models/employee.dart
================================================
import 'package:spo_balaesang/models/presence.dart';
import 'package:spo_balaesang/utils/app_const.dart';
class Employee {
const Employee(
{this.id,
this.nip,
this.name,
this.phone,
this.gender,
this.department,
this.status,
this.position,
this.presences,
this.rank,
this.group});
final int id;
final String nip;
final String name;
final String phone;
final String gender;
final String department;
final String status;
final String position;
final String rank;
final String group;
final List<Presence> presences;
factory Employee.fromJson(Map<String, dynamic> json) {
return Employee(
id: json[userIdField] as int,
nip: json[userNipField] as String,
name: json[userNameField] as String,
phone: json[userPhoneField] as String,
gender: json[userGenderField] as String,
department: json[userDepartmentField] as String,
rank: json[userRankField] as String,
group: json[userGroupField] as String,
status: json[userStatusField] as String,
position: json[userPositionField] as String,
presences: json[userPresencesField] != null
? (json[userPresencesField] as List<dynamic>)
.map((json) => Presence.fromJson(json as Map<String, dynamic>))
.toList()
: null);
}
Map<String, dynamic> toJson() => {
userIdField: id,
userNameField: name,
userNipField: nip,
userPhoneField: phone,
userGenderField: gender,
userDepartmentField: department,
userRankField: rank,
userGroupField: group,
userStatusField: status,
userPositionField: position
};
}
================================================
FILE: lib/models/holiday.dart
================================================
import 'package:spo_balaesang/utils/app_const.dart';
class Holiday {
const Holiday({this.date, this.name, this.description});
final DateTime date;
final String name;
final String description;
factory Holiday.fromJson(Map<String, dynamic> json) => Holiday(
date: json == null
? DateTime.now()
: DateTime.parse(json[holidayDateField].toString()),
name: json[holidayNameField] as String,
description: json[holidayDescriptionField] as String);
}
================================================
FILE: lib/models/location.dart
================================================
import 'package:spo_balaesang/utils/app_const.dart';
class Location {
const Location({this.latitude, this.longitude, this.address});
final double latitude;
final double longitude;
final String address;
factory Location.fromJson(Map<String, dynamic> json) {
return Location(
latitude: double.parse(json[locationLatitudeField].toString()),
longitude: double.parse(json[locationLongitudeField].toString()),
address: json[locationAddressField] as String);
}
Map<String, dynamic> toJson() => {
locationLatitudeField: latitude,
locationLongitudeField: longitude,
locationAddressField: address
};
}
================================================
FILE: lib/models/notification.dart
================================================
import 'package:spo_balaesang/utils/app_const.dart';
class UserNotification {
const UserNotification(
{this.id,
this.notifiableId,
this.notifiableType,
this.data,
this.isRead});
final String id;
final int notifiableId;
final String notifiableType;
final Map<String, dynamic> data;
final bool isRead;
factory UserNotification.fromJson(Map<String, dynamic> json) {
return UserNotification(
id: json[notificationIdField] as String,
notifiableId: json[notificationNotifiableIdField] as int,
notifiableType: json[notificationNotifiableTypeField] as String,
data: json[jsonDataField] as Map<String, dynamic>,
isRead: json[notificationIsReadField] as bool);
}
}
================================================
FILE: lib/models/outstation.dart
================================================
import 'package:spo_balaesang/models/user.dart';
import 'package:spo_balaesang/utils/app_const.dart';
class Outstation {
const Outstation(
{this.id,
this.title,
this.description,
this.isApproved,
this.photo,
this.approvalStatus,
this.dueDate,
this.startDate,
this.user});
final int id;
final String title;
final String description;
final bool isApproved;
final String photo;
final String approvalStatus;
final DateTime dueDate;
final DateTime startDate;
final User user;
factory Outstation.fromJson(Map<String, dynamic> json) {
return Outstation(
id: json[outstationIdField] as int,
title: json[outstationTitleField] as String,
description: json[outstationDescriptionField] as String,
isApproved: json[outstationIsApprovedField] as bool,
photo: json[outstationPhotoField] as String,
approvalStatus: json[approvalStatusField] as String,
dueDate: DateTime.parse(json[outstationDueDateField].toString()),
startDate: DateTime.parse(json[outstationStartDateField].toString()),
user: json[outstationUserField] != null
? User.fromJson(json[outstationUserField] as Map<String, dynamic>)
: null);
}
}
================================================
FILE: lib/models/paid_leave.dart
================================================
import 'package:spo_balaesang/models/user.dart';
import 'package:spo_balaesang/utils/app_const.dart';
class PaidLeave {
const PaidLeave(
{this.title,
this.id,
this.category,
this.photo,
this.approvalStatus,
this.description,
this.startDate,
this.dueDate,
this.isApproved,
this.user});
final int id;
final String title;
final String category;
final String description;
final bool isApproved;
final String approvalStatus;
final DateTime startDate;
final DateTime dueDate;
final String photo;
final User user;
factory PaidLeave.fromJson(Map<String, dynamic> json) => PaidLeave(
id: json[paidLeaveIdField] as int,
title: json[paidLeaveTitleField] as String,
category: json[paidLeaveCategoryField] as String,
description: json[paidLeaveDescriptionField] as String,
isApproved: json[paidLeaveIsApprovedField] as bool,
approvalStatus: json[approvalStatusField] as String,
startDate: DateTime.parse(json[paidLeaveStartDateField].toString()),
dueDate: DateTime.parse(json[paidLeaveDueDateField].toString()),
photo: json[paidLeavePhotoField] as String,
user: json[paidLeaveUserField] != null
? User.fromJson(json[paidLeaveUserField] as Map<String, dynamic>)
: null);
}
================================================
FILE: lib/models/presence.dart
================================================
import 'package:spo_balaesang/models/location.dart';
import 'package:spo_balaesang/utils/app_const.dart';
class Presence {
const Presence(
{this.id,
this.date,
this.codeType,
this.status,
this.attendTime,
this.location,
this.photo,
this.startTime,
this.endTime});
final int id;
final DateTime date;
final String codeType;
final String status;
final String attendTime;
final DateTime startTime;
final DateTime endTime;
final Location location;
final String photo;
factory Presence.fromJson(Map<String, dynamic> json) {
return Presence(
id: json[userIdField] as int,
date: DateTime.parse(json[presenceDateField].toString()),
codeType: json[presenceCodeTypeField] as String,
status: json[presenceStatusField] as String,
attendTime: json[presenceAttendTimeField] as String,
location: Location.fromJson(
json[presenceLocationField] as Map<String, dynamic>),
photo: json[presencePhotoField] as String,
startTime: DateTime.parse(json[presenceStartTimeField].toString()),
endTime: DateTime.parse(json[presenceEndTimeField].toString()),
);
}
}
================================================
FILE: lib/models/report/absent_report.dart
================================================
import 'package:spo_balaesang/models/holiday.dart';
import 'package:spo_balaesang/models/report/daily.dart';
import 'package:spo_balaesang/models/report/monthly.dart';
import 'package:spo_balaesang/models/report/yearly.dart';
import 'package:spo_balaesang/utils/app_const.dart';
class AbsentReport {
const AbsentReport(
{this.daily,
this.monthly,
this.yearly,
this.holidays,
this.totalWorkDay});
final List<Daily> daily;
final Monthly monthly;
final Yearly yearly;
final List<Holiday> holidays;
final int totalWorkDay;
factory AbsentReport.fromJson(Map<String, dynamic> json) => AbsentReport(
daily: (json[absentReportDailyField] as List<dynamic>)
.map((item) => Daily.fromJson(item as Map<String, dynamic>))
.toList(),
monthly: Monthly.fromJson(
json[absentReportMonthlyField] as Map<String, dynamic>),
yearly: Yearly.fromJson(
json[absentReportYearlyField] as Map<String, dynamic>),
holidays: (json[absentReportHolidaysField] as List<dynamic>)
.map((item) => Holiday.fromJson(item as Map<String, dynamic>))
.toList(),
totalWorkDay: json[reportTotalWorkDayField] as int);
}
================================================
FILE: lib/models/report/daily.dart
================================================
import 'package:spo_balaesang/models/location.dart';
import 'package:spo_balaesang/utils/app_const.dart';
class Daily {
const Daily({this.date, this.attendancePercentage, this.attendances});
final DateTime date;
final double attendancePercentage;
final List<DailyData> attendances;
factory Daily.fromJson(Map<String, dynamic> json) {
final List<dynamic> _presences = json[dailyPresencesField] as List<dynamic>;
return Daily(
date: DateTime.parse(json[dailyDateField].toString()),
attendancePercentage:
double.parse(json[reportAttendancePercentageFieldField].toString()),
attendances: _presences
.map((json) => DailyData.fromJson(json as Map<String, dynamic>))
.toList(),
);
}
}
class DailyData {
const DailyData(
{this.id,
this.date,
this.location,
this.attendType,
this.attendTime,
this.attendStatus,
this.startTime,
this.endTime,
this.address,
this.photo});
final int id;
final String date;
final Location location;
final String attendType;
final String attendTime;
final String attendStatus;
final DateTime startTime;
final DateTime endTime;
final String address;
final String photo;
factory DailyData.fromJson(Map<String, dynamic> json) => DailyData(
id: json[userIdField] as int,
date: json[presenceDateField].toString(),
location: Location.fromJson(
json[presenceLocationField] as Map<String, dynamic>),
attendTime: json[dailyDataAttendTimeField].toString(),
attendType: json[dailyDataAttendTypeField].toString(),
attendStatus: json[dailyDataAttendStatusField].toString(),
startTime: DateTime.parse(json[presenceStartTimeField].toString()),
endTime: DateTime.parse(json[presenceEndTimeField].toString()),
address: json[locationAddressField] as String,
photo: json[presencePhotoField] as String);
Map<String, dynamic> toMap() => <String, dynamic>{
userIdField: id,
dailyDataAttendTypeField: attendType,
dailyDataAttendTimeField: attendTime,
dailyDataAttendStatusField: attendStatus,
presenceStartTimeField: startTime.toString(),
locationAddressField: address,
presencePhotoField: photo
};
Map<String, dynamic> toPresenceJson() => <String, dynamic>{
userIdField: id,
presenceDateField: date,
presenceLocationField: location.toJson(),
presenceCodeTypeField: attendType,
presenceStatusField: attendStatus,
presenceAttendTimeField: attendTime,
presenceStartTimeField: startTime.toString(),
presenceEndTimeField: endTime.toString(),
presencePhotoField: photo
};
}
================================================
FILE: lib/models/report/monthly.dart
================================================
import 'package:spo_balaesang/utils/app_const.dart';
class Monthly {
const Monthly(
{this.lateCount,
this.attendancePercentage,
this.leaveEarlyCount,
this.notMorningParadeCount,
this.earlyLunchBreakCount,
this.notComeAfterLunchBreakCount});
final double attendancePercentage;
final int lateCount;
final int leaveEarlyCount;
final int notMorningParadeCount;
final int earlyLunchBreakCount;
final int notComeAfterLunchBreakCount;
factory Monthly.fromJson(Map<String, dynamic> json) => Monthly(
attendancePercentage:
double.parse(json[reportAttendancePercentageFieldField].toString()),
lateCount: json[reportLateCountField] as int,
leaveEarlyCount: json[reportLeaveEarlyFieldCountField] as int,
notMorningParadeCount: json[reportNotMorningParadeCountField] as int,
earlyLunchBreakCount: json[reportEarlyLunchBreakCountField] as int,
notComeAfterLunchBreakCount:
json[reportNotComeAfterLunchBreakCountField] as int);
}
================================================
FILE: lib/models/report/yearly.dart
================================================
import 'package:spo_balaesang/utils/app_const.dart';
class Yearly {
const Yearly({
this.attendancePercentage,
this.outstation,
this.absent,
this.lateCount,
this.absentPermission,
this.leaveEarlyCount,
this.earlyLunchBreakCount,
this.notComeAfterLunchBreakCount,
this.notMorningParadeCount,
this.annualLeave,
this.importantReasonLeave,
this.sickLeave,
this.maternityLeave,
this.outOfLiabilityLeave,
});
final double attendancePercentage;
final int lateCount;
final int leaveEarlyCount;
final int notMorningParadeCount;
final int earlyLunchBreakCount;
final int notComeAfterLunchBreakCount;
final Map<String, dynamic> absentPermission;
final Map<String, dynamic> outstation;
final Map<String, dynamic> absent;
final Map<String, dynamic> annualLeave;
final Map<String, dynamic> importantReasonLeave;
final Map<String, dynamic> sickLeave;
final Map<String, dynamic> maternityLeave;
final Map<String, dynamic> outOfLiabilityLeave;
factory Yearly.fromJson(Map<String, dynamic> json) {
return Yearly(
lateCount: json[reportLateCountField] as int,
attendancePercentage:
double.parse(json[reportAttendancePercentageFieldField].toString()),
absent: json[yearlyAbsentField] as Map<String, dynamic>,
absentPermission:
json[yearlyAbsentPermissionField] as Map<String, dynamic>,
outstation: json[yearlyOutstationField] as Map<String, dynamic>,
leaveEarlyCount: json[reportLeaveEarlyFieldCountField] as int,
notMorningParadeCount: json[reportNotMorningParadeCountField] as int,
earlyLunchBreakCount: json[reportEarlyLunchBreakCountField] as int,
notComeAfterLunchBreakCount:
json[reportNotComeAfterLunchBreakCountField] as int,
annualLeave: json[reportAnnualLeaveField] as Map<String, dynamic>,
importantReasonLeave:
json[reportImportantReasonLeaveField] as Map<String, dynamic>,
sickLeave: json[reportSickLeaveField] as Map<String, dynamic>,
maternityLeave: json[reportMaternityLeaveField] as Map<String, dynamic>,
outOfLiabilityLeave:
json[reportOutOfLiabilityLeaveField] as Map<String, dynamic>);
}
}
================================================
FILE: lib/models/user.dart
================================================
import 'package:spo_balaesang/models/holiday.dart';
import 'package:spo_balaesang/models/presence.dart';
import 'package:spo_balaesang/utils/app_const.dart';
class User {
const User(
{this.id,
this.nip,
this.name,
this.phone,
this.gender,
this.department,
this.status,
this.position,
this.unreadNotification,
this.token,
this.nextPresence,
this.presences,
this.holiday,
this.isWeekend,
this.rank,
this.group});
final int id;
final String nip;
final String name;
final String phone;
final String gender;
final String department;
final String status;
final String position;
final int unreadNotification;
final String token;
final Presence nextPresence;
final List<Presence> presences;
final Holiday holiday;
final bool isWeekend;
final String rank;
final String group;
factory User.fromJson(Map<String, dynamic> json) {
return User(
id: json[userIdField] as int,
nip: json[userNipField] as String,
name: json[userNameField] as String,
phone: json[userPhoneField] as String,
gender: json[userGenderField] as String,
department: json[userDepartmentField] as String,
status: json[userStatusField] as String,
position: json[userPositionField] as String,
unreadNotification: json[userUnreadNotificationsCountField] as int,
holiday: json[userIsHolidayField] == null
? null
: Holiday.fromJson(
json[userIsHolidayField] as Map<String, dynamic>),
isWeekend: json[userIsWeekendField] as bool,
token: json[userTokenField] as String,
nextPresence: json[userNextPresenceField] != null
? Presence.fromJson(json[userNextPresenceField][jsonDataField]
as Map<String, dynamic>)
: null,
presences: ((json[userPresencesField] != null) &&
(json[userPresencesField] as List<dynamic>).isNotEmpty)
? (json[userPresencesField] as List<dynamic>)
.map((json) => Presence.fromJson(json as Map<String, dynamic>))
.toList()
: [],
rank: json[userRankField] as String,
group: json[userGroupField] as String);
}
}
================================================
FILE: lib/network/api.dart
================================================
import 'package:flutter_config/flutter_config.dart';
enum Endpoint {
login,
logout,
changePass,
users,
presence,
my,
permission,
employeePermission,
approvePermission,
outstation,
employeeOutstation,
approveOutstation,
notifications,
readNotifications,
deleteNotifications,
sendNotifications,
statistics,
paidLeave,
employeePaidLeave,
approvePaidLeave,
cancelAttendance,
changePermissionPhoto,
changeOutstationPhoto,
changePaidLeavePhoto,
}
class API {
final String host = FlutterConfig.get("BASE_URL").toString();
String endpointUri(Endpoint endpoint) => '$host/api/${_paths[endpoint]}';
static final Map<Endpoint, String> _paths = {
Endpoint.login: 'login',
Endpoint.logout: 'logout',
Endpoint.changePass: 'change_password',
Endpoint.users: 'user',
Endpoint.presence: 'presence',
Endpoint.my: 'my',
Endpoint.permission: 'permission',
Endpoint.employeePermission: 'permission/all',
Endpoint.approvePermission: 'permission/approve',
Endpoint.outstation: 'outstation',
Endpoint.employeeOutstation: 'outstation/all',
Endpoint.approveOutstation: 'outstation/approve',
Endpoint.notifications: 'notifications',
Endpoint.readNotifications: 'notifications/read',
Endpoint.deleteNotifications: 'notifications/delete',
Endpoint.sendNotifications: 'notifications/send',
Endpoint.statistics: 'statistics',
Endpoint.paidLeave: 'paid-leave',
Endpoint.employeePaidLeave: 'paid-leave/all',
Endpoint.approvePaidLeave: 'paid-leave/approve',
Endpoint.cancelAttendance: 'presence/cancel',
Endpoint.changePermissionPhoto: 'permission/picture',
Endpoint.changeOutstationPhoto: 'outstation/picture',
Endpoint.changePaidLeavePhoto: 'paid-leave/picture',
};
}
================================================
FILE: lib/network/api_service.dart
================================================
import 'dart:convert';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart' as http;
import 'package:shared_preferences/shared_preferences.dart';
import 'package:spo_balaesang/network/api.dart';
import 'package:spo_balaesang/utils/app_const.dart';
class ApiService {
ApiService({@required this.api});
final API api;
String token = '';
Future<void> _getToken() async {
final SharedPreferences localStorage =
await SharedPreferences.getInstance();
token = jsonDecode(localStorage.getString(prefsTokenKey)) as String;
}
Future<Map<String, dynamic>> getEndpointData(
{@required Endpoint endpoint, Map<String, String> query}) async {
final url = api.endpointUri(endpoint);
await _getToken();
Uri uri = Uri.parse(url);
if (query != null) {
uri = uri.replace(queryParameters: query);
}
final response = await http.get(uri, headers: _setHeaders());
if (response.statusCode == 200) {
final Map<String, dynamic> data =
json.decode(response.body) as Map<String, dynamic>;
if (data['success'] as bool) {
return data;
}
}
throw response;
}
Future<http.Response> postEndpointWithoutToken(
{@required Endpoint endpoint, Map<String, dynamic> data}) async {
final url = api.endpointUri(endpoint);
final Uri uri = Uri.parse(url);
final response = await http.post(uri, body: data);
return response;
}
Future<http.Response> postEndpointWithToken(
{@required Endpoint endpoint, Map<String, dynamic> data}) async {
await _getToken();
final url = api.endpointUri(endpoint);
final Uri uri = Uri.parse(url);
final response =
http.post(uri, body: jsonEncode(data), headers: _setHeaders());
return response;
}
Map<String, String> _setHeaders() => <String, String>{
'Content-type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer $token'
};
}
================================================
FILE: lib/repositories/data_repository.dart
================================================
import 'dart:convert';
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:http/http.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:spo_balaesang/models/employee.dart';
import 'package:spo_balaesang/models/user.dart';
import 'package:spo_balaesang/network/api.dart';
import 'package:spo_balaesang/network/api_service.dart';
import 'package:spo_balaesang/utils/app_const.dart';
class DataRepository {
DataRepository({@required this.apiService});
final ApiService apiService;
Future<List<Employee>> getAllEmployee() async {
final SharedPreferences prefs = await SharedPreferences.getInstance();
List<Employee> employee;
try {
final Map<String, dynamic> _data =
await apiService.getEndpointData(endpoint: Endpoint.users);
final List<dynamic> _result = _data['data'] as List<dynamic>;
if (prefs.containsKey(prefsEmployeeKey)) {
prefs.remove(prefsEmployeeKey);
prefs.reload();
}
prefs.setString(prefsEmployeeKey, jsonEncode(_data['data']));
employee = _result
.map(
(dynamic json) => Employee.fromJson(json as Map<String, dynamic>))
.toList();
} on SocketException {
final Map<String, dynamic> data =
jsonDecode(prefs.getString(prefsEmployeeKey)) as Map<String, dynamic>;
final List<dynamic> _data = data['data'] as List<dynamic>;
employee = _data
.map(
(dynamic json) => Employee.fromJson(json as Map<String, dynamic>))
.toList();
} catch (e) {}
return employee;
}
Future<User> getMyData() async {
final SharedPreferences prefs = await SharedPreferences.getInstance();
User user;
try {
final Map<String, dynamic> _data =
await apiService.getEndpointData(endpoint: Endpoint.my);
prefs.remove(prefsUserKey);
prefs.reload();
prefs.setString(prefsUserKey, jsonEncode(_data['data']));
user = User.fromJson(_data['data'] as Map<String, dynamic>);
} on SocketException {
return null;
} catch (e) {}
return user;
}
Future<Map<String, dynamic>> logout() async {
Map<String, dynamic> response;
try {
final Map<String, dynamic> _data =
await apiService.getEndpointData(endpoint: Endpoint.logout);
response = _data;
} catch (e) {}
return response;
}
Future<Response> login(Map<String, dynamic> data) async {
Response response;
try {
response = await apiService.postEndpointWithoutToken(
endpoint: Endpoint.login, data: data);
} catch (e) {}
return response;
}
Future<Response> changePass(Map<String, dynamic> data) async {
Response response;
try {
response = await apiService.postEndpointWithToken(
endpoint: Endpoint.changePass, data: data);
} catch (e) {}
return response;
}
Future<Map<String, dynamic>> permission(Map<String, dynamic> data) async {
Map<String, dynamic> result;
try {
final response = await apiService.postEndpointWithToken(
endpoint: Endpoint.permission, data: data);
result = jsonDecode(response.body) as Map<String, dynamic>;
} catch (e) {}
return result;
}
Future<Map<String, dynamic>> getAllPermissions(DateTime date) async {
Map<String, dynamic> data;
try {
data = await apiService.getEndpointData(
endpoint: Endpoint.permission, query: {'date': date.toString()});
} catch (e) {}
return data;
}
Future<Map<String, dynamic>> getAllEmployeePermissions(DateTime date) async {
Map<String, dynamic> data;
try {
data = await apiService.getEndpointData(
endpoint: Endpoint.employeePermission,
query: {'date': date.toString()});
} catch (e) {}
return data;
}
Future<Response> approvePermission(Map<String, dynamic> data) async {
Response response;
try {
response = await apiService.postEndpointWithToken(
endpoint: Endpoint.approvePermission, data: data);
} catch (e) {}
return response;
}
Future<Map<String, dynamic>> changePermissionPhoto(
Map<String, dynamic> data) async {
Map<String, dynamic> result;
try {
final response = await apiService.postEndpointWithToken(
endpoint: Endpoint.changePermissionPhoto, data: data);
result = jsonDecode(response.body) as Map<String, dynamic>;
} catch (e) {}
return result;
}
Future<Map<String, dynamic>> outstation(Map<String, dynamic> data) async {
Map<String, dynamic> result;
try {
final response = await apiService.postEndpointWithToken(
endpoint: Endpoint.outstation, data: data);
result = jsonDecode(response.body) as Map<String, dynamic>;
} catch (e) {}
return result;
}
Future<Map<String, dynamic>> getAllOutstation(DateTime date) async {
Map<String, dynamic> data;
try {
data = await apiService.getEndpointData(
endpoint: Endpoint.outstation, query: {'date': date.toString()});
} catch (e) {}
return data;
}
Future<Map<String, dynamic>> getAllEmployeeOutstation(DateTime date) async {
Map<String, dynamic> data;
try {
data = await apiService.getEndpointData(
endpoint: Endpoint.employeeOutstation,
query: {'date': date.toString()});
} catch (e) {}
return data;
}
Future<Response> approveOutstation(Map<String, dynamic> data) async {
Response response;
try {
response = await apiService.postEndpointWithToken(
endpoint: Endpoint.approveOutstation, data: data);
} catch (e) {}
return response;
}
Future<Map<String, dynamic>> changeOutstationPhoto(
Map<String, dynamic> data) async {
Map<String, dynamic> result;
try {
final response = await apiService.postEndpointWithToken(
endpoint: Endpoint.changeOutstationPhoto, data: data);
result = jsonDecode(response.body) as Map<String, dynamic>;
} catch (e) {}
return result;
}
Future<Map<String, dynamic>> getAllNotifications() async {
Map<String, dynamic> data;
try {
data = await apiService.getEndpointData(endpoint: Endpoint.notifications);
} catch (e) {}
return data;
}
Future<Map<String, dynamic>> getStatistics(DateTime date,
[int userId]) async {
Map<String, dynamic> data;
final Map<String, String> queries = {
'year': date.year.toString(),
'month': date.month.toString(),
};
if (userId != null) {
queries['user_id'] = userId.toString();
}
try {
data = await apiService.getEndpointData(
endpoint: Endpoint.statistics, query: queries);
} catch (e) {}
return data;
}
Future<Response> readNotification(Map<String, dynamic> data) async {
Response response;
try {
response = await apiService.postEndpointWithToken(
endpoint: Endpoint.notifications, data: data);
} catch (e) {}
return response;
}
Future<Map<String, dynamic>> readAllNotifications() async {
Map<String, dynamic> data;
try {
data = await apiService.getEndpointData(
endpoint: Endpoint.readNotifications);
} catch (e) {}
return data;
}
Future<Map<String, dynamic>> deleteAllNotifications() async {
Map<String, dynamic> data;
try {
data = await apiService.getEndpointData(
endpoint: Endpoint.deleteNotifications);
} catch (e) {}
return data;
}
Future<Map<String, dynamic>> sendNotification(
Map<String, dynamic> data) async {
Map<String, dynamic> result;
try {
final response = await apiService.postEndpointWithToken(
endpoint: Endpoint.sendNotifications, data: data);
result = jsonDecode(response.body) as Map<String, dynamic>;
} catch (e) {}
return result;
}
Future<Response> presence(Map<String, dynamic> data) async {
Response response;
try {
response = await apiService.postEndpointWithToken(
endpoint: Endpoint.presence, data: data);
} catch (e) {}
return response;
}
Future<Map<String, dynamic>> getAllPaidLeave(DateTime date) async {
Map<String, dynamic> data;
try {
data = await apiService.getEndpointData(
endpoint: Endpoint.paidLeave, query: {'date': date.toString()});
} catch (e) {}
return data;
}
Future<Map<String, dynamic>> getAllEmployeePaidLeave(DateTime date) async {
Map<String, dynamic> data;
try {
data = await apiService.getEndpointData(
endpoint: Endpoint.employeePaidLeave,
query: {'date': date.toString()});
} catch (e) {}
return data;
}
Future<Map<String, dynamic>> changePaidLeavePhoto(
Map<String, dynamic> data) async {
Map<String, dynamic> result;
try {
final response = await apiService.postEndpointWithToken(
endpoint: Endpoint.changePaidLeavePhoto, data: data);
result = jsonDecode(response.body) as Map<String, dynamic>;
} catch (e) {}
return result;
}
Future<Response> approvePaidLeave(Map<String, dynamic> data) async {
Response response;
try {
response = await apiService.postEndpointWithToken(
endpoint: Endpoint.approvePaidLeave, data: data);
} catch (e) {}
return response;
}
Future<Map<String, dynamic>> paidLeave(Map<String, dynamic> data) async {
Map<String, dynamic> result;
try {
final response = await apiService.postEndpointWithToken(
endpoint: Endpoint.paidLeave, data: data);
result = jsonDecode(response.body) as Map<String, dynamic>;
} catch (e) {}
return result;
}
Future<Response> cancelAttendance(Map<String, dynamic> data) async {
Response response;
try {
response = await apiService.postEndpointWithToken(
endpoint: Endpoint.cancelAttendance, data: data);
} catch (e) {}
return response;
}
}
================================================
FILE: lib/screen/application_screen.dart
================================================
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:onesignal_flutter/onesignal_flutter.dart';
import 'package:progress_dialog/progress_dialog.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:spo_balaesang/main.dart';
import 'package:spo_balaesang/models/presence.dart';
import 'package:spo_balaesang/models/user.dart';
import 'package:spo_balaesang/repositories/data_repository.dart';
import 'package:spo_balaesang/screen/change_pass_screen.dart';
import 'package:spo_balaesang/screen/employee_attendance_screen.dart';
import 'package:spo_balaesang/screen/employee_outstation.dart';
import 'package:spo_balaesang/screen/employee_paid_leave_screen.dart';
import 'package:spo_balaesang/screen/employee_permission.dart';
import 'package:spo_balaesang/screen/forgot_pass_screen.dart';
import 'package:spo_balaesang/screen/login_screen.dart';
import 'package:spo_balaesang/screen/outstation_list_screen.dart';
import 'package:spo_balaesang/screen/paid_leave_list_screen.dart';
import 'package:spo_balaesang/screen/permission_list_screen.dart';
import 'package:spo_balaesang/screen/regulation_screen.dart';
import 'package:spo_balaesang/screen/report_screen.dart';
import 'package:spo_balaesang/utils/app_const.dart';
import 'package:spo_balaesang/utils/view_util.dart';
class ApplicationScreen extends StatefulWidget {
@override
_ApplicationScreenState createState() => _ApplicationScreenState();
}
class _ApplicationScreenState extends State<ApplicationScreen> {
User user;
bool _isAlarmActive = false;
List<Presence> _presences;
Future<void> loadData() async {
final sp = await SharedPreferences.getInstance();
final _data = sp.get(prefsUserKey);
bool _alarm = false;
if (sp.containsKey(prefsAlarmKey)) {
_alarm = sp.get(prefsAlarmKey) as bool;
} else {
sp.setBool(prefsAlarmKey, _alarm);
}
final Map<String, dynamic> _json =
jsonDecode(_data.toString()) as Map<String, dynamic>;
if (_alarm) {
await flutterLocalNotificationsPlugin.cancelAll();
}
setState(() {
user = User.fromJson(_json);
_presences = user.presences;
_isAlarmActive = _alarm;
if (_isAlarmActive) {
_presences.forEach(_setAlarm);
}
});
}
Future<void> logout() async {
try {
Get.defaultDialog(
title: 'Keluar',
content: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: const <Widget>[
Icon(
Icons.dangerous,
color: Colors.red,
size: 72,
),
sizedBoxH10,
Text('Apakah anda yakin ingin keluar dari aplikasi?'),
],
),
),
actions: <Widget>[
TextButton(
onPressed: () async {
Get.back();
final ProgressDialog pd =
ProgressDialog(context, isDismissible: false);
pd.show();
final dataRepo =
Provider.of<DataRepository>(context, listen: false);
final Map<String, dynamic> _response =
await dataRepo.logout();
if (_response['success'] as bool) {
final SharedPreferences prefs =
await SharedPreferences.getInstance();
prefs.remove(prefsTokenKey);
prefs.remove(prefsUserKey);
prefs.remove(prefsAlarmKey);
pd.hide();
OneSignal.shared.removeExternalUserId();
Get.off(() => LoginScreen());
}
},
child: const Text('Ya',
style: TextStyle(
color: Colors.blueAccent,
))),
TextButton(
onPressed: () {
Get.back();
},
child: const Text('Tidak',
style: TextStyle(
color: Colors.blueAccent,
))),
]);
} catch (e) {
showErrorDialog({
'message': 'Kesalahan',
'errors': {
'exception': ['Terjadi kesalahan!']
}
});
}
}
Future<void> _handleSelected(bool value) async {
final SharedPreferences prefs = await SharedPreferences.getInstance();
prefs.reload();
prefs.setBool(prefsAlarmKey, value);
setState(() {
_isAlarmActive = value;
});
if (value) {
_presences.forEach(_setAlarm);
showAlertDialog('success', 'Sukses', 'Berhasil mengaktifkan alarm!',
dismissible: true);
} else {
await flutterLocalNotificationsPlugin.cancelAll();
showAlertDialog('success', 'Sukses', 'Berhasil menonaktifkan alarm!',
dismissible: true);
}
}
void _setAlarm(Presence presence) {
const dur10Min = Duration(minutes: 10);
const dur1Day = Duration(days: 1);
if (presence.startTime.isAfter(DateTime.now())) {
scheduleAlarm(presence.startTime.subtract(dur10Min),
'${presence.codeType} akan dimulai dalam 10 menit!');
} else {
if (presence.startTime.weekday < DateTime.friday) {
scheduleAlarm(presence.startTime.add(dur1Day),
'${presence.codeType} akan dimulai dalam 10 menit!');
}
}
if (presence.endTime.isAfter(DateTime.now())) {
scheduleAlarm(presence.endTime.subtract(dur10Min),
'${presence.codeType} akan selesai dalam 10 menit!');
} else {
if (presence.endTime.weekday < DateTime.friday) {
scheduleAlarm(presence.endTime.add(dur1Day),
'${presence.codeType} akan selesai dalam 10 menit!');
}
}
}
@override
void setState(void Function() fn) {
if (mounted) {
super.setState(fn);
}
}
@override
void initState() {
super.initState();
loadData();
}
Widget _buildStakeholderMenu() {
if (user?.position != 'Camat') {
return sizedBox;
}
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Text(
'Atasan',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 18.0,
color: Colors.blueAccent),
),
dividerT1,
sizedBoxH10,
Card(
elevation: 2.0,
child: InkWell(
onTap: () {
Get.to(() => EmployeeAttendanceScreen());
},
child: const ListTile(
dense: false,
leading: Icon(
Icons.playlist_add_check_rounded,
color: Colors.green,
size: 32.0,
),
title: Text(
'Presensi Pegawai',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(
'Lihat & konfirmasi kehadiran pegawai',
style: TextStyle(color: Colors.black87),
),
),
),
),
sizedBoxH10,
Card(
elevation: 2.0,
child: InkWell(
onTap: () {
Get.to(() => EmployeePermissionScreen());
},
child: const ListTile(
leading: Icon(
Icons.playlist_add_check_rounded,
color: Colors.green,
size: 32.0,
),
title: Text(
'Persetujuan Izin',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(
'Setujui Izin yang diajukan',
style: TextStyle(color: Colors.black87),
),
),
),
),
sizedBoxH10,
Card(
elevation: 2.0,
child: InkWell(
onTap: () {
Get.to(() => EmployeeOutstationScreen());
},
child: const ListTile(
leading: Icon(
Icons.playlist_add_check_rounded,
color: Colors.green,
size: 32.0,
),
title: Text(
'Persetujuan Dinas Luar',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(
'Setujui Dinas Luar yang diajukan',
style: TextStyle(color: Colors.black87),
),
),
),
),
sizedBoxH10,
Card(
elevation: 2.0,
child: InkWell(
onTap: () {
Get.to(() => EmployeePaidLeaveScreen());
},
child: const ListTile(
leading: Icon(
Icons.playlist_add_check_rounded,
color: Colors.green,
size: 32.0,
),
title: Text(
'Persetujuan Cuti',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(
'Setujui Cuti yang diajukan',
style: TextStyle(color: Colors.black87),
),
),
),
),
sizedBoxH30,
],
);
}
Widget _buildCutiSection() {
if (user?.status == 'Honorer') {
return sizedBox;
}
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
sizedBoxH10,
Card(
elevation: 2.0,
child: InkWell(
onTap: () {
Get.to(() => PaidLeaveListScreen());
},
child: const ListTile(
leading: Icon(
Icons.card_giftcard_rounded,
color: Colors.red,
size: 32.0,
),
title: Text(
'Cuti',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(
'Pengajuan dan riwayat Cuti',
style: TextStyle(color: Colors.black87),
),
),
),
),
],
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey[200],
appBar: AppBar(
backgroundColor: Colors.blueAccent,
leading: Image.asset('assets/logo/logo.png'),
leadingWidth: Get.width * 0.25,
title: const Text('Aplikasi'),
),
body: SingleChildScrollView(
child: Container(
margin: const EdgeInsets.symmetric(horizontal: 8.0),
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Text(
'Pengaturan & Personalisasi',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 18.0,
color: Colors.blueAccent),
),
dividerT1,
sizedBoxH10,
Card(
elevation: 2.0,
child: SwitchListTile(
onChanged: _handleSelected,
activeColor: Colors.blueAccent,
value: _isAlarmActive,
secondary: const Icon(
Icons.alarm,
color: Colors.indigo,
size: 32.0,
),
title: const Text(
'Aktifkan Alarm Absensi',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: const Text(
'Pengingat waktu absen',
style: TextStyle(color: Colors.black87),
),
),
),
sizedBoxH30,
const Text(
'Presensi',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 18.0,
color: Colors.blueAccent),
),
dividerT1,
sizedBoxH10,
Card(
elevation: 2.0,
child: InkWell(
onTap: () {
Get.to(() => ReportScreen(user: user));
},
child: const ListTile(
leading: Icon(
Icons.bar_chart_rounded,
color: Colors.deepOrangeAccent,
size: 32.0,
),
title: Text(
'Statistik',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(
'Lihat statistik presensi anda',
style: TextStyle(color: Colors.black87),
),
),
),
),
sizedBoxH10,
Card(
elevation: 2.0,
child: InkWell(
onTap: () {
Get.to(() => PermissionListScreen());
},
child: const ListTile(
leading: Icon(
Icons.calendar_today_rounded,
color: Colors.purple,
size: 32.0,
),
title: Text(
'Izin',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(
'Pengajuan dan riwayat Izin',
style: TextStyle(color: Colors.black87),
),
),
),
),
sizedBoxH10,
Card(
elevation: 2.0,
child: InkWell(
onTap: () {
Get.to(() => OutstationListScreen());
},
child: ListTile(
leading: Icon(
Icons.card_travel_rounded,
color: Colors.yellow[800],
size: 32.0,
),
title: const Text(
'Dinas Luar',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: const Text(
'Pengajuan dan riwayat Dinas Luar',
style: TextStyle(color: Colors.black87),
),
),
),
),
_buildCutiSection(),
sizedBoxH30,
_buildStakeholderMenu(),
const Text(
'Bantuan',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 18.0,
color: Colors.blueAccent),
),
dividerT1,
Card(
elevation: 2.0,
child: InkWell(
onTap: () {
Get.to(() => ForgotPassScreen());
},
child: const ListTile(
leading: Icon(
Icons.warning,
color: Colors.pink,
size: 32.0,
),
title: Text(
'Lapor',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(
'Lapor kendala & pelanggaran',
style: TextStyle(color: Colors.black87),
),
),
),
),
sizedBoxH10,
Card(
elevation: 2.0,
child: InkWell(
onTap: () {
Get.to(() => RegulationScreen());
},
child: ListTile(
leading: Icon(
Icons.room_preferences,
color: Colors.lime[800],
size: 32.0,
),
title: const Text(
'Rujukan',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: const Text(
'Daftar aturan yang menjadi rujukan SiAP Balaesang',
style: TextStyle(color: Colors.black87),
),
),
),
),
sizedBoxH30,
const Text(
'Akun',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 18.0,
color: Colors.blueAccent),
),
dividerT1,
Card(
elevation: 2.0,
child: InkWell(
onTap: () {
Get.to(() => ChangePasswordScreen());
},
child: const ListTile(
leading: Icon(
Icons.lock_outline,
color: Colors.blueAccent,
size: 32.0,
),
title: Text(
'Password',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: Text(
'Ubah password akun',
style: TextStyle(color: Colors.black87),
),
),
),
),
sizedBoxH10,
Card(
elevation: 2.0,
child: InkWell(
onTap: () {
logout();
},
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: ListTile(
leading: Icon(
Icons.exit_to_app_rounded,
color: Colors.red[800],
size: 32.0,
),
title: const Text(
'Keluar Dari Aplikasi',
style: TextStyle(fontWeight: FontWeight.bold),
),
subtitle: const Text(
'Keluar dari aplikasi dan menghapus sesi saat ini. Gunakan ini jika aplikasi terasa berat atau anda ingin mengganti akun.',
style: TextStyle(color: Colors.black87),
),
),
),
),
),
],
),
),
),
);
}
}
================================================
FILE: lib/screen/bottom_nav_screen.dart
================================================
import 'package:flutter/material.dart';
import 'package:spo_balaesang/screen/application_screen.dart';
import 'package:spo_balaesang/screen/home_screen.dart';
class BottomNavScreen extends StatefulWidget {
@override
_BottomNavScreenState createState() => _BottomNavScreenState();
}
class _BottomNavScreenState extends State<BottomNavScreen> {
final List<Widget> _screens = [HomeScreen(), ApplicationScreen()];
int _currentIndex = 0;
final Map<String, dynamic> _bottomNavItems = {
'Beranda': Icons.home_filled,
'Aplikasi': Icons.apps_rounded,
};
@override
Widget build(BuildContext context) {
return Scaffold(
body: IndexedStack(
index: _currentIndex,
children: _screens,
),
bottomNavigationBar: BottomNavigationBar(
currentIndex: _currentIndex,
onTap: (index) => setState(() => _currentIndex = index),
type: BottomNavigationBarType.fixed,
backgroundColor: Colors.white,
showUnselectedLabels: true,
selectedItemColor: Colors.blueAccent,
selectedLabelStyle: const TextStyle(
color: Colors.blueAccent, fontWeight: FontWeight.bold),
unselectedLabelStyle: const TextStyle(
color: Colors.grey,
fontWeight: FontWeight.normal,
),
unselectedItemColor: Colors.grey,
items: _bottomNavItems
.map((key, value) => MapEntry(
key,
BottomNavigationBarItem(
label: key,
icon: Icon(value as IconData),
),
))
.values
.toList(),
));
}
}
================================================
FILE: lib/screen/change_absent_permission_photo_screen.dart
================================================
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart';
import 'package:progress_dialog/progress_dialog.dart';
import 'package:provider/provider.dart';
import 'package:spo_balaesang/models/absent_permission.dart';
import 'package:spo_balaesang/repositories/data_repository.dart';
import 'package:spo_balaesang/screen/bottom_nav_screen.dart';
import 'package:spo_balaesang/screen/image_detail_screen.dart';
import 'package:spo_balaesang/utils/app_const.dart';
import 'package:spo_balaesang/utils/file_util.dart';
import 'package:spo_balaesang/utils/view_util.dart';
import 'package:spo_balaesang/widgets/employee_proposal_info_widget.dart';
import 'package:spo_balaesang/widgets/image_placeholder_widget.dart';
class ChangePermissionPhotoScreen extends StatefulWidget {
const ChangePermissionPhotoScreen({this.permission});
final AbsentPermission permission;
@override
_ChangePermissionPhotoScreenState createState() =>
_ChangePermissionPhotoScreenState();
}
class _ChangePermissionPhotoScreenState
extends State<ChangePermissionPhotoScreen> {
String _base64Image;
String _fileName;
File _tmpFile;
AbsentPermission _permission;
Future<void> _openCamera() async {
final picture = await ImagePicker().getImage(source: ImageSource.camera);
final file = await compressAndGetFile(File(picture.path),
'/storage/emulated/0/Android/data/com.banuacoders.siap/files/Pictures/images.jpg');
setState(() {
_tmpFile = file;
_base64Image = base64Encode(_tmpFile.readAsBytesSync());
_fileName = _tmpFile.path.split('/').last;
});
await file.delete(recursive: true);
}
Future<void> _uploadData(AbsentPermission permission) async {
final ProgressDialog pd = ProgressDialog(context, isDismissible: false);
try {
pd.show();
final dataRepo = Provider.of<DataRepository>(context, listen: false);
final Map<String, dynamic> data = {
'photo': _base64Image,
'file_name': _fileName,
'permission_id': permission.id
};
final Map<String, dynamic> _res =
await dataRepo.changePermissionPhoto(data);
if (_res['success'] as bool) {
pd.hide();
showAlertDialog('success', "Sukses", _res['message'].toString(),
dismissible: false);
Timer(
const Duration(seconds: 5), () => Get.off(() => BottomNavScreen()));
} else {
if (pd.isShowing()) pd.hide();
showErrorDialog(_res);
}
} catch (e) {
showErrorDialog({
'message': 'Kesalahan',
'errors': {
'exception': ['Terjadi kesalahan!']
}
});
pd.hide();
}
}
Widget _showImage() {
if (_base64Image == null) {
return InkWell(
onTap: () {
Get.to(() => ImageDetailScreen(
imageUrl: _permission.photo,
tag: _permission.id.toString(),
));
},
child: Hero(
tag: _permission.id.toString(),
child: ClipRRect(
borderRadius: BorderRadius.circular(10.0),
child: CachedNetworkImage(
placeholder: (_, __) => const ImagePlaceholderWidget(
label: 'Memuat Foto',
child: SpinKitFadingCircle(
size: 25.0,
color: Colors.blueAccent,
),
),
imageUrl: _permission.photo,
fit: BoxFit.cover,
errorWidget: (_, __, ___) => const ImagePlaceholderWidget(
label: 'Gagal memuat foto!',
child: Icon(
Icons.image_not_supported_rounded,
color: Colors.grey,
),
),
width: Get.width,
height: 250.0,
),
),
),
);
}
final Uint8List bytes = base64Decode(_base64Image);
return InkWell(
onTap: () {
Get.to(() => ImageDetailScreen(
bytes: bytes,
tag: 'image',
));
},
child: Hero(
tag: 'image',
child: ClipRRect(
borderRadius: BorderRadius.circular(10.0),
child: Image.memory(
bytes,
width: Get.width,
height: 250,
fit: BoxFit.cover,
),
),
),
);
}
@override
void initState() {
_permission = widget.permission;
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
backgroundColor: Colors.blueAccent,
title: const Text('Perbarui Lampiran'),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Text(
'Pastikan gembar yang akan dikirim adalah salah satu dari memo absen, SPPD, atau surat keterangan dokter. ' +
'Pastikan juga surat sudah ditandatangani oleh pihak yang berwenang disertai dengan cap resmi.'),
sizedBoxH20,
EmployeeProposalInfoWidget(
title: _permission.title,
startDate: _permission.startDate,
dueDate: _permission.dueDate,
label: 'Izin',
),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Foto Surat Izin'),
SizedBox(width: 5.0),
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
const Text(
'Lampirkan foto surat izin atau surat lainnya seperti surat keterangan dokter, dsb.',
style: TextStyle(color: Colors.grey),
),
const Text(
'*tekan untuk memperbesar',
style: TextStyle(
fontSize: 12.0,
color: Colors.black87,
fontStyle: FontStyle.italic),
),
sizedBoxH20,
_showImage(),
sizedBoxH20,
SizedBox(
width: Get.width,
height: 40.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6)),
primary: Colors.blueAccent,
onPrimary: Colors.white,
),
onPressed: _openCamera,
child: const Text('Ubah Foto'),
),
),
sizedBoxH20,
SizedBox(
width: Get.width,
height: 40,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6)),
primary: Colors.green,
onPrimary: Colors.white,
),
onPressed: () {
_uploadData(_permission);
},
child: const Text('Kirim'),
),
),
sizedBoxH20,
],
),
),
),
);
}
}
================================================
FILE: lib/screen/change_outstation_photo_screen.dart
================================================
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart';
import 'package:progress_dialog/progress_dialog.dart';
import 'package:provider/provider.dart';
import 'package:spo_balaesang/models/outstation.dart';
import 'package:spo_balaesang/repositories/data_repository.dart';
import 'package:spo_balaesang/screen/bottom_nav_screen.dart';
import 'package:spo_balaesang/screen/image_detail_screen.dart';
import 'package:spo_balaesang/utils/app_const.dart';
import 'package:spo_balaesang/utils/file_util.dart';
import 'package:spo_balaesang/utils/view_util.dart';
import 'package:spo_balaesang/widgets/employee_proposal_info_widget.dart';
import 'package:spo_balaesang/widgets/image_placeholder_widget.dart';
class ChangeOutstationPhotoScreen extends StatefulWidget {
const ChangeOutstationPhotoScreen({this.outstation});
final Outstation outstation;
@override
_ChangeOutstationPhotoScreenState createState() =>
_ChangeOutstationPhotoScreenState();
}
class _ChangeOutstationPhotoScreenState
extends State<ChangeOutstationPhotoScreen> {
String _base64Image;
String _fileName;
File _tmpFile;
Outstation _outstation;
Future<void> _openCamera() async {
final picture = await ImagePicker().getImage(source: ImageSource.camera);
final file = await compressAndGetFile(File(picture.path),
'/storage/emulated/0/Android/data/com.banuacoders.siap/files/Pictures/images.jpg');
setState(() {
_tmpFile = file;
_base64Image = base64Encode(_tmpFile.readAsBytesSync());
_fileName = _tmpFile.path.split('/').last;
});
await file.delete(recursive: true);
}
Future<void> _uploadData(Outstation outstation) async {
final ProgressDialog pd = ProgressDialog(context, isDismissible: false);
try {
pd.show();
final dataRepo = Provider.of<DataRepository>(context, listen: false);
final Map<String, dynamic> data = {
'photo': _base64Image,
'file_name': _fileName,
'outstation_id': outstation.id
};
final Map<String, dynamic> _res =
await dataRepo.changeOutstationPhoto(data);
if (_res['success'] as bool) {
pd.hide();
showAlertDialog('success', "Sukses", _res['message'].toString(),
dismissible: false);
Timer(
const Duration(seconds: 5), () => Get.off(() => BottomNavScreen()));
} else {
if (pd.isShowing()) pd.hide();
showErrorDialog(_res);
}
} catch (e) {
showErrorDialog({
'message': 'Kesalahan',
'errors': {
'exception': ['Terjadi kesalahan!']
}
});
pd.hide();
}
}
Widget _showImage() {
if (_base64Image == null) {
return InkWell(
onTap: () {
Get.to(() => ImageDetailScreen(
imageUrl: _outstation.photo,
tag: _outstation.id.toString(),
));
},
child: Hero(
tag: _outstation.id.toString(),
child: ClipRRect(
borderRadius: BorderRadius.circular(10.0),
child: CachedNetworkImage(
placeholder: (_, __) => const ImagePlaceholderWidget(
label: 'Memuat Foto',
child: SpinKitFadingCircle(
size: 25.0,
color: Colors.blueAccent,
),
),
imageUrl: _outstation.photo,
fit: BoxFit.cover,
errorWidget: (_, __, ___) => const ImagePlaceholderWidget(
label: 'Gagal memuat foto!',
child: Icon(
Icons.image_not_supported_rounded,
color: Colors.grey,
),
),
width: Get.width,
height: 250.0,
),
),
),
);
}
final Uint8List bytes = base64Decode(_base64Image);
return InkWell(
onTap: () {
Get.to(() => ImageDetailScreen(
bytes: bytes,
tag: 'image',
));
},
child: Hero(
tag: 'image',
child: ClipRRect(
borderRadius: BorderRadius.circular(10.0),
child: Image.memory(
bytes,
width: Get.width,
height: 250,
fit: BoxFit.cover,
),
),
),
);
}
@override
void initState() {
_outstation = widget.outstation;
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
backgroundColor: Colors.blueAccent,
title: const Text('Perbarui Lampiran'),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Text(
'Pastikan gembar yang akan dikirim adalah salah satu dari memo absen, SPPD, atau surat keterangan dokter. ' +
'Pastikan juga surat sudah ditandatangani oleh pihak yang berwenang disertai dengan cap resmi.'),
sizedBoxH20,
EmployeeProposalInfoWidget(
title: _outstation.title,
startDate: _outstation.startDate,
dueDate: _outstation.dueDate,
label: 'Dinas Luar',
),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Foto Surat Tugas'),
SizedBox(width: 5.0),
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
const Text(
'Lampirkan foto SPPD atau surat lainnya seperti memo absen, dsb.',
style: TextStyle(color: Colors.grey),
),
const Text(
'*tekan untuk memperbesar',
style: TextStyle(
fontSize: 12.0,
color: Colors.black87,
fontStyle: FontStyle.italic),
),
sizedBoxH20,
_showImage(),
sizedBoxH20,
SizedBox(
width: Get.width,
height: 40.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6)),
primary: Colors.blueAccent,
onPrimary: Colors.white,
),
onPressed: _openCamera,
child: const Text('Ubah Foto'),
),
),
sizedBoxH20,
SizedBox(
width: Get.width,
height: 40.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6)),
primary: Colors.green,
onPrimary: Colors.white,
),
onPressed: () {
_uploadData(_outstation);
},
child: const Text('Kirim'),
),
),
sizedBoxH20,
],
),
),
),
);
}
}
================================================
FILE: lib/screen/change_paid_leave_photo_screen.dart
================================================
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart';
import 'package:progress_dialog/progress_dialog.dart';
import 'package:provider/provider.dart';
import 'package:spo_balaesang/models/paid_leave.dart';
import 'package:spo_balaesang/repositories/data_repository.dart';
import 'package:spo_balaesang/screen/bottom_nav_screen.dart';
import 'package:spo_balaesang/screen/image_detail_screen.dart';
import 'package:spo_balaesang/utils/app_const.dart';
import 'package:spo_balaesang/utils/file_util.dart';
import 'package:spo_balaesang/utils/view_util.dart';
import 'package:spo_balaesang/widgets/employee_proposal_info_widget.dart';
import 'package:spo_balaesang/widgets/image_placeholder_widget.dart';
class ChangePaidLeavePhotoScreen extends StatefulWidget {
const ChangePaidLeavePhotoScreen({this.paidLeave});
final PaidLeave paidLeave;
@override
_ChangePaidLeavePhotoScreenState createState() =>
_ChangePaidLeavePhotoScreenState();
}
class _ChangePaidLeavePhotoScreenState
extends State<ChangePaidLeavePhotoScreen> {
String _base64Image;
String _fileName;
File _tmpFile;
PaidLeave _paidLeave;
Future<void> _openCamera() async {
final picture = await ImagePicker().getImage(source: ImageSource.camera);
final file = await compressAndGetFile(File(picture.path),
'/storage/emulated/0/Android/data/com.banuacoders.siap/files/Pictures/images.jpg');
setState(() {
_tmpFile = file;
_base64Image = base64Encode(_tmpFile.readAsBytesSync());
_fileName = _tmpFile.path.split('/').last;
});
await file.delete(recursive: true);
}
Future<void> _uploadData(PaidLeave paidLeave) async {
final ProgressDialog pd = ProgressDialog(context, isDismissible: false);
try {
pd.show();
final dataRepo = Provider.of<DataRepository>(context, listen: false);
final Map<String, dynamic> data = {
'photo': _base64Image,
'file_name': _fileName,
'paid_leave_id': paidLeave.id
};
final Map<String, dynamic> _res =
await dataRepo.changePaidLeavePhoto(data);
if (_res['success'] as bool) {
pd.hide();
showAlertDialog('success', "Sukses", _res['message'].toString(),
dismissible: false);
Timer(
const Duration(seconds: 5), () => Get.off(() => BottomNavScreen()));
} else {
if (pd.isShowing()) pd.hide();
showErrorDialog(_res);
}
} catch (e) {
showErrorDialog({
'message': 'Kesalahan',
'errors': {
'exception': ['Terjadi kesalahan!']
}
});
pd.hide();
}
}
Widget _showImage() {
if (_base64Image == null) {
return InkWell(
onTap: () {
Get.to(() => ImageDetailScreen(
imageUrl: _paidLeave.photo,
tag: _paidLeave.id.toString(),
));
},
child: Hero(
tag: _paidLeave.id.toString(),
child: ClipRRect(
borderRadius: BorderRadius.circular(10.0),
child: CachedNetworkImage(
placeholder: (_, __) => const ImagePlaceholderWidget(
label: 'Memuat Foto',
child: SpinKitFadingCircle(
size: 25.0,
color: Colors.blueAccent,
),
),
imageUrl: _paidLeave.photo,
fit: BoxFit.cover,
errorWidget: (_, __, ___) => const ImagePlaceholderWidget(
label: 'Gagal memuat foto!',
child: Icon(
Icons.image_not_supported_rounded,
color: Colors.grey,
),
),
width: Get.width,
height: 250.0,
),
),
),
);
}
final Uint8List bytes = base64Decode(_base64Image);
return InkWell(
onTap: () {
Get.to(() => ImageDetailScreen(
bytes: bytes,
tag: 'image',
));
},
child: Hero(
tag: 'image',
child: ClipRRect(
borderRadius: BorderRadius.circular(10.0),
child: Image.memory(
bytes,
width: Get.width,
height: 250,
fit: BoxFit.cover,
),
),
),
);
}
@override
void initState() {
_paidLeave = widget.paidLeave;
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
backgroundColor: Colors.blueAccent,
title: const Text('Perbarui Lampiran'),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Text(
'Pastikan gembar yang akan dikirim adalah surat pengajuan cuti atau surat keterangan dokter ' +
'yang sudah ditandatangani oleh pihak berwenang disertai dengan cap resmi.'),
sizedBoxH20,
EmployeeProposalInfoWidget(
title: _paidLeave.title,
startDate: _paidLeave.startDate,
dueDate: _paidLeave.dueDate,
label: _paidLeave.category,
),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Foto Surat Pengajuan'),
SizedBox(width: 5.0),
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
const Text(
'Lampirkan foto surat pengajuan atau surat lainnya seperti surat keterangan dokter, dsb.',
style: TextStyle(color: Colors.grey),
),
const Text(
'*tekan untuk memperbesar',
style: TextStyle(
fontSize: 12.0,
color: Colors.black87,
fontStyle: FontStyle.italic),
),
sizedBoxH20,
_showImage(),
sizedBoxH20,
SizedBox(
width: Get.width,
height: 40.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6)),
primary: Colors.blueAccent,
onPrimary: Colors.white,
),
onPressed: _openCamera,
child: const Text('Ubah Foto'),
),
),
sizedBoxH20,
SizedBox(
width: Get.width,
height: 40.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6)),
primary: Colors.green,
onPrimary: Colors.white,
),
onPressed: () {
_uploadData(_paidLeave);
},
child: const Text('Kirim'),
),
),
sizedBoxH20,
],
),
),
),
);
}
}
================================================
FILE: lib/screen/change_pass_screen.dart
================================================
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:http/http.dart' as http;
import 'package:progress_dialog/progress_dialog.dart';
import 'package:provider/provider.dart';
import 'package:spo_balaesang/repositories/data_repository.dart';
import 'package:spo_balaesang/screen/bottom_nav_screen.dart';
import 'package:spo_balaesang/utils/view_util.dart';
class ChangePasswordScreen extends StatefulWidget {
@override
_ChangePasswordScreenState createState() => _ChangePasswordScreenState();
}
class _ChangePasswordScreenState extends State<ChangePasswordScreen> {
final TextEditingController _oldPassCtrl = TextEditingController();
final TextEditingController _newPassCtrl = TextEditingController();
final TextEditingController _newPass2Ctrl = TextEditingController();
final GlobalKey<FormState> _formKey = GlobalKey();
bool isLoading = false;
bool isOldPassVisible = false;
bool isNewPassVisible = false;
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
backgroundColor: Colors.blueAccent,
title: const Text('Ubah Password'),
),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Stack(
children: <Widget>[
SizedBox(
height: Get.height,
child: Form(
key: _formKey,
child: ListView(
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Text('Password Lama',
style: TextStyle(fontSize: 12.0)),
TextFormField(
controller: _oldPassCtrl,
validator: (String value) {
return value.isEmpty
? 'Password lama tidak boleh kosong!'
: null;
},
obscureText: !isNewPassVisible,
decoration: InputDecoration(
suffixIcon: IconButton(
icon: Icon(isNewPassVisible
? Icons.visibility_off
: Icons.visibility),
onPressed: () {
setState(() {
isNewPassVisible = !isNewPassVisible;
});
}),
hintText: 'Password Lama'),
),
],
),
const SizedBox(height: 20.0),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Text('Password Baru',
style: TextStyle(fontSize: 12.0)),
TextFormField(
controller: _newPassCtrl,
validator: (String value) {
if (value.isEmpty) {
return 'Password baru tidak boleh kosong!';
}
if (value == _oldPassCtrl.text) {
return 'Password baru tidak boleh sama dengan Password Lama!';
}
return null;
},
obscureText: !isOldPassVisible,
decoration: InputDecoration(
suffixIcon: IconButton(
icon: Icon(isOldPassVisible
? Icons.visibility_off
: Icons.visibility),
onPressed: () {
setState(() {
isOldPassVisible = !isOldPassVisible;
});
}),
hintText: 'Password Baru'),
),
],
),
const SizedBox(height: 20.0),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Text('Ulangi Password Baru',
style: TextStyle(fontSize: 12.0)),
TextFormField(
controller: _newPass2Ctrl,
validator: (String value) {
if (value.isEmpty) {
return 'Konfirmasi Password baru tidak boleh kosong!';
}
if (value != _newPassCtrl.text) {
return 'Kolom ini harus sama dengan password baru!';
}
return null;
},
obscureText: true,
decoration: const InputDecoration(
hintText: 'Konfirmasi Password Baru'),
),
],
)
],
)),
),
Positioned(
left: 0,
right: 0,
bottom: MediaQuery.of(context).viewInsets.bottom,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
onPrimary: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0)),
primary: Colors.blueAccent,
),
onPressed: () async {
final ProgressDialog pd =
ProgressDialog(context, isDismissible: false);
pd.show();
try {
final dataRepo =
Provider.of<DataRepository>(context, listen: false);
final Map<String, dynamic> data = {
'old_pass': _oldPassCtrl.value.text,
'new_pass': _newPassCtrl.value.text,
'new_pass_conf': _newPass2Ctrl.value.text
};
final http.Response response =
await dataRepo.changePass(data);
final Map<String, dynamic> _res =
jsonDecode(response.body) as Map<String, dynamic>;
if (response.statusCode == 200) {
pd.hide();
showAlertDialog(
'success', "Sukses", _res['message'].toString(),
dismissible: false);
Timer(const Duration(seconds: 1),
() => Get.off(() => BottomNavScreen()));
} else {
pd.hide();
showErrorDialog(_res);
}
} catch (e) {
pd.hide();
showErrorDialog({
'message': 'Kesalahan',
'errors': {
'exception': ['Terjadi kesalahan!']
}
});
}
},
child: isLoading
? const SizedBox(
height: 30.0,
width: 30.0,
child: CircularProgressIndicator(
valueColor:
AlwaysStoppedAnimation<Color>(Colors.white),
),
)
: const Text('SIMPAN'),
),
)
],
),
),
);
}
}
================================================
FILE: lib/screen/create_notification_screen.dart
================================================
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:progress_dialog/progress_dialog.dart';
import 'package:provider/provider.dart';
import 'package:spo_balaesang/repositories/data_repository.dart';
import 'package:spo_balaesang/screen/bottom_nav_screen.dart';
import 'package:spo_balaesang/utils/app_const.dart';
import 'package:spo_balaesang/utils/view_util.dart';
class CreateNotificationScreen extends StatefulWidget {
@override
_CreateNotificationScreenState createState() =>
_CreateNotificationScreenState();
}
class _CreateNotificationScreenState extends State<CreateNotificationScreen> {
final TextEditingController _titleController = TextEditingController();
final TextEditingController _descriptionController = TextEditingController();
Future<void> _sendNotification() async {
final ProgressDialog pd = ProgressDialog(context, isDismissible: false);
try {
pd.show();
final dataRepo = Provider.of<DataRepository>(context, listen: false);
final Map<String, dynamic> data = {
'title': _titleController.value.text,
'content': _descriptionController.value.text,
};
final Map<String, dynamic> _res = await dataRepo.sendNotification(data);
if (_res['success'] as bool) {
pd.hide();
showAlertDialog('success', "Sukses", _res['message'].toString(),
dismissible: false);
Timer(
const Duration(seconds: 5), () => Get.off(() => BottomNavScreen()));
} else {
if (pd.isShowing()) pd.hide();
showErrorDialog(_res);
}
} catch (e) {
showErrorDialog({
'message': 'Kesalahan',
'errors': {
'exception': ['Terjadi kesalahan!']
}
});
pd.hide();
}
}
@override
void dispose() {
_titleController.dispose();
_descriptionController.dispose();
super.dispose();
}
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Colors.blueAccent,
title: const Text('Buat Pemberitahuan'),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: const <Widget>[
Text('Judul Pemberitahuan'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
TextFormField(
keyboardType: TextInputType.text,
controller: _titleController,
decoration: const InputDecoration(
alignLabelWithHint: true,
hintText: 'Judul',
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.blueAccent)),
labelStyle: TextStyle(color: Colors.grey)),
),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Isi Pemberitahuan'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
TextFormField(
keyboardType: TextInputType.multiline,
minLines: 1,
maxLines: 5,
controller: _descriptionController,
decoration: const InputDecoration(
alignLabelWithHint: true,
hintText: 'Deskripsi',
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.blueAccent)),
labelStyle: TextStyle(color: Colors.grey)),
),
sizedBoxH20,
SizedBox(
width: Get.width,
height: 40.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6)),
primary: Colors.blueAccent,
onPrimary: Colors.white,
),
onPressed: _sendNotification,
child: const Text('Kirim'),
),
),
sizedBoxH20,
],
),
),
),
);
}
}
================================================
FILE: lib/screen/create_outstation_screen.dart
================================================
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart';
import 'package:intl/intl.dart';
import 'package:progress_dialog/progress_dialog.dart';
import 'package:provider/provider.dart';
import 'package:spo_balaesang/repositories/data_repository.dart';
import 'package:spo_balaesang/screen/bottom_nav_screen.dart';
import 'package:spo_balaesang/screen/image_detail_screen.dart';
import 'package:spo_balaesang/utils/app_const.dart';
import 'package:spo_balaesang/utils/file_util.dart';
import 'package:spo_balaesang/utils/view_util.dart';
import 'package:spo_balaesang/widgets/image_placeholder_widget.dart';
import 'package:table_calendar/table_calendar.dart';
class CreateOutstationScreen extends StatefulWidget {
@override
_CreateOutstationScreenState createState() => _CreateOutstationScreenState();
}
class _CreateOutstationScreenState extends State<CreateOutstationScreen> {
String _base64Image;
String _fileName;
File _tmpFile;
DateTime _dueDate = DateTime.now();
DateTime _startDate = DateTime.now();
bool _isDateChange = false;
final TextEditingController _titleController = TextEditingController();
final TextEditingController _descriptionController = TextEditingController();
Future<void> _openCamera() async {
final picture = await ImagePicker().getImage(source: ImageSource.camera);
final file = await compressAndGetFile(File(picture.path),
'/storage/emulated/0/Android/data/com.banuacoders.siap/files/Pictures/images.jpg');
setState(() {
_tmpFile = file;
_base64Image = base64Encode(_tmpFile.readAsBytesSync());
_fileName = _tmpFile.path.split('/').last;
});
await file.delete(recursive: true);
}
Future<void> _uploadData() async {
if (!_isDateChange) {
showAlertDialog('failed', 'Pelanggaran', 'Pilih tanggal terlebih dahulu!',
dismissible: true);
} else {
final ProgressDialog pd = ProgressDialog(context, isDismissible: false);
try {
pd.show();
final dataRepo = Provider.of<DataRepository>(context, listen: false);
final Map<String, dynamic> data = {
'title': _titleController.value.text,
'description': _descriptionController.value.text,
'photo': _base64Image,
'due_date': _dueDate.toIso8601String(),
'start_date': _startDate.toIso8601String(),
'file_name': _fileName
};
final Map<String, dynamic> _res = await dataRepo.outstation(data);
if (_res['success'] as bool) {
pd.hide();
showAlertDialog('success', "Sukses", _res['message'].toString(),
dismissible: false);
Timer(const Duration(seconds: 5),
() => Get.off(() => BottomNavScreen()));
} else {
if (pd.isShowing()) pd.hide();
showErrorDialog(_res);
}
} catch (e) {
showErrorDialog({
'message': 'Kesalahan',
'errors': {
'exception': ['Terjadi kesalahan!']
}
});
pd.hide();
}
}
}
Widget _showImage() {
if (_base64Image == null) {
return const ImagePlaceholderWidget(
label: 'Ambil Foto',
child: Icon(
Icons.camera_alt_rounded,
color: Colors.grey,
),
);
}
final Uint8List bytes = base64Decode(_base64Image);
return InkWell(
onTap: () {
Get.to(() => ImageDetailScreen(
bytes: bytes,
tag: 'image',
));
},
child: Hero(
tag: 'image',
child: ClipRRect(
borderRadius: BorderRadius.circular(10.0),
child: Image.memory(
bytes,
width: Get.width,
height: 250,
fit: BoxFit.cover,
),
),
),
);
}
Future<void> _selectDueDate() async {
Get.defaultDialog(
title: 'Pilih Tanggal Selesai',
content: SizedBox(
width: Get.width * 0.9,
height: Get.height * 0.4,
child: TableCalendar(
availableCalendarFormats: const <CalendarFormat, String>{
CalendarFormat.month: '1 bulan',
},
calendarStyle: const CalendarStyle(
weekendTextStyle: TextStyle(color: Colors.red),
),
calendarBuilders: const CalendarBuilders(
dowBuilder: dowBuilder,
),
calendarFormat: CalendarFormat.month,
availableGestures: AvailableGestures.horizontalSwipe,
shouldFillViewport: true,
headerStyle: const HeaderStyle(titleCentered: true),
startingDayOfWeek: StartingDayOfWeek.monday,
firstDay: DateTime.now().subtract(const Duration(days: 7)),
focusedDay: _dueDate,
selectedDayPredicate: (day) {
return isSameDay(_dueDate, day);
},
lastDay: DateTime(DateTime.now().year + 5),
locale: 'in_ID',
onDaySelected: (day, focusedDay) {
Get.back();
setState(() {
if (!_isDateChange) {
_isDateChange = true;
}
_dueDate = day;
if (_dueDate.isBefore(_startDate)) {
_startDate = day;
}
});
},
),
));
}
Future<void> _selectStartDate() async {
Get.defaultDialog(
title: 'Pilih Tanggal Mulai',
content: SizedBox(
width: Get.width * 0.9,
height: Get.height * 0.4,
child: TableCalendar(
availableCalendarFormats: const <CalendarFormat, String>{
CalendarFormat.month: '1 bulan',
},
calendarStyle: const CalendarStyle(
weekendTextStyle: TextStyle(color: Colors.red),
),
calendarBuilders: const CalendarBuilders(
dowBuilder: dowBuilder,
),
shouldFillViewport: true,
calendarFormat: CalendarFormat.month,
availableGestures: AvailableGestures.horizontalSwipe,
headerStyle: const HeaderStyle(titleCentered: true),
startingDayOfWeek: StartingDayOfWeek.monday,
firstDay: DateTime.now().subtract(const Duration(days: 7)),
focusedDay: _startDate,
lastDay: DateTime(DateTime.now().year + 5),
locale: 'in_ID',
selectedDayPredicate: (day) {
return isSameDay(_startDate, day);
},
onDaySelected: (day, focusedDay) {
Get.back();
setState(() {
if (!_isDateChange) {
_isDateChange = true;
}
_startDate = day;
if (_startDate.isAfter(_dueDate)) {
_dueDate = day;
}
});
},
),
));
}
@override
void dispose() {
_titleController.dispose();
_descriptionController.dispose();
super.dispose();
}
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
backgroundColor: Colors.blueAccent,
title: const Text('Ajukan Dinas Luar'),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Text(
'Pastikan data yang dikirim sudah benar. Anda tidak dapat mengubah dokumen setelah dikirim. Jika terjadi kesalahan, hubungi administrator sistem.'),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Judul Surat'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
TextFormField(
keyboardType: TextInputType.text,
controller: _titleController,
decoration: const InputDecoration(
alignLabelWithHint: true,
hintText: 'Judul',
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.blueAccent)),
labelStyle: TextStyle(color: Colors.grey)),
),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Deskripsi'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
const Text(
'Jelaskan secara singkat tentang Dinas Luar yang diajukan!',
style: TextStyle(color: Colors.grey),
),
TextFormField(
keyboardType: TextInputType.multiline,
minLines: 1,
maxLines: 5,
controller: _descriptionController,
decoration: const InputDecoration(
alignLabelWithHint: true,
hintText: 'Deskripsi',
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.blueAccent)),
labelStyle: TextStyle(color: Colors.grey)),
),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Tanggal Mulai'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
const Text(
'Pilih kapan tugas Dinas Luar mulai!',
style: TextStyle(color: Colors.grey),
),
Row(
children: <Widget>[
Expanded(
child: Text(
DateFormat('EEEE, d MMMM y').format(_startDate),
style: const TextStyle(fontWeight: FontWeight.w600),
),
),
IconButton(
icon: const Icon(
Icons.calendar_today_rounded,
color: Colors.blueAccent,
),
onPressed: () {
_selectStartDate();
})
],
),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Tanggal Selesai'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
const Text(
'Pilih sampai kapan Dinas Luar yang diajukan berlaku!',
style: TextStyle(color: Colors.grey),
),
Row(
children: <Widget>[
Expanded(
child: Text(
DateFormat('EEEE, d MMMM y').format(_dueDate),
style: const TextStyle(fontWeight: FontWeight.w600),
),
),
IconButton(
icon: const Icon(
Icons.calendar_today_rounded,
color: Colors.blueAccent,
),
onPressed: () {
_selectDueDate();
})
],
),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Foto Surat Tugas'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
const Text(
'Lampirkan foto surat tugas atau Surat Perintah Perjalanan Dinas (SPPD).',
style: TextStyle(color: Colors.grey),
),
const Text(
'*tekan untuk memperbesar',
style: TextStyle(
fontSize: 12.0,
color: Colors.black87,
fontStyle: FontStyle.italic),
),
sizedBoxH20,
_showImage(),
sizedBoxH20,
SizedBox(
width: Get.width,
height: 40.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6)),
primary: Colors.blueAccent,
onPrimary: Colors.white,
),
onPressed: _openCamera,
child:
Text(_base64Image == null ? 'Ambil Foto' : 'Ubah Foto'),
),
),
sizedBoxH20,
SizedBox(
width: Get.width,
height: 40.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6)),
primary: Colors.green,
onPrimary: Colors.white,
),
onPressed: _uploadData,
child: const Text('Kirim'),
),
),
sizedBoxH20,
],
),
),
),
);
}
}
================================================
FILE: lib/screen/create_paid_leave_screen.dart
================================================
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart';
import 'package:intl/intl.dart';
import 'package:progress_dialog/progress_dialog.dart';
import 'package:provider/provider.dart';
import 'package:spo_balaesang/repositories/data_repository.dart';
import 'package:spo_balaesang/screen/bottom_nav_screen.dart';
import 'package:spo_balaesang/screen/image_detail_screen.dart';
import 'package:spo_balaesang/utils/app_const.dart';
import 'package:spo_balaesang/utils/file_util.dart';
import 'package:spo_balaesang/utils/view_util.dart';
import 'package:spo_balaesang/widgets/image_placeholder_widget.dart';
import 'package:table_calendar/table_calendar.dart';
class CreatePaidLeaveScreen extends StatefulWidget {
@override
_CreatePaidLeaveScreenState createState() => _CreatePaidLeaveScreenState();
}
class _CreatePaidLeaveScreenState extends State<CreatePaidLeaveScreen> {
String _base64Image;
String _fileName;
File _tmpFile;
DateTime _startDate = DateTime.now();
DateTime _dueDate = DateTime.now();
final Map<String, dynamic> _categories = paidLeaveCategories;
int _category = 1;
bool _isDateChange = false;
final TextEditingController _titleController = TextEditingController();
final TextEditingController _descriptionController = TextEditingController();
Future<void> _openCamera() async {
final picture = await ImagePicker().getImage(source: ImageSource.camera);
final file = await compressAndGetFile(File(picture.path),
'/storage/emulated/0/Android/data/com.banuacoders.siap/files/Pictures/images.jpg');
setState(() {
_tmpFile = file;
_base64Image = base64Encode(_tmpFile.readAsBytesSync());
_fileName = _tmpFile.path.split('/').last;
});
await file.delete(recursive: true);
}
Widget _showImage() {
if (_base64Image == null) {
return const ImagePlaceholderWidget(
label: 'Ambil Foto',
child: Icon(
Icons.camera_alt_rounded,
color: Colors.grey,
),
);
}
final Uint8List bytes = base64Decode(_base64Image);
return InkWell(
onTap: () {
Get.to(() => ImageDetailScreen(
bytes: bytes,
tag: 'image',
));
},
child: Hero(
tag: 'image',
child: ClipRRect(
borderRadius: BorderRadius.circular(10.0),
child: Image.memory(
bytes,
width: Get.width,
height: 250,
fit: BoxFit.cover,
),
),
),
);
}
Future<void> _uploadData() async {
if (!_isDateChange) {
showAlertDialog('failed', 'Pelanggaran', 'Pilih tanggal terlebih dahulu!',
dismissible: true);
} else {
final ProgressDialog pd = ProgressDialog(context, isDismissible: false);
try {
pd.show();
final dataRepo = Provider.of<DataRepository>(context, listen: false);
final Map<String, dynamic> data = {
'category': _category,
'title': _titleController.value.text,
'description': _descriptionController.value.text,
'photo': _base64Image,
'due_date': _dueDate.toIso8601String(),
'start_date': _startDate.toIso8601String(),
'file_name': _fileName
};
final Map<String, dynamic> _res = await dataRepo.paidLeave(data);
if (_res['success'] as bool) {
pd.hide();
showAlertDialog('success', "Sukses", _res['message'].toString(),
dismissible: false);
Timer(const Duration(seconds: 5),
() => Get.off(() => BottomNavScreen()));
} else {
if (pd.isShowing()) pd.hide();
showErrorDialog(_res);
}
} catch (e) {
showErrorDialog({
'message': 'Kesalahan',
'errors': {
'exception': ['Terjadi kesalahan!']
}
});
pd.hide();
}
}
}
void _selectDueDate() {
Get.defaultDialog(
title: 'Pilih Tanggal Selesai',
content: SizedBox(
width: Get.width * 0.9,
height: Get.height * 0.4,
child: TableCalendar(
availableCalendarFormats: const <CalendarFormat, String>{
CalendarFormat.month: '1 bulan',
},
calendarStyle: const CalendarStyle(
weekendTextStyle: TextStyle(color: Colors.red),
),
calendarBuilders: const CalendarBuilders(
dowBuilder: dowBuilder,
),
shouldFillViewport: true,
calendarFormat: CalendarFormat.month,
availableGestures: AvailableGestures.horizontalSwipe,
headerStyle: const HeaderStyle(titleCentered: true),
startingDayOfWeek: StartingDayOfWeek.monday,
firstDay: DateTime.now().subtract(const Duration(days: 7)),
focusedDay: _dueDate,
lastDay: DateTime.now().add(const Duration(days: 180)),
locale: 'in_ID',
selectedDayPredicate: (day) {
return isSameDay(_dueDate, day);
},
onDaySelected: (day, focusedDay) {
Get.back();
setState(() {
if (!_isDateChange) {
_isDateChange = true;
}
_dueDate = day;
if (_dueDate.isBefore(_startDate)) {
_startDate = day;
}
});
},
),
));
}
void _selectStartDate() {
Get.defaultDialog(
title: 'Pilih Tanggal Mulai',
content: SizedBox(
width: Get.width * 0.9,
height: Get.height * 0.4,
child: TableCalendar(
availableCalendarFormats: const <CalendarFormat, String>{
CalendarFormat.month: '1 bulan',
},
calendarStyle: const CalendarStyle(
weekendTextStyle: TextStyle(color: Colors.red),
),
calendarBuilders: const CalendarBuilders(
dowBuilder: dowBuilder,
),
shouldFillViewport: true,
calendarFormat: CalendarFormat.month,
availableGestures: AvailableGestures.horizontalSwipe,
headerStyle: const HeaderStyle(titleCentered: true),
startingDayOfWeek: StartingDayOfWeek.monday,
firstDay: DateTime.now().subtract(const Duration(days: 7)),
focusedDay: _startDate,
lastDay: DateTime.now().add(const Duration(days: 180)),
locale: 'in_ID',
selectedDayPredicate: (day) {
return isSameDay(_startDate, day);
},
onDaySelected: (day, focusedDay) {
Get.back();
setState(() {
if (!_isDateChange) {
_isDateChange = true;
}
_startDate = day;
if (_startDate.isAfter(_dueDate)) {
_dueDate = day;
}
});
},
),
));
}
@override
void dispose() {
_titleController.dispose();
_descriptionController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
backgroundColor: Colors.blueAccent,
title: const Text('Ajukan Cuti'),
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(8),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
const Text(
'Pastikan data yang dikirim sudah benar. Anda tidak dapat mengubah dokumen setelah dikirim. Jika terjadi kesalahan, hubungi administrator sistem.'),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Subjek Cuti'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
const Text(
'Ringkasan dari kegiatan cuti anda.',
style: TextStyle(color: Colors.grey),
),
TextFormField(
keyboardType: TextInputType.text,
controller: _titleController,
decoration: const InputDecoration(
alignLabelWithHint: true,
hintText: 'Judul/Subjek',
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.blueAccent)),
labelStyle: TextStyle(color: Colors.grey)),
),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Jenis Cuti'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
DropdownButton(
isExpanded: true,
elevation: 10,
value: _category,
items: _categories.entries
.map((option) => DropdownMenuItem<dynamic>(
value: option.value,
child: Text(option.key),
))
.toList(),
onChanged: (value) {
setState(() {
_category = int.parse(value.toString());
});
}),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Deskripsi'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
const Text(
'Jelaskan secara singkat tentang cuti yang diajukan!',
style: TextStyle(color: Colors.grey),
),
TextFormField(
keyboardType: TextInputType.multiline,
minLines: 1,
maxLines: 5,
controller: _descriptionController,
decoration: const InputDecoration(
alignLabelWithHint: true,
hintText: 'Deskripsi',
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.blueAccent)),
labelStyle: TextStyle(color: Colors.grey)),
),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Tanggal Mulai'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
const Text(
'Pilih kapan anda mulai cuti!',
style: TextStyle(color: Colors.grey),
),
Row(
children: <Widget>[
Expanded(
child: Text(
DateFormat('EEEE, d MMMM y').format(_startDate),
style: const TextStyle(
fontWeight: FontWeight.w600,
),
),
),
IconButton(
icon: const Icon(
Icons.calendar_today_rounded,
color: Colors.blueAccent,
),
onPressed: _selectStartDate)
],
),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Tanggal Selesai'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
const Text(
'Pilih sampai kapan anda cuti!',
style: TextStyle(color: Colors.grey),
),
Row(
children: <Widget>[
Expanded(
child: Text(
DateFormat('EEEE, d MMMM y').format(_dueDate),
style: const TextStyle(fontWeight: FontWeight.w600),
),
),
IconButton(
icon: const Icon(
Icons.calendar_today_rounded,
color: Colors.blueAccent,
),
onPressed: _selectDueDate)
],
),
sizedBoxH20,
Row(
children: const <Widget>[
Text('Foto Surat Pengajuan'),
sizedBoxW5,
Text(
'*',
style: TextStyle(color: Colors.red),
),
],
),
const Text(
'Lampirkan foto surat pengajuan cuti seperti surat keterangan sakit dsb.',
style: TextStyle(color: Colors.grey),
),
const Text(
'*tekan untuk memperbesar',
style: TextStyle(
fontSize: 12.0,
color: Colors.black87,
fontStyle: FontStyle.italic),
),
sizedBoxH20,
_showImage(),
sizedBoxH20,
SizedBox(
width: Get.width,
height: 40.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6)),
primary: Colors.blueAccent,
onPrimary: Colors.white,
),
onPressed: _openCamera,
child:
Text(_base64Image == null ? 'Ambil Foto' : 'Ubah Foto'),
),
),
sizedBoxH20,
SizedBox(
width: Get.width,
height: 40.0,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(6)),
primary: Colors.green,
onPrimary: Colors.white,
gitextract_q81wuefv/
├── .gitignore
├── .metadata
├── LICENSE
├── README.md
├── analysis_options.yaml
├── android/
│ ├── .gitignore
│ ├── app/
│ │ ├── build.gradle
│ │ ├── proguard-rules.pro
│ │ └── src/
│ │ ├── debug/
│ │ │ └── AndroidManifest.xml
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin/
│ │ │ │ └── com/
│ │ │ │ └── banuacoders/
│ │ │ │ └── siap/
│ │ │ │ └── MainActivity.kt
│ │ │ └── res/
│ │ │ ├── drawable/
│ │ │ │ ├── gradient_background.xml
│ │ │ │ └── launch_background.xml
│ │ │ ├── mipmap-anydpi-v26/
│ │ │ │ └── ic_launcher.xml
│ │ │ └── values/
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ └── profile/
│ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ └── gradle-wrapper.properties
│ ├── gradle.properties
│ ├── settings.gradle
│ └── settings_aar.gradle
├── assets/
│ └── flare/
│ ├── documents.flr
│ ├── empty.flr
│ ├── failure.flr
│ ├── not_found.flr
│ ├── qrcode.flr
│ └── success.flr
├── ios/
│ ├── .gitignore
│ ├── Flutter/
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner/
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.imageset/
│ │ │ ├── Contents.json
│ │ │ └── README.md
│ │ ├── Base.lproj/
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
│ ├── Runner.xcodeproj/
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace/
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata/
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata/
│ │ └── xcschemes/
│ │ └── Runner.xcscheme
│ └── Runner.xcworkspace/
│ ├── contents.xcworkspacedata
│ └── xcshareddata/
│ ├── IDEWorkspaceChecks.plist
│ └── WorkspaceSettings.xcsettings
├── lib/
│ ├── main.dart
│ ├── models/
│ │ ├── absent_permission.dart
│ │ ├── employee.dart
│ │ ├── holiday.dart
│ │ ├── location.dart
│ │ ├── notification.dart
│ │ ├── outstation.dart
│ │ ├── paid_leave.dart
│ │ ├── presence.dart
│ │ ├── report/
│ │ │ ├── absent_report.dart
│ │ │ ├── daily.dart
│ │ │ ├── monthly.dart
│ │ │ └── yearly.dart
│ │ └── user.dart
│ ├── network/
│ │ ├── api.dart
│ │ └── api_service.dart
│ ├── repositories/
│ │ └── data_repository.dart
│ ├── screen/
│ │ ├── application_screen.dart
│ │ ├── bottom_nav_screen.dart
│ │ ├── change_absent_permission_photo_screen.dart
│ │ ├── change_outstation_photo_screen.dart
│ │ ├── change_paid_leave_photo_screen.dart
│ │ ├── change_pass_screen.dart
│ │ ├── create_notification_screen.dart
│ │ ├── create_outstation_screen.dart
│ │ ├── create_paid_leave_screen.dart
│ │ ├── create_permission_screen.dart
│ │ ├── employee_attendance_screen.dart
│ │ ├── employee_list_screen.dart
│ │ ├── employee_outstation.dart
│ │ ├── employee_paid_leave_screen.dart
│ │ ├── employee_permission.dart
│ │ ├── forgot_pass_screen.dart
│ │ ├── home_screen.dart
│ │ ├── image_detail_screen.dart
│ │ ├── login_screen.dart
│ │ ├── notification_list_screen.dart
│ │ ├── on_boarding_screen.dart
│ │ ├── outstation_list_screen.dart
│ │ ├── paid_leave_list_screen.dart
│ │ ├── permission_list_screen.dart
│ │ ├── presence_screen.dart
│ │ ├── regulation_screen.dart
│ │ ├── report_screen.dart
│ │ └── splash_screen.dart
│ ├── utils/
│ │ ├── app_const.dart
│ │ ├── extensions.dart
│ │ ├── file_util.dart
│ │ └── view_util.dart
│ └── widgets/
│ ├── employee_presence_card_widget.dart
│ ├── employee_proposal_info_widget.dart
│ ├── employee_proposal_widget.dart
│ ├── image_placeholder_widget.dart
│ ├── next_presence_empty_card_widget.dart
│ ├── statistics_card_widget.dart
│ └── user_info_card_widget.dart
├── privacy-policy.md
├── pubspec.yaml
└── test/
└── widget_test.dart
SYMBOL INDEX (408 symbols across 56 files)
FILE: lib/main.dart
function main (line 24) | Future<void> main()
class MyApp (line 51) | class MyApp extends StatefulWidget {
method createState (line 53) | _MyAppState createState()
class _MyAppState (line 56) | class _MyAppState extends State<MyApp> {
method build (line 58) | Widget build(BuildContext context)
function scheduleAlarm (line 76) | Future<void> scheduleAlarm(
FILE: lib/models/absent_permission.dart
class AbsentPermission (line 4) | class AbsentPermission {
FILE: lib/models/employee.dart
class Employee (line 4) | class Employee {
method toJson (line 49) | Map<String, dynamic> toJson()
FILE: lib/models/holiday.dart
class Holiday (line 3) | class Holiday {
FILE: lib/models/location.dart
class Location (line 3) | class Location {
method toJson (line 17) | Map<String, dynamic> toJson()
FILE: lib/models/notification.dart
class UserNotification (line 3) | class UserNotification {
FILE: lib/models/outstation.dart
class Outstation (line 4) | class Outstation {
FILE: lib/models/paid_leave.dart
class PaidLeave (line 4) | class PaidLeave {
FILE: lib/models/presence.dart
class Presence (line 4) | class Presence {
FILE: lib/models/report/absent_report.dart
class AbsentReport (line 7) | class AbsentReport {
FILE: lib/models/report/daily.dart
class Daily (line 4) | class Daily {
class DailyData (line 25) | class DailyData {
method toMap (line 62) | Map<String, dynamic> toMap()
method toPresenceJson (line 72) | Map<String, dynamic> toPresenceJson()
FILE: lib/models/report/monthly.dart
class Monthly (line 3) | class Monthly {
FILE: lib/models/report/yearly.dart
class Yearly (line 3) | class Yearly {
FILE: lib/models/user.dart
class User (line 5) | class User {
FILE: lib/network/api.dart
type Endpoint (line 3) | enum Endpoint {
class API (line 30) | class API {
method endpointUri (line 33) | String endpointUri(Endpoint endpoint)
FILE: lib/network/api_service.dart
class ApiService (line 9) | class ApiService {
method _getToken (line 15) | Future<void> _getToken()
method getEndpointData (line 22) | Future<Map<String, dynamic>> getEndpointData(
method postEndpointWithoutToken (line 41) | Future<http.Response> postEndpointWithoutToken(
method postEndpointWithToken (line 49) | Future<http.Response> postEndpointWithToken(
method _setHeaders (line 59) | Map<String, String> _setHeaders()
FILE: lib/repositories/data_repository.dart
class DataRepository (line 13) | class DataRepository {
method getAllEmployee (line 18) | Future<List<Employee>> getAllEmployee()
method getMyData (line 46) | Future<User> getMyData()
method logout (line 62) | Future<Map<String, dynamic>> logout()
method login (line 72) | Future<Response> login(Map<String, dynamic> data)
method changePass (line 81) | Future<Response> changePass(Map<String, dynamic> data)
method permission (line 90) | Future<Map<String, dynamic>> permission(Map<String, dynamic> data)
method getAllPermissions (line 100) | Future<Map<String, dynamic>> getAllPermissions(DateTime date)
method getAllEmployeePermissions (line 109) | Future<Map<String, dynamic>> getAllEmployeePermissions(DateTime date)
method approvePermission (line 119) | Future<Response> approvePermission(Map<String, dynamic> data)
method changePermissionPhoto (line 128) | Future<Map<String, dynamic>> changePermissionPhoto(
method outstation (line 139) | Future<Map<String, dynamic>> outstation(Map<String, dynamic> data)
method getAllOutstation (line 149) | Future<Map<String, dynamic>> getAllOutstation(DateTime date)
method getAllEmployeeOutstation (line 158) | Future<Map<String, dynamic>> getAllEmployeeOutstation(DateTime date)
method approveOutstation (line 168) | Future<Response> approveOutstation(Map<String, dynamic> data)
method changeOutstationPhoto (line 177) | Future<Map<String, dynamic>> changeOutstationPhoto(
method getAllNotifications (line 188) | Future<Map<String, dynamic>> getAllNotifications()
method getStatistics (line 196) | Future<Map<String, dynamic>> getStatistics(DateTime date,
method readNotification (line 216) | Future<Response> readNotification(Map<String, dynamic> data)
method readAllNotifications (line 225) | Future<Map<String, dynamic>> readAllNotifications()
method deleteAllNotifications (line 234) | Future<Map<String, dynamic>> deleteAllNotifications()
method sendNotification (line 243) | Future<Map<String, dynamic>> sendNotification(
method presence (line 254) | Future<Response> presence(Map<String, dynamic> data)
method getAllPaidLeave (line 263) | Future<Map<String, dynamic>> getAllPaidLeave(DateTime date)
method getAllEmployeePaidLeave (line 272) | Future<Map<String, dynamic>> getAllEmployeePaidLeave(DateTime date)
method changePaidLeavePhoto (line 282) | Future<Map<String, dynamic>> changePaidLeavePhoto(
method approvePaidLeave (line 293) | Future<Response> approvePaidLeave(Map<String, dynamic> data)
method paidLeave (line 302) | Future<Map<String, dynamic>> paidLeave(Map<String, dynamic> data)
method cancelAttendance (line 312) | Future<Response> cancelAttendance(Map<String, dynamic> data)
FILE: lib/screen/application_screen.dart
class ApplicationScreen (line 28) | class ApplicationScreen extends StatefulWidget {
method createState (line 30) | _ApplicationScreenState createState()
class _ApplicationScreenState (line 33) | class _ApplicationScreenState extends State<ApplicationScreen> {
method loadData (line 38) | Future<void> loadData()
method logout (line 66) | Future<void> logout()
method _handleSelected (line 129) | Future<void> _handleSelected(bool value)
method _setAlarm (line 147) | void _setAlarm(Presence presence)
method setState (line 172) | void setState(void Function() fn)
method initState (line 179) | void initState()
method _buildStakeholderMenu (line 184) | Widget _buildStakeholderMenu()
method _buildCutiSection (line 302) | Widget _buildCutiSection()
method build (line 338) | Widget build(BuildContext context)
FILE: lib/screen/bottom_nav_screen.dart
class BottomNavScreen (line 5) | class BottomNavScreen extends StatefulWidget {
method createState (line 7) | _BottomNavScreenState createState()
class _BottomNavScreenState (line 10) | class _BottomNavScreenState extends State<BottomNavScreen> {
method build (line 20) | Widget build(BuildContext context)
FILE: lib/screen/change_absent_permission_photo_screen.dart
class ChangePermissionPhotoScreen (line 23) | class ChangePermissionPhotoScreen extends StatefulWidget {
method createState (line 29) | _ChangePermissionPhotoScreenState createState()
class _ChangePermissionPhotoScreenState (line 33) | class _ChangePermissionPhotoScreenState
method _openCamera (line 40) | Future<void> _openCamera()
method _uploadData (line 52) | Future<void> _uploadData(AbsentPermission permission)
method _showImage (line 85) | Widget _showImage()
method initState (line 147) | void initState()
method build (line 153) | Widget build(BuildContext context)
FILE: lib/screen/change_outstation_photo_screen.dart
class ChangeOutstationPhotoScreen (line 23) | class ChangeOutstationPhotoScreen extends StatefulWidget {
method createState (line 29) | _ChangeOutstationPhotoScreenState createState()
class _ChangeOutstationPhotoScreenState (line 33) | class _ChangeOutstationPhotoScreenState
method _openCamera (line 40) | Future<void> _openCamera()
method _uploadData (line 52) | Future<void> _uploadData(Outstation outstation)
method _showImage (line 85) | Widget _showImage()
method initState (line 147) | void initState()
method build (line 153) | Widget build(BuildContext context)
FILE: lib/screen/change_paid_leave_photo_screen.dart
class ChangePaidLeavePhotoScreen (line 23) | class ChangePaidLeavePhotoScreen extends StatefulWidget {
method createState (line 29) | _ChangePaidLeavePhotoScreenState createState()
class _ChangePaidLeavePhotoScreenState (line 33) | class _ChangePaidLeavePhotoScreenState
method _openCamera (line 40) | Future<void> _openCamera()
method _uploadData (line 52) | Future<void> _uploadData(PaidLeave paidLeave)
method _showImage (line 85) | Widget _showImage()
method initState (line 147) | void initState()
method build (line 153) | Widget build(BuildContext context)
FILE: lib/screen/change_pass_screen.dart
class ChangePasswordScreen (line 13) | class ChangePasswordScreen extends StatefulWidget {
method createState (line 15) | _ChangePasswordScreenState createState()
class _ChangePasswordScreenState (line 18) | class _ChangePasswordScreenState extends State<ChangePasswordScreen> {
method build (line 30) | Widget build(BuildContext context)
FILE: lib/screen/create_notification_screen.dart
class CreateNotificationScreen (line 12) | class CreateNotificationScreen extends StatefulWidget {
method createState (line 14) | _CreateNotificationScreenState createState()
class _CreateNotificationScreenState (line 18) | class _CreateNotificationScreenState extends State<CreateNotificationScr...
method _sendNotification (line 22) | Future<void> _sendNotification()
method dispose (line 54) | void dispose()
method initState (line 61) | void initState()
method build (line 66) | Widget build(BuildContext context)
FILE: lib/screen/create_outstation_screen.dart
class CreateOutstationScreen (line 21) | class CreateOutstationScreen extends StatefulWidget {
method createState (line 23) | _CreateOutstationScreenState createState()
class _CreateOutstationScreenState (line 26) | class _CreateOutstationScreenState extends State<CreateOutstationScreen> {
method _openCamera (line 37) | Future<void> _openCamera()
method _uploadData (line 49) | Future<void> _uploadData()
method _showImage (line 89) | Widget _showImage()
method _selectDueDate (line 123) | Future<void> _selectDueDate()
method _selectStartDate (line 167) | Future<void> _selectStartDate()
method dispose (line 212) | void dispose()
method initState (line 219) | void initState()
method build (line 224) | Widget build(BuildContext context)
FILE: lib/screen/create_paid_leave_screen.dart
class CreatePaidLeaveScreen (line 22) | class CreatePaidLeaveScreen extends StatefulWidget {
method createState (line 24) | _CreatePaidLeaveScreenState createState()
class _CreatePaidLeaveScreenState (line 27) | class _CreatePaidLeaveScreenState extends State<CreatePaidLeaveScreen> {
method _openCamera (line 40) | Future<void> _openCamera()
method _showImage (line 52) | Widget _showImage()
method _uploadData (line 86) | Future<void> _uploadData()
method _selectDueDate (line 127) | void _selectDueDate()
method _selectStartDate (line 171) | void _selectStartDate()
method dispose (line 216) | void dispose()
method build (line 223) | Widget build(BuildContext context)
FILE: lib/screen/create_permission_screen.dart
class CreatePermissionScreen (line 21) | class CreatePermissionScreen extends StatefulWidget {
method createState (line 23) | _CreatePermissionScreenState createState()
class _CreatePermissionScreenState (line 26) | class _CreatePermissionScreenState extends State<CreatePermissionScreen> {
method _openCamera (line 37) | Future<void> _openCamera()
method _uploadData (line 49) | Future<void> _uploadData()
method _showImage (line 89) | Widget _showImage()
method _selectDueDate (line 123) | Future<void> _selectDueDate()
method _selectStartDate (line 167) | Future<void> _selectStartDate()
method dispose (line 212) | void dispose()
method initState (line 219) | void initState()
method build (line 224) | Widget build(BuildContext context)
FILE: lib/screen/employee_attendance_screen.dart
class EmployeeAttendanceScreen (line 14) | class EmployeeAttendanceScreen extends StatefulWidget {
method createState (line 16) | _EmployeeAttendanceScreenState createState()
class _EmployeeAttendanceScreenState (line 20) | class _EmployeeAttendanceScreenState extends State<EmployeeAttendanceScr...
method setState (line 25) | void setState(void Function() fn)
method _setLoading (line 29) | void _setLoading(bool isLoading)
method loadData (line 35) | Future<void> loadData()
method initState (line 49) | void initState()
method _buildPnsSection (line 54) | Widget _buildPnsSection(Employee employee)
method _buildEmployeeCard (line 87) | Widget _buildEmployeeCard(Employee employee)
method _buildEmptyWidget (line 166) | Widget _buildEmptyWidget()
method _buildContent (line 185) | Widget _buildContent()
method _onSearchButtonPressed (line 232) | Future<Employee> _onSearchButtonPressed()
method build (line 263) | Widget build(BuildContext context)
FILE: lib/screen/employee_list_screen.dart
class EmployeeListScreen (line 14) | class EmployeeListScreen extends StatefulWidget {
method createState (line 20) | State<StatefulWidget> createState()
class _EmployeeListScreenState (line 23) | class _EmployeeListScreenState extends State<EmployeeListScreen> {
method initState (line 28) | void initState()
method _buildPnsInfoSection (line 35) | Widget _buildPnsInfoSection(Employee employee)
method _buildPresenceSection (line 80) | Widget _buildPresenceSection(int index)
method _checkIconData (line 197) | IconData _checkIconData(String status)
method build (line 211) | Widget build(BuildContext context)
method _buildEmployeeCardSection (line 272) | Widget _buildEmployeeCardSection(Employee employee)
FILE: lib/screen/employee_outstation.dart
class EmployeeOutstationScreen (line 19) | class EmployeeOutstationScreen extends StatefulWidget {
method createState (line 21) | _EmployeeOutstationScreenState createState()
class _EmployeeOutstationScreenState (line 25) | class _EmployeeOutstationScreenState extends State<EmployeeOutstationScr...
method setState (line 36) | void setState(void Function() fn)
method _fetchOutstationData (line 42) | Future<void> _fetchOutstationData()
method _rejectOutstation (line 73) | void _rejectOutstation(Outstation outstation)
method _cancelButton (line 110) | SizedBox _cancelButton(String label, Outstation outstation)
method _approveButton (line 127) | SizedBox _approveButton(Outstation outstation)
method _buildButtonSection (line 144) | Widget _buildButtonSection(Outstation outstation)
method _sendData (line 162) | Future<void> _sendData(Outstation outstation, bool isApproved)
method dispose (line 197) | void dispose()
method initState (line 204) | void initState()
method _buildBody (line 209) | Widget _buildBody()
method _setFilter (line 261) | List<Outstation> _setFilter(String value)
method _selectDate (line 277) | void _selectDate()
method _searchByName (line 318) | void _searchByName(String value)
method _buildLabelSection (line 333) | Widget _buildLabelSection()
method build (line 348) | Widget build(BuildContext context)
FILE: lib/screen/employee_paid_leave_screen.dart
class EmployeePaidLeaveScreen (line 19) | class EmployeePaidLeaveScreen extends StatefulWidget {
method createState (line 21) | _EmployeePaidLeaveScreenState createState()
class _EmployeePaidLeaveScreenState (line 25) | class _EmployeePaidLeaveScreenState extends State<EmployeePaidLeaveScree...
method _fetchPaidLeaveData (line 35) | Future<void> _fetchPaidLeaveData()
method _approvePaidLeave (line 66) | void _approvePaidLeave(PaidLeave paidLeave)
method _sendData (line 70) | Future<void> _sendData(PaidLeave paidLeave, bool isApproved)
method dispose (line 105) | void dispose()
method initState (line 112) | void initState()
method setState (line 118) | void setState(void Function() fn)
method _buildBody (line 124) | Widget _buildBody()
method _rejectPaidLeave (line 163) | void _rejectPaidLeave(PaidLeave paidLeave)
method _cancelButton (line 195) | SizedBox _cancelButton(String label, PaidLeave paidLeave)
method _approveButton (line 212) | SizedBox _approveButton(PaidLeave paidLeave)
method _buildButtonSection (line 229) | Widget _buildButtonSection(PaidLeave paidLeave)
method _buildPaidLeaveItem (line 247) | Widget _buildPaidLeaveItem(PaidLeave paidLeave)
method _setFilter (line 267) | List<PaidLeave> _setFilter(String value)
method _selectDate (line 283) | void _selectDate()
method _searchByName (line 324) | void _searchByName(String value)
method _buildLabelSection (line 339) | Widget _buildLabelSection()
method build (line 354) | Widget build(BuildContext context)
FILE: lib/screen/employee_permission.dart
class EmployeePermissionScreen (line 19) | class EmployeePermissionScreen extends StatefulWidget {
method createState (line 21) | _EmployeePermissionScreenState createState()
class _EmployeePermissionScreenState (line 25) | class _EmployeePermissionScreenState extends State<EmployeePermissionScr...
method setState (line 36) | void setState(void Function() fn)
method _fetchPermissionData (line 42) | Future<void> _fetchPermissionData()
method _rejectPermission (line 72) | void _rejectPermission(AbsentPermission permission)
method _approvePermission (line 104) | void _approvePermission(AbsentPermission permission)
method _cancelButton (line 108) | SizedBox _cancelButton(String label, AbsentPermission permission)
method _approveButton (line 125) | SizedBox _approveButton(AbsentPermission permission)
method _buildButtonSection (line 142) | Widget _buildButtonSection(AbsentPermission permission)
method _sendData (line 160) | Future<void> _sendData(AbsentPermission permission, bool isApproved)
method dispose (line 195) | void dispose()
method initState (line 202) | void initState()
method _buildBody (line 207) | Widget _buildBody()
method _setFilter (line 259) | List<AbsentPermission> _setFilter(String value)
method _selectDate (line 275) | void _selectDate()
method _searchByName (line 316) | void _searchByName(String value)
method _buildLabelSection (line 331) | Widget _buildLabelSection()
method build (line 346) | Widget build(BuildContext context)
FILE: lib/screen/forgot_pass_screen.dart
class ForgotPassScreen (line 10) | class ForgotPassScreen extends StatelessWidget {
method build (line 19) | Widget build(BuildContext context)
FILE: lib/screen/home_screen.dart
class HomeScreen (line 31) | class HomeScreen extends StatefulWidget {
method createState (line 33) | _HomeScreenState createState()
class _HomeScreenState (line 36) | class _HomeScreenState extends State<HomeScreen> {
method setState (line 46) | void setState(void Function() fn)
method _buildImageStack (line 52) | Widget _buildImageStack()
method _getAllEmployee (line 159) | Future<void> _getAllEmployee({ProgressDialog pd})
method _getUser (line 182) | Future<void> _getUser()
method _countAttendancePercentage (line 226) | void _countAttendancePercentage()
method _buildShimmerSection (line 268) | Widget _buildShimmerSection(double width, double height)
method _buildUserNameSection (line 281) | Widget _buildUserNameSection()
method _buildPositionSection (line 317) | Widget _buildPositionSection()
method _buildPresenceSection (line 340) | List<Widget> _buildPresenceSection()
method checkTime (line 391) | int checkTime()
method _checkTimeLabel (line 405) | String _checkTimeLabel()
method _checkStatusIcon (line 414) | Widget _checkStatusIcon(String status)
method _buildStatusSection (line 466) | Widget _buildStatusSection()
method _checkPresenceStatus (line 506) | String _checkPresenceStatus(double percentage)
method _checkPresenceStatusColor (line 520) | Color _checkPresenceStatusColor(double percentage)
method _buildCountdownSection (line 534) | Widget _buildCountdownSection()
method _buildTimerSection (line 549) | Widget _buildTimerSection()
method _buildPNSHonorerSection (line 716) | Widget _buildPNSHonorerSection()
method _countUserByStatus (line 726) | int _countUserByStatus(String status)
method dispose (line 735) | void dispose()
method initState (line 741) | void initState()
method _buildUnreadNotificationCount (line 746) | Widget _buildUnreadNotificationCount()
method build (line 767) | Widget build(BuildContext context)
method _buildHeader (line 828) | SliverToBoxAdapter _buildHeader()
method _buildNextPresence (line 925) | SliverToBoxAdapter _buildNextPresence()
FILE: lib/screen/image_detail_screen.dart
class ImageDetailScreen (line 8) | class ImageDetailScreen extends StatefulWidget {
method createState (line 16) | _ImageDetailScreenState createState()
class _ImageDetailScreenState (line 19) | class _ImageDetailScreenState extends State<ImageDetailScreen> {
method initState (line 21) | void initState()
method dispose (line 26) | void dispose()
method build (line 31) | Widget build(BuildContext context)
FILE: lib/screen/login_screen.dart
class LoginScreen (line 18) | class LoginScreen extends StatefulWidget {
method createState (line 20) | _LoginScreenState createState()
class _LoginScreenState (line 23) | class _LoginScreenState extends State<LoginScreen> {
method _buildPhoneForm (line 34) | Widget _buildPhoneForm()
method _buildPasswordForm (line 57) | Widget _buildPasswordForm()
method getDeviceInfo (line 92) | Future<String> getDeviceInfo()
method build (line 103) | Widget build(BuildContext context)
FILE: lib/screen/notification_list_screen.dart
class NotificationListScreen (line 18) | class NotificationListScreen extends StatefulWidget {
method createState (line 20) | _NotificationListScreenState createState()
class _NotificationListScreenState (line 23) | class _NotificationListScreenState extends State<NotificationListScreen> {
method getUser (line 30) | Future<void> getUser()
method setState (line 42) | void setState(void Function() fn)
method _fetchNotificationsData (line 48) | Future<void> _fetchNotificationsData()
method _readNotification (line 76) | Future<void> _readNotification(String id)
method _readAllNotifications (line 104) | Future<void> _readAllNotifications()
method _deleteAllNotifications (line 129) | Future<void> _deleteAllNotifications()
method _buildMarker (line 154) | Widget _buildMarker(bool isRead)
method _buildBody (line 170) | Widget _buildBody()
method _buildActionMenu (line 242) | List<Widget> _buildActionMenu()
method initState (line 269) | void initState()
method build (line 277) | Widget build(BuildContext context)
FILE: lib/screen/on_boarding_screen.dart
class OnBoardingScreen (line 6) | class OnBoardingScreen extends StatelessWidget {
method build (line 12) | Widget build(BuildContext context)
FILE: lib/screen/outstation_list_screen.dart
class OutstationListScreen (line 16) | class OutstationListScreen extends StatefulWidget {
method createState (line 18) | _OutstationListScreenState createState()
class _OutstationListScreenState (line 21) | class _OutstationListScreenState extends State<OutstationListScreen> {
method setState (line 27) | void setState(void Function() fn)
method _fetchOutstationData (line 33) | Future<void> _fetchOutstationData()
method initState (line 63) | void initState()
method _selectDate (line 69) | Future<void> _selectDate(BuildContext context)
method _buildBody (line 83) | Widget _buildBody()
method build (line 134) | Widget build(BuildContext context)
FILE: lib/screen/paid_leave_list_screen.dart
class PaidLeaveListScreen (line 16) | class PaidLeaveListScreen extends StatefulWidget {
method createState (line 18) | _PaidLeaveListScreenState createState()
class _PaidLeaveListScreenState (line 21) | class _PaidLeaveListScreenState extends State<PaidLeaveListScreen> {
method setState (line 27) | void setState(void Function() fn)
method _fetchPaidLeaveData (line 33) | Future<void> _fetchPaidLeaveData()
method initState (line 62) | void initState()
method _selectDate (line 68) | Future<void> _selectDate(BuildContext context)
method _buildBody (line 82) | Widget _buildBody()
method _buildPaidLeaveItem (line 121) | Widget _buildPaidLeaveItem(PaidLeave paidLeave)
method build (line 140) | Widget build(BuildContext context)
FILE: lib/screen/permission_list_screen.dart
class PermissionListScreen (line 16) | class PermissionListScreen extends StatefulWidget {
method createState (line 18) | _PermissionListScreenState createState()
class _PermissionListScreenState (line 21) | class _PermissionListScreenState extends State<PermissionListScreen> {
method setState (line 27) | void setState(void Function() fn)
method _fetchPermissionData (line 33) | Future<void> _fetchPermissionData()
method initState (line 61) | void initState()
method _selectDate (line 67) | Future<void> _selectDate(BuildContext context)
method _buildBody (line 81) | Widget _buildBody()
method build (line 134) | Widget build(BuildContext context)
FILE: lib/screen/presence_screen.dart
class PresenceScreen (line 28) | class PresenceScreen extends StatefulWidget {
method createState (line 34) | _PresenceScreenState createState()
class _PresenceScreenState (line 37) | class _PresenceScreenState extends State<PresenceScreen> {
method _openCamera (line 50) | Future<void> _openCamera()
method _onQRViewCreated (line 68) | void _onQRViewCreated(QRViewController controller)
method _uploadData (line 86) | Future<void> _uploadData()
method _getUserLocation (line 124) | Future<void> _getUserLocation()
method _showImage (line 155) | Widget _showImage()
method _buildQrScanner (line 189) | Widget _buildQrScanner()
method _buildPlaceholderQR (line 216) | Widget _buildPlaceholderQR()
method initState (line 230) | void initState()
method dispose (line 237) | void dispose()
method _buildLocationSection (line 242) | Widget _buildLocationSection()
method build (line 292) | Widget build(BuildContext context)
FILE: lib/screen/regulation_screen.dart
class RegulationScreen (line 4) | class RegulationScreen extends StatelessWidget {
method _buildBody (line 36) | Widget _buildBody()
method build (line 72) | Widget build(BuildContext context)
FILE: lib/screen/report_screen.dart
class ReportScreen (line 31) | class ReportScreen extends StatefulWidget {
method createState (line 38) | _ReportScreenState createState()
class _ReportScreenState (line 41) | class _ReportScreenState extends State<ReportScreen> {
method _fetchReportData (line 57) | Future<void> _fetchReportData()
method _onDaySelected (line 88) | void _onDaySelected(DateTime day, DateTime focusedDay)
method _checkAttendancePercentageColor (line 106) | Color _checkAttendancePercentageColor(double percentage)
method _buildUserInfoSection (line 124) | Widget _buildUserInfoSection()
method _buildStatisticSection (line 136) | Widget _buildStatisticSection(AbsentReport report, DateTime year)
method _buildSalaryCalculator (line 144) | Widget _buildSalaryCalculator()
method _buildBody (line 249) | Widget _buildBody()
method _countTotalSalary (line 323) | double _countTotalSalary()
method _countSalaryCuts (line 327) | double _countSalaryCuts()
method _countAttendancePercentage (line 331) | double _countAttendancePercentage(List<DailyData> presences)
method _buildTableCalendar (line 369) | Widget _buildTableCalendar()
method _getEventsForDay (line 414) | List<dynamic> _getEventsForDay(DateTime day)
method _getHolidayForDay (line 426) | List<dynamic> _getHolidayForDay(DateTime day)
method _buildEventsMarker (line 438) | Widget _buildEventsMarker(DateTime date, List events)
method _buildEventList (line 472) | Widget _buildEventList()
method _cancelAttendance (line 579) | void _cancelAttendance(Presence presence)
method initState (line 612) | void initState()
method dispose (line 622) | void dispose()
method _selectYear (line 627) | Future<void> _selectYear(BuildContext context)
method _sendData (line 641) | Future<void> _sendData(Presence presence)
method build (line 675) | Widget build(BuildContext context)
FILE: lib/screen/splash_screen.dart
class SplashScreen (line 16) | class SplashScreen extends StatefulWidget {
method createState (line 18) | _SplashScreenState createState()
class _SplashScreenState (line 21) | class _SplashScreenState extends State<SplashScreen> {
method _askPermission (line 25) | Future<void> _askPermission()
method checkIsFirstSeen (line 58) | Future<void> checkIsFirstSeen()
method _checkIfLoggedIn (line 72) | Future<void> _checkIfLoggedIn()
method navigationPage (line 82) | void navigationPage()
method _loadWidget (line 94) | Future<Timer> _loadWidget()
method _checkGps (line 99) | Future<void> _checkGps()
method initState (line 141) | void initState()
method build (line 151) | Widget build(BuildContext context)
FILE: lib/utils/extensions.dart
function isSameDate (line 2) | bool isSameDate(DateTime other)
function isToday (line 6) | bool isToday()
function isWeekend (line 12) | bool isWeekend()
function isFinished (line 16) | bool isFinished()
function isOnGoing (line 20) | bool isOnGoing()
FILE: lib/utils/file_util.dart
function compressAndGetFile (line 5) | Future<File> compressAndGetFile(File file, String targetPath)
FILE: lib/utils/view_util.dart
function showAlertDialog (line 9) | Future showAlertDialog(String type, String title, String content,
function showErrorDialog (line 49) | Future showErrorDialog(Map<String, dynamic> json)
function percentageLabelColor (line 91) | Color percentageLabelColor(double percentage)
function checkStatusColor (line 98) | Color checkStatusColor(String status)
function checkPresencePercentage (line 119) | double checkPresencePercentage(String status)
function calculateLateTime (line 174) | String calculateLateTime(DateTime startTime, String attendTime)
function formatPercentage (line 197) | String formatPercentage(double percentage)
function formatCurrency (line 201) | String formatCurrency(double salary)
function trimPhoneNumber (line 205) | String trimPhoneNumber(String phoneNumber)
function dowBuilder (line 210) | Widget dowBuilder(BuildContext context, DateTime date)
function holidayBuilder (line 224) | Widget holidayBuilder(DateTime date, {bool isNotEmpty})
FILE: lib/widgets/employee_presence_card_widget.dart
class EmployeePresenceCardWidget (line 11) | class EmployeePresenceCardWidget extends StatelessWidget {
method _buildCancelButton (line 35) | Widget _buildCancelButton(String status)
method _showImage (line 45) | Widget _showImage(String photo)
method checkAddressLabel (line 92) | String checkAddressLabel()
method checkAddressIcon (line 101) | IconData checkAddressIcon()
method build (line 111) | Widget build(BuildContext context)
FILE: lib/widgets/employee_proposal_info_widget.dart
class EmployeeProposalInfoWidget (line 6) | class EmployeeProposalInfoWidget extends StatelessWidget {
method build (line 16) | Widget build(BuildContext context)
FILE: lib/widgets/employee_proposal_widget.dart
class EmployeeProposalWidget (line 12) | class EmployeeProposalWidget extends StatelessWidget {
method _checkStatusColor (line 44) | Color _checkStatusColor(String status)
method _buildEmployeeNameSection (line 55) | Widget _buildEmployeeNameSection()
method _buildCategorySection (line 83) | Widget _buildCategorySection()
method _buildButtonSection (line 107) | Widget _buildButtonSection()
method build (line 120) | Widget build(BuildContext context)
FILE: lib/widgets/image_placeholder_widget.dart
class ImagePlaceholderWidget (line 5) | class ImagePlaceholderWidget extends StatelessWidget {
method build (line 12) | Widget build(BuildContext context)
FILE: lib/widgets/next_presence_empty_card_widget.dart
class NextPresenceEmptyCardWidget (line 6) | class NextPresenceEmptyCardWidget extends StatelessWidget {
method build (line 35) | Widget build(BuildContext context)
FILE: lib/widgets/statistics_card_widget.dart
class StatisticCard (line 10) | class StatisticCard extends StatelessWidget {
method _checkAttendancePercentageColor (line 17) | Color _checkAttendancePercentageColor(double percentage)
method _buildCircularPercentage (line 35) | Widget _buildCircularPercentage(
method _buildLinearPercentage (line 96) | Widget _buildLinearPercentage(double percentage, String label, Widget ...
method _buildPaidLeaveSection (line 136) | Widget _buildPaidLeaveSection()
method build (line 292) | Widget build(BuildContext context)
FILE: lib/widgets/user_info_card_widget.dart
class UserInfoCardWidget (line 4) | class UserInfoCardWidget extends StatelessWidget {
method _buildPnsInfoSection (line 22) | Widget _buildPnsInfoSection()
method build (line 82) | Widget build(BuildContext context)
FILE: test/widget_test.dart
function main (line 13) | void main()
Condensed preview — 107 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (501K chars).
[
{
"path": ".gitignore",
"chars": 650,
"preview": "# Miscellaneous\n*.class\n*.log\n*.pyc\n*.swp\n.DS_Store\n.atom/\n.buildlog/\n.history\n.svn/\n\n# IntelliJ related\n*.iml\n*.ipr\n*.i"
},
{
"path": ".metadata",
"chars": 305,
"preview": "# This file tracks properties of this Flutter project.\n# Used by Flutter tool to assess capabilities and perform upgrade"
},
{
"path": "LICENSE",
"chars": 18092,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 2, June 1991\n\n Copyright (C) 1989, 1991 Fr"
},
{
"path": "README.md",
"chars": 3024,
"preview": "<p align=\"center\">\n <img src=\"https://i.ibb.co/jGgBj1n/icon.png\" height=\"200\"/>\n</p>\n\n<h1 align=\"center\">SiAP</h1>\n\nA"
},
{
"path": "analysis_options.yaml",
"chars": 43,
"preview": "include: package:lint/analysis_options.yaml"
},
{
"path": "android/.gitignore",
"chars": 262,
"preview": "gradle-wrapper.jar\n/.gradle\n/captures/\n/gradlew\n/gradlew.bat\n/local.properties\nGeneratedPluginRegistrant.java\n\n# Remembe"
},
{
"path": "android/app/build.gradle",
"chars": 2143,
"preview": "def localProperties = new Properties()\ndef localPropertiesFile = rootProject.file('local.properties')\nif (localPropertie"
},
{
"path": "android/app/proguard-rules.pro",
"chars": 1268,
"preview": "-keep class com.banuacoders.siap.BuildConfig{ *; }\n## Flutter wrapper\n-keep class io.flutter.app.** { *; }\n-keep class i"
},
{
"path": "android/app/src/debug/AndroidManifest.xml",
"chars": 328,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package=\"com.banuacoders.siap\">\n <!-- Flutte"
},
{
"path": "android/app/src/main/AndroidManifest.xml",
"chars": 3222,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package=\"com.banuacoders.siap\">\n <!-- io.flu"
},
{
"path": "android/app/src/main/kotlin/com/banuacoders/siap/MainActivity.kt",
"chars": 215,
"preview": "package com.banuacoders.siap\n\nimport io.flutter.embedding.android.FlutterActivity\n\nimport android.os.Build\nimport androi"
},
{
"path": "android/app/src/main/res/drawable/gradient_background.xml",
"chars": 280,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:sha"
},
{
"path": "android/app/src/main/res/drawable/launch_background.xml",
"chars": 542,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Modify this file to customize your launch splash screen -->\n<layer-list xmln"
},
{
"path": "android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
"chars": 267,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <bac"
},
{
"path": "android/app/src/main/res/values/colors.xml",
"chars": 154,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"splash_color\">#0C2979</color>\n <color name=\"end_c"
},
{
"path": "android/app/src/main/res/values/styles.xml",
"chars": 951,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <!-- Theme applied to the Android Window while the process is sta"
},
{
"path": "android/app/src/profile/AndroidManifest.xml",
"chars": 328,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package=\"com.banuacoders.siap\">\n <!-- Flutte"
},
{
"path": "android/build.gradle",
"chars": 727,
"preview": "buildscript {\n ext.kotlin_version = '1.3.50'\n repositories {\n google()\n jcenter()\n maven { ur"
},
{
"path": "android/gradle/wrapper/gradle-wrapper.properties",
"chars": 233,
"preview": "#Fri Jun 23 08:50:38 CEST 2017\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER"
},
{
"path": "android/gradle.properties",
"chars": 104,
"preview": "org.gradle.jvmargs=-Xmx1536M\nandroid.useAndroidX=true\nandroid.enableJetifier=true\nandroid.enableR8=true\n"
},
{
"path": "android/settings.gradle",
"chars": 462,
"preview": "include ':app'\n\ndef localPropertiesFile = new File(rootProject.projectDir, \"local.properties\")\ndef properties = new Prop"
},
{
"path": "android/settings_aar.gradle",
"chars": 15,
"preview": "include ':app'\n"
},
{
"path": "ios/.gitignore",
"chars": 542,
"preview": "*.mode1v3\n*.mode2v3\n*.moved-aside\n*.pbxuser\n*.perspectivev3\n**/*sync/\n.sconsign.dblite\n.tags*\n**/.vagrant/\n**/DerivedDat"
},
{
"path": "ios/Flutter/AppFrameworkInfo.plist",
"chars": 794,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ios/Flutter/Debug.xcconfig",
"chars": 30,
"preview": "#include \"Generated.xcconfig\"\n"
},
{
"path": "ios/Flutter/Release.xcconfig",
"chars": 30,
"preview": "#include \"Generated.xcconfig\"\n"
},
{
"path": "ios/Runner/AppDelegate.swift",
"chars": 489,
"preview": "import UIKit\nimport Flutter\n\n@UIApplicationMain\n@objc class AppDelegate: FlutterAppDelegate {\n override func applicatio"
},
{
"path": "ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json",
"chars": 2519,
"preview": "{\n \"images\" : [\n {\n \"size\" : \"20x20\",\n \"idiom\" : \"iphone\",\n \"filename\" : \"Icon-App-20x20@2x.png\",\n "
},
{
"path": "ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json",
"chars": 391,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"LaunchImage.png\",\n \"scale\" : \"1x\"\n },\n "
},
{
"path": "ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md",
"chars": 336,
"preview": "# Launch Screen Assets\n\nYou can customize the launch screen with your own desired assets by replacing the image files in"
},
{
"path": "ios/Runner/Base.lproj/LaunchScreen.storyboard",
"chars": 2427,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "ios/Runner/Base.lproj/Main.storyboard",
"chars": 1605,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "ios/Runner/Info.plist",
"chars": 1571,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ios/Runner/Runner-Bridging-Header.h",
"chars": 38,
"preview": "#import \"GeneratedPluginRegistrant.h\"\n"
},
{
"path": "ios/Runner.xcodeproj/project.pbxproj",
"chars": 18980,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 152,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:Runner.xcodepr"
},
{
"path": "ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
"chars": 238,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
"chars": 226,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme",
"chars": 3291,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"1020\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "ios/Runner.xcworkspace/contents.xcworkspacedata",
"chars": 152,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:Runner.xcodepr"
},
{
"path": "ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
"chars": 238,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings",
"chars": 226,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "lib/main.dart",
"chars": 3636,
"preview": "import 'dart:math';\nimport 'dart:typed_data';\n\nimport 'package:flutter/material.dart';\nimport 'package:flutter/services."
},
{
"path": "lib/models/absent_permission.dart",
"chars": 1380,
"preview": "import 'package:spo_balaesang/models/user.dart';\nimport 'package:spo_balaesang/utils/app_const.dart';\n\nclass AbsentPermi"
},
{
"path": "lib/models/employee.dart",
"chars": 1762,
"preview": "import 'package:spo_balaesang/models/presence.dart';\nimport 'package:spo_balaesang/utils/app_const.dart';\n\nclass Employe"
},
{
"path": "lib/models/holiday.dart",
"chars": 493,
"preview": "import 'package:spo_balaesang/utils/app_const.dart';\n\nclass Holiday {\n const Holiday({this.date, this.name, this.descri"
},
{
"path": "lib/models/location.dart",
"chars": 668,
"preview": "import 'package:spo_balaesang/utils/app_const.dart';\n\nclass Location {\n const Location({this.latitude, this.longitude, "
},
{
"path": "lib/models/notification.dart",
"chars": 748,
"preview": "import 'package:spo_balaesang/utils/app_const.dart';\n\nclass UserNotification {\n const UserNotification(\n {this.id,"
},
{
"path": "lib/models/outstation.dart",
"chars": 1273,
"preview": "import 'package:spo_balaesang/models/user.dart';\nimport 'package:spo_balaesang/utils/app_const.dart';\n\nclass Outstation "
},
{
"path": "lib/models/paid_leave.dart",
"chars": 1326,
"preview": "import 'package:spo_balaesang/models/user.dart';\nimport 'package:spo_balaesang/utils/app_const.dart';\n\nclass PaidLeave {"
},
{
"path": "lib/models/presence.dart",
"chars": 1188,
"preview": "import 'package:spo_balaesang/models/location.dart';\nimport 'package:spo_balaesang/utils/app_const.dart';\n\nclass Presenc"
},
{
"path": "lib/models/report/absent_report.dart",
"chars": 1212,
"preview": "import 'package:spo_balaesang/models/holiday.dart';\nimport 'package:spo_balaesang/models/report/daily.dart';\nimport 'pac"
},
{
"path": "lib/models/report/daily.dart",
"chars": 2743,
"preview": "import 'package:spo_balaesang/models/location.dart';\nimport 'package:spo_balaesang/utils/app_const.dart';\n\nclass Daily {"
},
{
"path": "lib/models/report/monthly.dart",
"chars": 1026,
"preview": "import 'package:spo_balaesang/utils/app_const.dart';\n\nclass Monthly {\n const Monthly(\n {this.lateCount,\n this"
},
{
"path": "lib/models/report/yearly.dart",
"chars": 2260,
"preview": "import 'package:spo_balaesang/utils/app_const.dart';\n\nclass Yearly {\n const Yearly({\n this.attendancePercentage,\n "
},
{
"path": "lib/models/user.dart",
"chars": 2300,
"preview": "import 'package:spo_balaesang/models/holiday.dart';\nimport 'package:spo_balaesang/models/presence.dart';\nimport 'package"
},
{
"path": "lib/network/api.dart",
"chars": 1792,
"preview": "import 'package:flutter_config/flutter_config.dart';\n\nenum Endpoint {\n login,\n logout,\n changePass,\n users,\n presen"
},
{
"path": "lib/network/api_service.dart",
"chars": 1981,
"preview": "import 'dart:convert';\n\nimport 'package:flutter/cupertino.dart';\nimport 'package:http/http.dart' as http;\nimport 'packag"
},
{
"path": "lib/repositories/data_repository.dart",
"chars": 9934,
"preview": "import 'dart:convert';\nimport 'dart:io';\n\nimport 'package:flutter/cupertino.dart';\nimport 'package:http/http.dart';\nimpo"
},
{
"path": "lib/screen/application_screen.dart",
"chars": 19122,
"preview": "import 'dart:convert';\n\nimport 'package:flutter/material.dart';\nimport 'package:get/get.dart';\nimport 'package:onesignal"
},
{
"path": "lib/screen/bottom_nav_screen.dart",
"chars": 1714,
"preview": "import 'package:flutter/material.dart';\nimport 'package:spo_balaesang/screen/application_screen.dart';\nimport 'package:s"
},
{
"path": "lib/screen/change_absent_permission_photo_screen.dart",
"chars": 7866,
"preview": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:cached_network_"
},
{
"path": "lib/screen/change_outstation_photo_screen.dart",
"chars": 7831,
"preview": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:cached_network_"
},
{
"path": "lib/screen/change_paid_leave_photo_screen.dart",
"chars": 7807,
"preview": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:cached_network_"
},
{
"path": "lib/screen/change_pass_screen.dart",
"chars": 8375,
"preview": "import 'dart:async';\nimport 'dart:convert';\n\nimport 'package:flutter/material.dart';\nimport 'package:get/get.dart';\nimpo"
},
{
"path": "lib/screen/create_notification_screen.dart",
"chars": 4778,
"preview": "import 'dart:async';\n\nimport 'package:flutter/material.dart';\nimport 'package:get/get.dart';\nimport 'package:progress_di"
},
{
"path": "lib/screen/create_outstation_screen.dart",
"chars": 14158,
"preview": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:flutter/materia"
},
{
"path": "lib/screen/create_paid_leave_screen.dart",
"chars": 15212,
"preview": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:flutter/cuperti"
},
{
"path": "lib/screen/create_permission_screen.dart",
"chars": 14306,
"preview": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:flutter/materia"
},
{
"path": "lib/screen/employee_attendance_screen.dart",
"chars": 8347,
"preview": "import 'package:flare_flutter/flare_actor.dart';\nimport 'package:flutter/cupertino.dart';\nimport 'package:flutter/materi"
},
{
"path": "lib/screen/employee_list_screen.dart",
"chars": 13618,
"preview": "import 'package:flare_flutter/flare_actor.dart';\nimport 'package:flutter/material.dart';\nimport 'package:font_awesome_fl"
},
{
"path": "lib/screen/employee_outstation.dart",
"chars": 14297,
"preview": "import 'dart:async';\nimport 'dart:convert';\n\nimport 'package:flare_flutter/flare_actor.dart';\nimport 'package:flutter/ma"
},
{
"path": "lib/screen/employee_paid_leave_screen.dart",
"chars": 14266,
"preview": "import 'dart:async';\nimport 'dart:convert';\n\nimport 'package:flare_flutter/flare_actor.dart';\nimport 'package:flutter/ma"
},
{
"path": "lib/screen/employee_permission.dart",
"chars": 14359,
"preview": "import 'dart:async';\nimport 'dart:convert';\n\nimport 'package:flare_flutter/flare_actor.dart';\nimport 'package:flutter/ma"
},
{
"path": "lib/screen/forgot_pass_screen.dart",
"chars": 6123,
"preview": "import 'dart:ui';\n\nimport 'package:flutter/material.dart';\nimport 'package:flutter_config/flutter_config.dart';\nimport '"
},
{
"path": "lib/screen/home_screen.dart",
"chars": 29865,
"preview": "import 'dart:async';\nimport 'dart:convert';\n\nimport 'package:auto_size_text/auto_size_text.dart';\nimport 'package:cached"
},
{
"path": "lib/screen/image_detail_screen.dart",
"chars": 1163,
"preview": "import 'dart:typed_data';\n\nimport 'package:cached_network_image/cached_network_image.dart';\nimport 'package:flutter/cupe"
},
{
"path": "lib/screen/login_screen.dart",
"chars": 13323,
"preview": "import 'dart:convert';\nimport 'dart:io';\n\nimport 'package:device_info/device_info.dart';\nimport 'package:flutter/cuperti"
},
{
"path": "lib/screen/notification_list_screen.dart",
"chars": 9159,
"preview": "import 'dart:convert';\n\nimport 'package:flare_flutter/flare_actor.dart';\nimport 'package:flutter/material.dart';\nimport "
},
{
"path": "lib/screen/on_boarding_screen.dart",
"chars": 869,
"preview": "import 'package:flutter/material.dart';\nimport 'package:get/get.dart';\nimport 'package:introduction_screen/introduction_"
},
{
"path": "lib/screen/outstation_list_screen.dart",
"chars": 5846,
"preview": "import 'package:flare_flutter/flare_actor.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_cuperti"
},
{
"path": "lib/screen/paid_leave_list_screen.dart",
"chars": 5781,
"preview": "import 'package:flare_flutter/flare_actor.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_cuperti"
},
{
"path": "lib/screen/permission_list_screen.dart",
"chars": 5850,
"preview": "import 'package:flare_flutter/flare_actor.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_cuperti"
},
{
"path": "lib/screen/presence_screen.dart",
"chars": 12016,
"preview": "import 'dart:async';\nimport 'dart:convert';\nimport 'dart:io';\nimport 'dart:typed_data';\n\nimport 'package:android_intent/"
},
{
"path": "lib/screen/regulation_screen.dart",
"chars": 2692,
"preview": "import 'package:flutter/material.dart';\nimport 'package:url_launcher/url_launcher.dart';\n\nclass RegulationScreen extends"
},
{
"path": "lib/screen/report_screen.dart",
"chars": 22689,
"preview": "import 'dart:async';\nimport 'dart:convert';\n\nimport 'package:flare_flutter/flare_actor.dart';\nimport 'package:flutter/cu"
},
{
"path": "lib/screen/splash_screen.dart",
"chars": 7889,
"preview": "import 'dart:async';\n\nimport 'package:android_intent/android_intent.dart';\nimport 'package:flutter/material.dart';\nimpor"
},
{
"path": "lib/utils/app_const.dart",
"chars": 6161,
"preview": "// Shared Preferences Keys\n\nimport 'package:flutter/material.dart';\n\nconst String prefsTokenKey = 'token';\nconst String "
},
{
"path": "lib/utils/extensions.dart",
"chars": 492,
"preview": "extension DateOnlyCompare on DateTime {\n bool isSameDate(DateTime other) {\n return year == other.year && month == ot"
},
{
"path": "lib/utils/file_util.dart",
"chars": 304,
"preview": "import 'dart:io';\n\nimport 'package:flutter_image_compress/flutter_image_compress.dart';\n\nFuture<File> compressAndGetFile"
},
{
"path": "lib/utils/view_util.dart",
"chars": 6007,
"preview": "import 'package:flare_flutter/flare_actor.dart';\nimport 'package:flutter/material.dart';\nimport 'package:get/get.dart';\n"
},
{
"path": "lib/widgets/employee_presence_card_widget.dart",
"chars": 6227,
"preview": "import 'package:auto_size_text/auto_size_text.dart';\nimport 'package:cached_network_image/cached_network_image.dart';\nim"
},
{
"path": "lib/widgets/employee_proposal_info_widget.dart",
"chars": 1821,
"preview": "import 'package:flutter/material.dart';\nimport 'package:intl/intl.dart';\nimport 'package:spo_balaesang/utils/app_const.d"
},
{
"path": "lib/widgets/employee_proposal_widget.dart",
"chars": 7617,
"preview": "import 'package:auto_size_text/auto_size_text.dart';\nimport 'package:cached_network_image/cached_network_image.dart';\nim"
},
{
"path": "lib/widgets/image_placeholder_widget.dart",
"chars": 886,
"preview": "import 'package:flutter/material.dart';\nimport 'package:get/get.dart';\nimport 'package:spo_balaesang/utils/app_const.dar"
},
{
"path": "lib/widgets/next_presence_empty_card_widget.dart",
"chars": 4165,
"preview": "import 'package:auto_size_text/auto_size_text.dart';\nimport 'package:flutter/material.dart';\nimport 'package:intl/intl.d"
},
{
"path": "lib/widgets/statistics_card_widget.dart",
"chars": 26635,
"preview": "import 'package:flutter/material.dart';\nimport 'package:get/get.dart';\nimport 'package:intl/intl.dart';\nimport 'package:"
},
{
"path": "lib/widgets/user_info_card_widget.dart",
"chars": 5137,
"preview": "import 'package:flutter/material.dart';\nimport 'package:spo_balaesang/utils/app_const.dart';\n\nclass UserInfoCardWidget e"
},
{
"path": "privacy-policy.md",
"chars": 16609,
"preview": "PRIVACY NOTICE\n\n\nLast updated November 12, 2020\n\n\n\n\n\n\nThank you for choosing to be part of our community at Banua Coder"
},
{
"path": "pubspec.yaml",
"chars": 1856,
"preview": "name: spo_balaesang\nversion: 2.0.0+1\npublish_to: none\ndescription: Sistem presensi online kantor pemerintahan kecamatan "
},
{
"path": "test/widget_test.dart",
"chars": 1052,
"preview": "// This is a basic Flutter widget test.\n//\n// To perform an interaction with a widget in your test, use the WidgetTester"
}
]
// ... and 6 more files (download for full content)
About this extraction
This page contains the full source code of the ryanaidilp/sistem_absensi_pegawai_app GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 107 files (466.7 KB), approximately 103.1k tokens, and a symbol index with 408 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.