Commit f9d67f7d authored by Dio Maulana's avatar Dio Maulana

init repo

parents
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
version:
revision: eb6d86ee27deecba4a83536aa20f366a6044895c
channel: stable
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- platform: android
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- platform: ios
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- platform: linux
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- platform: macos
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- platform: web
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
- platform: windows
create_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
base_revision: eb6d86ee27deecba4a83536aa20f366a6044895c
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
# tour_travel_agr
A new Flutter project.
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
For help getting started with Flutter development, view the
[online documentation](https://docs.flutter.dev/), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 33
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.tour_agency"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion 19
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.tour_agency">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.tour_agency">
<application android:label="tour_travel_agr" android:name="${applicationName}" android:icon="@mipmap/ic_launcher">
<activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data android:name="flutterEmbedding" android:value="2" />
</application>
</manifest>
package com.example.tour_agency
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.tour_agency">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
**/dgph
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
</dict>
</plist>
#include "Generated.xcconfig"
#include "Generated.xcconfig"
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
</resources>
</document>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Tour Travel Agr</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>tour_travel_agr</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
#import "GeneratedPluginRegistrant.h"
// ignore_for_file: sized_box_for_whitespace
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/resource/font.dart';
import 'package:tour_travel_agr/resource/size.dart';
import 'package:tour_travel_agr/resource/style.dart';
class CustomAppBar extends StatelessWidget {
const CustomAppBar({
Key? key,
required this.text,
this.canGoback = true,
this.showElipses = false,
}) : super(key: key);
final String text;
final bool canGoback;
final bool showElipses;
@override
Widget build(BuildContext context) {
return Container(
height: 44,
width: double.infinity,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
(canGoback)
? GestureDetector(
onTap: () {
Navigator.pop(context);
},
child: Container(
margin: EdgeInsets.only(
right: AppMargin.m16,
),
width: 24,
height: 24,
child: const Center(
child: Icon(
Icons.arrow_back,
size: 26,
),
),
),
)
: const SizedBox(),
Text(
text,
style: getBoldStyle(
color: Colors.black,
fontFamily: FontConstants.mulish,
fontSize: FontSize.s17,
),
)
],
),
);
}
}
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/helper/components_widget/widget_text_field.dart';
class PasswordInput extends StatefulWidget {
const PasswordInput({
Key? key,
required this.passwordController,
this.onChanged,
this.labelText = "Password",
this.labelColor,
this.marginTop,
this.borderSideActive = false,
}) : super(key: key);
final TextEditingController passwordController;
final void Function(String val)? onChanged;
final String labelText;
final Color? labelColor;
final double? marginTop;
final bool borderSideActive;
@override
State<PasswordInput> createState() => _PasswordInputState();
}
class _PasswordInputState extends State<PasswordInput> {
bool secure = true;
@override
Widget build(BuildContext context) {
return InputTextField(
controller: widget.passwordController,
labelText: widget.labelText,
labelColor: widget.labelColor,
marginTop: widget.marginTop,
marginActive: false,
onChanged: widget.onChanged,
secure: secure,
isSuffixActive: true,
borderSideActive: widget.borderSideActive,
hintText: widget.labelText,
suffixIcon: (secure) ? Icons.visibility_off : Icons.visibility,
onSuffixPress: () {
setState(() {
secure = !secure;
});
},
);
}
}
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/resource/colors.dart';
import 'package:tour_travel_agr/resource/style.dart';
class CustomButton extends StatelessWidget {
const CustomButton({
Key? key,
required this.text,
this.colorText = Colors.white,
this.colorButton,
this.onTap,
}) : super(key: key);
final String text;
final Color colorText;
final Color? colorButton;
final void Function()? onTap;
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: Container(
width: double.infinity,
height: 45,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
color: (colorButton == null) ? ColorManager.primary : colorButton,
),
child: Center(
child: Text(
text,
style: getRegularStyle(
color: colorText,
),
),
),
),
);
}
}
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/resource/size.dart';
import 'package:tour_travel_agr/resource/style.dart';
class InputTextField extends StatelessWidget {
const InputTextField({
Key? key,
required this.controller,
required this.labelText,
this.secure = false,
this.enabled = true,
this.showCounter = false,
this.inputType = TextInputType.text,
this.maxLines = 1,
this.maxLength = 100,
this.marginActive = false,
this.isError = false,
this.hintText = '',
this.labelColor,
this.isSuffixActive = false,
this.suffixIcon,
this.onSuffixPress,
this.onChanged,
this.borderSideActive = false,
this.marginTop,
}) : super(key: key);
final TextEditingController controller;
final String labelText;
final bool secure;
final bool enabled;
final bool showCounter;
final TextInputType inputType;
final int maxLines;
final int? maxLength;
final bool marginActive;
final bool isError;
final String hintText;
final Color? labelColor;
final bool isSuffixActive;
final IconData? suffixIcon;
final void Function()? onSuffixPress;
final void Function(String val)? onChanged;
final bool borderSideActive;
final double? marginTop;
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(
horizontal: (marginActive) ? AppPadding.p20 : 0,
),
margin: EdgeInsets.only(
top: (marginTop != null) ? marginTop! : 0,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(
bottom: AppMargin.m12,
),
child: Text(
labelText,
style: getMediumStyle(
color: (labelColor == null) ? Colors.black : labelColor!,
),
),
),
TextField(
maxLength: maxLength,
maxLines: maxLines,
enabled: enabled,
onChanged: onChanged,
obscureText: secure,
keyboardType: inputType,
textInputAction: TextInputAction.done,
controller: controller,
decoration: InputDecoration(
hintText: hintText,
hintStyle: getRegularStyle(
color: Colors.grey,
),
counterText: (showCounter) ? null : "",
enabledBorder: (borderSideActive)
? OutlineInputBorder(
borderSide: BorderSide(
width: 1,
color: (isError) ? Colors.red : Colors.grey),
borderRadius: BorderRadius.circular(5),
)
: null,
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(width: 1, color: Colors.grey),
borderRadius: BorderRadius.circular(5),
),
disabledBorder: (borderSideActive)
? OutlineInputBorder(
borderSide:
const BorderSide(width: 1, color: Colors.grey),
borderRadius: BorderRadius.circular(5),
)
: null,
suffixIcon: (isSuffixActive)
? IconButton(
onPressed: onSuffixPress,
icon: Icon(
suffixIcon,
color: Colors.grey,
),
)
: null,
),
style: getRegularStyle(
color: Colors.black,
),
),
],
),
);
}
}
// ignore_for_file: must_be_immutable
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/resource/colors.dart';
class ScreenResponsive extends StatefulWidget {
Widget widget;
double widthScreen;
bool isCoreLayout;
Color? sideColor;
ScreenResponsive({
Key? key,
required this.widget,
required this.widthScreen,
this.isCoreLayout = true,
this.sideColor,
}) : super(key: key);
@override
State<ScreenResponsive> createState() => _ScreenResponsiveState();
}
class _ScreenResponsiveState extends State<ScreenResponsive> {
@override
Widget build(BuildContext context) {
double maxWidthScreen = getMaxWidthScreen(context, true);
if (widget.widthScreen > maxWidthScreen) {
double leftRight = (widget.widthScreen - maxWidthScreen) / 2;
if (widget.isCoreLayout) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: leftRight,
height: MediaQuery.of(context).size.height,
color: (widget.sideColor == null)
? ColorManager.primary
: widget.sideColor,
),
SizedBox(
width: maxWidthScreen,
child: widget.widget,
),
Container(
width: leftRight,
height: MediaQuery.of(context).size.height,
color: (widget.sideColor == null)
? ColorManager.primary
: widget.sideColor,
)
],
);
} else {
return Center(
child: widget.widget,
);
}
} else {
return widget.widget;
}
}
}
const double maxWidthScreens = 500;
double getMaxWidthScreen(context, bool useResponsive) {
double widhtScreen = MediaQuery.of(context).size.width;
if (useResponsive) {
return maxWidthScreens;
} else {
return widhtScreen;
}
}
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/resource/routes.dart';
import 'package:url_strategy/url_strategy.dart';
void main() {
setPathUrlStrategy();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'AGR Agency',
debugShowCheckedModeBanner: false,
onGenerateRoute: RouteGenerator.getRoute,
initialRoute: Routes.splashRoute,
);
}
}
// ignore_for_file: avoid_unnecessary_containers
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/helper/components_widget/custom_appbar.dart';
import 'package:tour_travel_agr/helper/components_widget/widget_button.dart';
import 'package:tour_travel_agr/helper/components_widget/widget_text_field.dart';
import 'package:tour_travel_agr/resource/assets.dart';
import 'package:tour_travel_agr/resource/colors.dart';
import 'package:tour_travel_agr/resource/size.dart';
import 'package:tour_travel_agr/resource/style.dart';
class ForgotPasswordView extends StatefulWidget {
const ForgotPasswordView({super.key});
@override
State<ForgotPasswordView> createState() => _ForgotPasswordViewState();
}
class _ForgotPasswordViewState extends State<ForgotPasswordView> {
final TextEditingController whatsappController = TextEditingController();
bool buttonActive = false;
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: ColorManager.backgroundColor,
body: Stack(
children: [
Positioned(
top: 0,
left: 0,
child: Image(
height: 100,
image: AssetImage(
Assets.elipse,
),
),
),
Container(
padding: EdgeInsets.only(
top: AppPadding.safeAreaTop(context),
left: AppPadding.p20,
right: AppPadding.p20,
bottom: AppPadding.safeAreaBot(context),
),
child: Column(
children: [
const CustomAppBar(
text: "ForgotPassword",
),
Expanded(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: Center(
child: Image(
width: 216,
height: 216,
image: AssetImage(
Assets.forgotPassword,
),
),
),
),
Container(
margin: EdgeInsets.only(
top: AppMargin.m25,
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Forgot",
style: getSemiBoldStyle(
color: Colors.black,
fontSize: 32,
),
),
Text(
"Password",
style: getSemiBoldStyle(
color: Colors.black,
fontSize: 32,
),
)
],
),
),
Container(
margin: EdgeInsets.only(
top: AppMargin.m12,
),
child: Text(
"Dont worry! It happens. Please enter your number phone",
style: getMediumStyle(
color: ColorManager.grey,
),
),
),
SizedBox(
height: AppMargin.m20,
),
InputTextField(
controller: whatsappController,
labelText: "No Whatsapp",
inputType: TextInputType.number,
onChanged: (val) {
if (val.length > 7) {
setState(() {
buttonActive = true;
});
} else {
setState(() {
buttonActive = false;
});
}
},
),
SizedBox(
height: AppMargin.m20,
),
CustomButton(
text: "Submit",
colorButton: (!buttonActive) ? Colors.grey : null,
onTap: () {
// TODO: dosomething here
},
)
],
),
),
)
],
),
),
],
),
);
}
}
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/helper/components_widget/password_input.dart';
import 'package:tour_travel_agr/helper/components_widget/widget_button.dart';
import 'package:tour_travel_agr/helper/widget_responsive.dart';
import 'package:tour_travel_agr/helper/components_widget/widget_text_field.dart';
import 'package:tour_travel_agr/resource/assets.dart';
import 'package:tour_travel_agr/resource/colors.dart';
import 'package:tour_travel_agr/resource/routes.dart';
import 'package:tour_travel_agr/resource/size.dart';
import 'package:tour_travel_agr/resource/style.dart';
class LoginView extends StatelessWidget {
LoginView({super.key});
final TextEditingController whatsappController = TextEditingController();
final TextEditingController passwordController = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: ColorManager.backgroundColor,
body: ScreenResponsive(
widget: BodyWidget(
whatsappController: whatsappController,
passwordController: passwordController,
),
widthScreen: MediaQuery.of(context).size.width,
),
);
}
}
class BodyWidget extends StatefulWidget {
const BodyWidget({
Key? key,
required this.whatsappController,
required this.passwordController,
}) : super(key: key);
final TextEditingController whatsappController;
final TextEditingController passwordController;
@override
State<BodyWidget> createState() => _BodyWidgetState();
}
class _BodyWidgetState extends State<BodyWidget> {
bool buttonLoginActive = false;
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Stack(
children: [
Container(
padding: EdgeInsets.only(
left: AppPadding.p20,
right: AppPadding.p20,
top: AppPadding.safeAreaTop(context),
bottom: AppPadding.safeAreaBot(context),
),
child: Column(
children: [
Center(
child: Container(
padding: const EdgeInsets.only(
top: 40,
),
child: Image(
width: 197,
height: 73,
image: AssetImage(
Assets.logoGreen,
),
),
),
),
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
const SizedBox(
height: 148,
),
InputTextField(
controller: widget.whatsappController,
labelText: "No. Whatsapp",
hintText: "628...",
marginActive: false,
onChanged: (val) {
if (widget.whatsappController.text.length >= 7 &&
widget.passwordController.text.isNotEmpty) {
setState(() {
buttonLoginActive = true;
});
} else {
setState(() {
buttonLoginActive = false;
});
}
},
),
SizedBox(
height: AppMargin.m20,
),
PasswordInput(
passwordController: widget.passwordController,
onChanged: (val) {
if (widget.whatsappController.text.length >= 7 &&
widget.passwordController.text.isNotEmpty) {
setState(() {
buttonLoginActive = true;
});
} else {
setState(() {
buttonLoginActive = false;
});
}
},
),
Container(
margin: EdgeInsets.only(
top: AppMargin.m20,
bottom: AppMargin.m25,
),
child: Row(
children: [
const Spacer(),
GestureDetector(
onTap: () {
Navigator.pushNamed(
context,
Routes.forgotPasswordRoute,
);
},
child: Text(
"Lupa kata sandi",
style: getRegularStyle(
color: ColorManager.primary,
),
),
),
],
),
),
CustomButton(
text: "Login",
colorButton: buttonLoginActive
? ColorManager.primary
: Colors.grey,
onTap: () {
if (buttonLoginActive) {
// TODO:dosomething here
}
},
),
Container(
margin: const EdgeInsets.only(
top: 28,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Belum mempunyai akun ? ",
style: getRegularStyle(
color: Colors.black,
),
),
GestureDetector(
onTap: () {
Navigator.pushNamed(
context,
Routes.registerRoute,
);
},
child: Text(
"Daftar",
style: getSemiBoldStyle(
color: ColorManager.link,
),
),
),
],
),
)
],
),
),
)
],
),
),
Positioned(
top: 0,
left: 0,
child: Image(
height: 150,
image: AssetImage(
Assets.elipse,
),
),
),
],
);
}
}
// ignore_for_file: sized_box_for_whitespace, avoid_unnecessary_containers
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/helper/components_widget/custom_appbar.dart';
import 'package:tour_travel_agr/helper/widget_responsive.dart';
import 'package:tour_travel_agr/resource/assets.dart';
import 'package:tour_travel_agr/resource/colors.dart';
import 'package:tour_travel_agr/resource/font.dart';
import 'package:tour_travel_agr/resource/size.dart';
import 'package:tour_travel_agr/resource/style.dart';
class OtpVerificationView extends StatefulWidget {
const OtpVerificationView({super.key});
@override
State<OtpVerificationView> createState() => _OtpVerificationViewState();
}
class _OtpVerificationViewState extends State<OtpVerificationView> {
final TextEditingController otp1Controller = TextEditingController();
final TextEditingController otp2Controller = TextEditingController();
final TextEditingController otp3Controller = TextEditingController();
final TextEditingController otp4Controller = TextEditingController();
String finalText = "";
bool disabledInput = false;
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: ColorManager.backgroundColor,
body: ScreenResponsive(
widget: bodyWidget(context),
widthScreen: MediaQuery.of(context).size.width,
),
);
}
Container bodyWidget(BuildContext context) {
return Container(
padding: EdgeInsets.only(
top: AppPadding.safeAreaTop(context),
left: AppPadding.p20,
right: AppPadding.p20,
bottom: AppPadding.safeAreaBot(context),
),
child: Column(
children: [
const CustomAppBar(
text: "OTP Verification",
),
Expanded(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(
top: AppMargin.m12,
),
child: Center(
child: Image(
width: 267,
height: 243,
image: AssetImage(
Assets.verificationHeadImage,
),
),
),
),
Container(
margin: const EdgeInsets.only(
top: 40,
),
child: Text(
"Enter OTP",
style: getSemiBoldStyle(
color: Colors.black,
fontSize: FontSize.s22,
),
),
),
Container(
margin: EdgeInsets.only(
top: AppMargin.m4,
),
child: Text(
"An 4 digit code has been sent to +91 9995380399",
style: getMediumStyle(
color: ColorManager.grey,
),
),
),
const CountDownTimeOtp(),
Container(
margin: EdgeInsets.only(
top: AppMargin.m16,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
inputOtpMethod(
context,
otp1Controller,
),
inputOtpMethod(
context,
otp2Controller,
),
inputOtpMethod(
context,
otp3Controller,
),
inputOtpMethod(
context,
otp4Controller,
)
],
),
),
],
)),
)
],
),
);
}
Container inputOtpMethod(
BuildContext context, TextEditingController controller) {
return Container(
width: 67,
height: 67,
child: TextField(
autofocus: false,
textAlign: TextAlign.center,
keyboardType: TextInputType.number,
maxLength: 1,
enabled: !disabledInput,
cursorColor: Colors.black,
decoration: InputDecoration(
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
counterText: '',
hintStyle: const TextStyle(
color: Colors.black,
fontSize: 20.0,
),
filled: disabledInput,
fillColor: Colors.grey.withOpacity(0.8),
),
controller: controller,
onChanged: (value) {
setState(() {
finalText =
"${otp1Controller.text}${otp2Controller.text}${otp3Controller.text}${otp4Controller.text}";
if (finalText.length >= 4) {
setState(() {
disabledInput = true;
});
FocusScope.of(context).unfocus();
// TODO: KALAU DAH LENGKAP NGAPAIN
} else {
if (controller.text.isNotEmpty) {
FocusScope.of(context).nextFocus();
}
}
});
},
),
);
}
}
class CountDownTimeOtp extends StatelessWidget {
const CountDownTimeOtp({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
top: AppMargin.m6,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"00 :",
style: getRegularStyle(
color: ColorManager.primary,
fontSize: 20,
fontFamily: FontConstants.mulish,
),
),
Text(
" 02 :",
style: getRegularStyle(
color: ColorManager.primary,
fontSize: 20,
fontFamily: FontConstants.mulish,
),
),
Text(
" 59",
style: getRegularStyle(
color: ColorManager.primary,
fontSize: 20,
fontFamily: FontConstants.mulish,
),
)
],
),
);
}
}
// ignore_for_file: sized_box_for_whitespace
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/helper/components_widget/custom_appbar.dart';
import 'package:tour_travel_agr/helper/components_widget/password_input.dart';
import 'package:tour_travel_agr/helper/components_widget/widget_button.dart';
import 'package:tour_travel_agr/helper/components_widget/widget_text_field.dart';
import 'package:tour_travel_agr/helper/widget_responsive.dart';
import 'package:tour_travel_agr/resource/colors.dart';
import 'package:tour_travel_agr/resource/routes.dart';
import 'package:tour_travel_agr/resource/size.dart';
import 'package:tour_travel_agr/resource/style.dart';
class RegisterView extends StatefulWidget {
const RegisterView({super.key});
@override
State<RegisterView> createState() => _RegisterViewState();
}
class _RegisterViewState extends State<RegisterView> {
final TextEditingController nameController = TextEditingController();
final TextEditingController nikController = TextEditingController();
final TextEditingController noHpController = TextEditingController();
final TextEditingController passwordController = TextEditingController();
final TextEditingController confirmPasswordController =
TextEditingController();
bool isChecked = false;
bool buttonRregisterActive = false;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: ColorManager.backgroundColor,
body: ScreenResponsive(
widget: bodyWidget(context),
widthScreen: MediaQuery.of(context).size.width,
),
);
}
Container bodyWidget(BuildContext context) {
return Container(
padding: EdgeInsets.only(
top: AppPadding.safeAreaTop(context),
left: AppPadding.p20,
right: AppPadding.p20,
bottom: AppPadding.safeAreaBot(context),
),
child: Column(
children: [
const CustomAppBar(
text: "Register",
),
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
const SizedBox(
height: 12,
),
InputTextField(
controller: nameController,
labelText: "Nama Lengkap",
labelColor: ColorManager.primary,
borderSideActive: true,
hintText: "Nama anda",
),
InputTextField(
controller: nikController,
labelText: "NIK",
labelColor: ColorManager.primary,
borderSideActive: true,
hintText: "Nomor induk kependudukan",
marginTop: AppMargin.m12,
),
InputTextField(
controller: noHpController,
labelText: "Nomor Handphone",
labelColor: ColorManager.primary,
borderSideActive: true,
hintText: "628...",
marginTop: AppMargin.m12,
),
PasswordInput(
passwordController: passwordController,
labelColor: ColorManager.primary,
marginTop: 12,
borderSideActive: true,
),
PasswordInput(
passwordController: confirmPasswordController,
labelColor: ColorManager.primary,
marginTop: 12,
borderSideActive: true,
labelText: "Konfirmasi password",
),
Container(
margin: EdgeInsets.only(
top: AppMargin.m25,
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: 20,
height: 20,
child: Checkbox(
checkColor: Colors.white,
activeColor: ColorManager.primary,
value: isChecked,
onChanged: (bool? value) {
setState(() {
buttonRregisterActive = value!;
isChecked = value;
});
},
),
),
Expanded(
child: Container(
margin: const EdgeInsets.only(
left: 4,
),
child: Text(
"Dengan mendaftar layanan ini, anda menyetujui syarat & ketentuan yang berlaku",
style: getRegularStyle(
color: Colors.black,
fontSize: 12,
),
),
),
)
],
),
),
Container(
margin: EdgeInsets.only(
top: AppMargin.m25,
bottom: AppMargin.m20,
),
child: CustomButton(
text: "Register",
colorButton: buttonRregisterActive
? ColorManager.primary
: Colors.grey,
onTap: () {
if (buttonRregisterActive) {
// TODO:dosomething here
Navigator.pushNamed(
context, Routes.verificationRoute);
}
},
),
),
],
),
),
),
],
),
);
}
}
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/helper/widget_responsive.dart';
import 'package:tour_travel_agr/resource/assets.dart';
import 'package:tour_travel_agr/resource/colors.dart';
import 'package:tour_travel_agr/resource/font.dart';
import 'package:tour_travel_agr/resource/routes.dart';
import 'package:tour_travel_agr/resource/size.dart';
import 'package:tour_travel_agr/resource/style.dart';
class SplashView extends StatefulWidget {
const SplashView({super.key});
@override
State<SplashView> createState() => _SplashViewState();
}
class _SplashViewState extends State<SplashView> {
Timer? _timer;
_startDelay() {
_timer = Timer(const Duration(seconds: 2), _goNext);
}
_goNext() {
Navigator.pushNamed(context, Routes.loginRoute);
}
@override
void initState() {
super.initState();
_startDelay();
}
@override
void dispose() {
_timer?.cancel();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: ColorManager.backgroundColor,
body: ScreenResponsive(
widget: const BodyWidget(),
widthScreen: MediaQuery.of(context).size.width,
sideColor: Colors.white,
),
);
}
}
class BodyWidget extends StatelessWidget {
const BodyWidget({
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Stack(
children: [
Container(
decoration: BoxDecoration(
color: ColorManager.primary,
),
padding: EdgeInsets.only(
top: AppPadding.safeAreaTop(context),
left: AppPadding.p20,
right: AppPadding.p20,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Spacer(),
Center(
child: Image(
image: AssetImage(Assets.logoWhite),
),
),
const Spacer(),
Text(
"© 2023 PT. AGRINESIA RAYA",
style: getRegularStyle(
color: Colors.white,
fontFamily: FontConstants.hindMadurai,
fontSize: FontSize.s14,
),
),
SizedBox(
height: AppMargin.m16,
)
],
),
),
Positioned(
top: 0,
left: 0,
child: Image(
image: AssetImage(
Assets.elipse,
),
),
),
],
);
}
}
const String rootImage = "assets/images/";
class Assets {
static String logoWhite = "${rootImage}logo_white.png";
static String logoGreen = "${rootImage}logo_green.png";
static String elipse = "${rootImage}elipse.png";
static String verificationHeadImage = "${rootImage}otp_verification.png";
static String forgotPassword = "${rootImage}forgot_password.png";
}
import 'package:flutter/material.dart';
class ColorManager {
static Color backgroundColor = Colors.white;
static Color primary = const Color(0xff722570);
static Color link = const Color(0xff1868AB);
static Color grey = const Color(0xff595959);
}
import 'package:flutter/cupertino.dart';
class FontConstants {
static const String inter = "Inter";
static const String hindMadurai = "Hind Madurai";
static const String mulish = "Mulish";
}
class FontWeightManager {
static const FontWeight light = FontWeight.w300;
static const FontWeight regular = FontWeight.w400;
static const FontWeight medium = FontWeight.w500;
static const FontWeight semiBold = FontWeight.w600;
static const FontWeight bold = FontWeight.w700;
}
class FontSize {
static const double s12 = 12.0;
static const double s14 = 14.0;
static const double s16 = 16.0;
static const double s17 = 17.0;
static const double s18 = 18.0;
static const double s20 = 20.0;
static const double s22 = 22.0;
}
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/page/forgot_password/forgot_password.dart';
import 'package:tour_travel_agr/page/login/login.dart';
import 'package:tour_travel_agr/page/otp_verification/otp_verification.dart';
import 'package:tour_travel_agr/page/register/register.dart';
import 'package:tour_travel_agr/page/splash/splash.dart';
class Routes {
static const String splashRoute = "/";
static const String loginRoute = "/login";
static const String registerRoute = "/register";
static const String verificationRoute = "/verification";
static const String forgotPasswordRoute = "/forgot-password";
static const String resetPasswordRoute = "/reset-password";
static const String profileRoute = "/profile";
static const String reimburseRoute = "/reimbursement";
static const String historyRoute = "/history";
}
class RouteGenerator {
static Route<dynamic> getRoute(RouteSettings routeSettings) {
switch (routeSettings.name) {
case Routes.splashRoute:
return pageRouteCustom(const SplashView());
case Routes.loginRoute:
return pageRouteCustom(LoginView());
case Routes.registerRoute:
return pageRouteCustom(const RegisterView());
case Routes.verificationRoute:
return pageRouteCustom(const OtpVerificationView());
case Routes.forgotPasswordRoute:
return pageRouteCustom(const ForgotPasswordView());
default:
return unDefinedRoute();
}
}
static PageRouteBuilder<dynamic> pageRouteCustom(Widget target) {
return PageRouteBuilder(
pageBuilder: (context, a, b) => target,
transitionDuration: Duration.zero,
reverseTransitionDuration: Duration.zero,
);
}
static Route<dynamic> unDefinedRoute() {
return MaterialPageRoute(
builder: (_) => Scaffold(
appBar: AppBar(
title: const Text("No Route Found"),
),
body: const Center(
child: Text("No Route Found"),
),
),
);
}
}
import 'package:flutter/material.dart';
class AppPadding {
static double safeAreaTop(BuildContext context) {
return MediaQuery.of(context).padding.top;
}
static double safeAreaBot(BuildContext context) {
return MediaQuery.of(context).padding.bottom;
}
static double p12 = 12;
static double p20 = 20;
}
class AppMargin {
static double m4 = 4;
static double m6 = 6;
static double m8 = 8;
static double m10 = 10;
static double m12 = 12;
static double m16 = 16;
static double m20 = 20;
static double m25 = 25;
}
import 'package:flutter/material.dart';
import 'package:tour_travel_agr/resource/font.dart';
TextStyle _getStyle(
double fontSize, String fontFamily, FontWeight fontWeight, Color color) {
return TextStyle(
fontSize: fontSize,
fontFamily: fontFamily,
color: color,
fontWeight: fontWeight,
);
}
// regularStyle
TextStyle getLightStyle({
double fontSize = FontSize.s14,
String fontFamily = FontConstants.inter,
required Color color,
}) {
return _getStyle(
fontSize,
fontFamily,
FontWeightManager.light,
color,
);
}
// regularStyle
TextStyle getRegularStyle({
double fontSize = FontSize.s14,
String fontFamily = FontConstants.inter,
required Color color,
}) {
return _getStyle(
fontSize,
fontFamily,
FontWeightManager.regular,
color,
);
}
TextStyle getMediumStyle({
double fontSize = FontSize.s14,
String fontFamily = FontConstants.inter,
required Color color,
}) {
return _getStyle(
fontSize,
fontFamily,
FontWeightManager.medium,
color,
);
}
TextStyle getSemiBoldStyle({
double fontSize = FontSize.s14,
String fontFamily = FontConstants.inter,
required Color color,
}) {
return _getStyle(
fontSize,
fontFamily,
FontWeightManager.semiBold,
color,
);
}
TextStyle getBoldStyle({
double fontSize = FontSize.s14,
String fontFamily = FontConstants.inter,
required Color color,
}) {
return _getStyle(
fontSize,
fontFamily,
FontWeightManager.bold,
color,
);
}
flutter/ephemeral
# Project-level configuration.
cmake_minimum_required(VERSION 3.10)
project(runner LANGUAGES CXX)
# The name of the executable created for the application. Change this to change
# the on-disk name of your application.
set(BINARY_NAME "tour_travel_agr")
# The unique GTK application identifier for this application. See:
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
set(APPLICATION_ID "com.example.tour_agency")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.
cmake_policy(SET CMP0063 NEW)
# Load bundled libraries from the lib/ directory relative to the binary.
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
# Root filesystem for cross-building.
if(FLUTTER_TARGET_PLATFORM_SYSROOT)
set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
endif()
# Define build configuration options.
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "Debug" CACHE
STRING "Flutter build mode" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Profile" "Release")
endif()
# Compilation settings that should be applied to most targets.
#
# Be cautious about adding new options here, as plugins use this function by
# default. In most cases, you should add new options to specific targets instead
# of modifying this function.
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_14)
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
endfunction()
# Flutter library and tool build rules.
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
add_subdirectory(${FLUTTER_MANAGED_DIR})
# System-level dependencies.
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
# Define the application target. To change its name, change BINARY_NAME above,
# not the value here, or `flutter run` will no longer work.
#
# Any new source files that you add to the application should be added here.
add_executable(${BINARY_NAME}
"main.cc"
"my_application.cc"
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
)
# Apply the standard set of build settings. This can be removed for applications
# that need different build settings.
apply_standard_settings(${BINARY_NAME})
# Add dependency libraries. Add any application-specific dependencies here.
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
# Run the Flutter tool portions of the build. This must not be removed.
add_dependencies(${BINARY_NAME} flutter_assemble)
# Only the install-generated bundle's copy of the executable will launch
# correctly, since the resources must in the right relative locations. To avoid
# people trying to run the unbundled copy, put it in a subdirectory instead of
# the default top-level location.
set_target_properties(${BINARY_NAME}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
)
# Generated plugin build rules, which manage building the plugins and adding
# them to the application.
include(flutter/generated_plugins.cmake)
# === Installation ===
# By default, "installing" just makes a relocatable bundle in the build
# directory.
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
endif()
# Start with a clean build bundle directory every time.
install(CODE "
file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
" COMPONENT Runtime)
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
COMPONENT Runtime)
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
COMPONENT Runtime)
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
install(FILES "${bundled_library}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
endforeach(bundled_library)
# Fully re-copy the assets directory on each build to avoid having stale files
# from a previous install.
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
install(CODE "
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
" COMPONENT Runtime)
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
# Install the AOT library on non-Debug builds only.
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
endif()
# This file controls Flutter-level build steps. It should not be edited.
cmake_minimum_required(VERSION 3.10)
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
# Configuration provided via flutter tool.
include(${EPHEMERAL_DIR}/generated_config.cmake)
# TODO: Move the rest of this into files in ephemeral. See
# https://github.com/flutter/flutter/issues/57146.
# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
# which isn't available in 3.10.
function(list_prepend LIST_NAME PREFIX)
set(NEW_LIST "")
foreach(element ${${LIST_NAME}})
list(APPEND NEW_LIST "${PREFIX}${element}")
endforeach(element)
set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
endfunction()
# === Flutter Library ===
# System-level dependencies.
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
# Published to parent scope for install step.
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
list(APPEND FLUTTER_LIBRARY_HEADERS
"fl_basic_message_channel.h"
"fl_binary_codec.h"
"fl_binary_messenger.h"
"fl_dart_project.h"
"fl_engine.h"
"fl_json_message_codec.h"
"fl_json_method_codec.h"
"fl_message_codec.h"
"fl_method_call.h"
"fl_method_channel.h"
"fl_method_codec.h"
"fl_method_response.h"
"fl_plugin_registrar.h"
"fl_plugin_registry.h"
"fl_standard_message_codec.h"
"fl_standard_method_codec.h"
"fl_string_codec.h"
"fl_value.h"
"fl_view.h"
"flutter_linux.h"
)
list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
add_library(flutter INTERFACE)
target_include_directories(flutter INTERFACE
"${EPHEMERAL_DIR}"
)
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
target_link_libraries(flutter INTERFACE
PkgConfig::GTK
PkgConfig::GLIB
PkgConfig::GIO
)
add_dependencies(flutter flutter_assemble)
# === Flutter tool backend ===
# _phony_ is a non-existent file to force this command to run every time,
# since currently there's no way to get a full input/output list from the
# flutter tool.
add_custom_command(
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/_phony_
COMMAND ${CMAKE_COMMAND} -E env
${FLUTTER_TOOL_ENVIRONMENT}
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
VERBATIM
)
add_custom_target(flutter_assemble DEPENDS
"${FLUTTER_LIBRARY}"
${FLUTTER_LIBRARY_HEADERS}
)
//
// Generated file. Do not edit.
//
// clang-format off
#include "generated_plugin_registrant.h"
void fl_register_plugins(FlPluginRegistry* registry) {
}
//
// Generated file. Do not edit.
//
// clang-format off
#ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_
#include <flutter_linux/flutter_linux.h>
// Registers Flutter plugins.
void fl_register_plugins(FlPluginRegistry* registry);
#endif // GENERATED_PLUGIN_REGISTRANT_
#
# Generated file, do not edit.
#
list(APPEND FLUTTER_PLUGIN_LIST
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES)
foreach(plugin ${FLUTTER_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin)
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment