Commit c6d97df5 authored by Karunarathna K.M.D.Y.K's avatar Karunarathna K.M.D.Y.K

Merge branch 'IT19975146' into 'master'

It19975146

See merge request !2
parents 2a73121e fe4808b7
This diff is collapsed.
IC
\ No newline at end of file
# 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: b06b8b2710955028a6b562f5aa6fe62941d6febf
channel: stable
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
- platform: android
create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
- platform: ios
create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
- platform: linux
create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
- platform: macos
create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
- platform: web
create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
- platform: windows
create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
# 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'
# 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: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.coda.govimithura"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation platform('com.google.firebase:firebase-bom:31.2.3')
}
{
"project_info": {
"project_number": "200276878285",
"project_id": "govi-mithura-412b5",
"storage_bucket": "govi-mithura-412b5.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:200276878285:android:f1de8056b0f201cfd55a84",
"android_client_info": {
"package_name": "com.coda.govimithura"
}
},
"oauth_client": [
{
"client_id": "200276878285-45csaf5hvfhn5q2fasuk7afpvdpoajoh.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBx9jyMkP8KrCyTqNZuPtrWKyZrr4upjbw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "200276878285-45csaf5hvfhn5q2fasuk7afpvdpoajoh.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.coda.govimithura">
<!-- 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.coda.govimithura">
<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_FINE_LOCATION"/>
<application
android:label="Govimithura"
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>
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
<!-- 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.coda.govimithura
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.coda.govimithura">
<!-- 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.7.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.15'
}
}
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.5-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"
<?xml version="1.0" encoding="utf-8"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 1024 1024" fill="#000000" class="icon" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M598.672 109.44a229.52 229.52 0 0 0 26.496-7.216 180.848 180.848 0 0 0-35.168-28.288c3.264 11.136 6.144 23.04 8.672 35.504zM471.904 70.496c-13.856 7.536-27.2 17.776-39.856 30.48 8.768 3.184 18.864 6.08 30.176 8.448a413.12 413.12 0 0 1 9.68-38.928zM476.912 320.08c16.064 2.512 34 4.048 53.552 4.048s37.472-1.536 53.536-4.048a1545.728 1545.728 0 0 0-1.872-74.592 437.088 437.088 0 0 1-103.344 0 1505.568 1505.568 0 0 0-1.872 74.592zM378.256 177.264c11.344 11.536 36 23.456 70.992 31.088a977.44 977.44 0 0 1 7.488-67.328c-17.216-3.488-33.104-8.272-46.848-14.304a355.728 355.728 0 0 0-31.632 50.544zM572.464 449.68c2.896-10 5.792-20.048 8.816-29.6 1.216-21.248 2.064-43.776 2.448-67.632a391.68 391.68 0 0 1-53.28 3.664c-18.016 0-36.032-1.28-53.296-3.664 0.528 33.376 1.968 64.176 4.08 92.448l1.136 3.952c14.656 2.032 30.688 3.264 48.064 3.264a351.04 351.04 0 0 0 42.032-2.432zM530.096 657.648a1378.624 1378.624 0 0 1 33.344-174.896c-10.88 0.896-21.936 1.376-32.992 1.376-13.008 0-26-0.704-38.736-1.952 13.536 51.504 24.736 108.176 32.816 170.144 1.968 2.608 3.84 4.528 5.568 5.328zM647.376 128.352c-12.88 5.28-27.52 9.504-43.216 12.672a977.44 977.44 0 0 1 7.488 67.328c31.92-6.96 55.232-17.488 67.696-28.032a362.8 362.8 0 0 0-31.968-51.968zM480.784 213.632c15.28 1.84 31.872 2.912 49.68 2.912a415.68 415.68 0 0 0 49.664-2.912 876.336 876.336 0 0 0-7.728-67.776c-13.744 1.456-27.84 2.272-41.936 2.272s-28.192-0.8-41.952-2.272a876.336 876.336 0 0 0-7.728 67.776zM566.752 114.256c-5.28-25.04-11.168-43.408-16.816-56.496a109.472 109.472 0 0 0-21.92-2.256c-5.632 0-11.2 0.576-16.72 1.44-5.744 13.12-11.776 31.776-17.168 57.312a354.528 354.528 0 0 0 72.624 0zM444.912 313.088a1588.32 1588.32 0 0 1 2.208-72.72c-23.056-4.704-44.224-11.44-61.632-20.08a935.728 935.728 0 0 1 45.36 88.272c4.32 1.6 9.072 3.104 14.064 4.528zM622.384 311.168a916.416 916.416 0 0 1 43.232-85.616l0.672-1.12c-15.504 6.672-33.328 12.032-52.528 15.952 1.536 28.432 2.08 53.888 2.208 72.72 2.208-0.64 4.352-1.28 6.416-1.936zM362.448 210.944c-2.48-4.016-4.96-8.032-7.44-11.904a827.616 827.616 0 0 0-12.4-18.72c-38-55.552-74.4-93.328-99.776-116.112 39.888 89.536 58.304 268.592 66.544 391.248 4.688 69.856 6.08 121.488 6.24 127.712 6.352 98.832 23.216 171.712 44.816 225.648 5.92 14.768 12.16 28.144 18.672 40.176 0.352 0.656 0.688 1.36 1.04 2 0.224 0.432 0.464 0.832 0.704 1.248 50.624 91.296 114.832 106.176 138.464 108.464-2.928-66.448-2.64-128.688 0.464-186.608a1623.072 1623.072 0 0 0-7.52-90.336c-8.368-76.08-21.392-143.824-37.264-203.632a1147.744 1147.744 0 0 0-9.616-34.128 1135.392 1135.392 0 0 0-19.296-59.52 1021.92 1021.92 0 0 0-17.296-44.64 971.904 971.904 0 0 0-19.008-43.232 887.712 887.712 0 0 0-33.088-64.048c-4.752-8.24-9.504-15.936-14.24-23.616zM573.024 510.848a1341.504 1341.504 0 0 0-20.496 103.584 1466.96 1466.96 0 0 0-9.68 72.784c-3.04 28.192-5.424 57.472-7.056 87.872a1887.2 1887.2 0 0 0-0.624 185.76l1.12-0.112c38.144-3.696 182.016-40.144 203.696-377.872 0.144-6.208 1.584-59.456 6.464-131.136 8.336-122.224 26.72-298.176 66.064-386.976-23.536 21.408-56.48 55.76-91.504 105.424a792.624 792.624 0 0 0-24.944 37.632c-0.752 1.216-1.52 2.368-2.272 3.616a902.064 902.064 0 0 0-48.768 90.624c-6.176 13.184-12.208 27.04-18.144 41.376a1112.512 1112.512 0 0 0-46.32 137.488c-2.608 9.76-5.104 19.792-7.536 29.936z" /></svg>
\ No newline at end of file
**/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>Govimithura</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>govimithura</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"
class Images {
static const logo = 'assets/images/logo.png';
static const defaultAvatar =
'https://firebasestorage.googleapis.com/v0/b/govi-mithura-412b5.appspot.com/o/profileImages%2Fuser.png?alt=media&token=4687627a-c350-4f45-b31b-ce764f6dd55d';
}
class PostStatus {
static const String all = "All";
static const String pending = "Pending";
static const String approved = "Approved";
static const String rejected = "Rejected";
}
class PostType {
static const String pestControlMethod = "PEST_CONTROL_METHOD";
}
class StorageKeys {
static const userType = 'USER_TYPE';
}
class UserType {
static const String admin = "ADMIN";
static const String user = "USER";
}
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:govimithura/Theme/theme_constant.dart';
import 'package:govimithura/providers/providers.dart';
import 'package:provider/provider.dart';
import 'screens/splash_screen.dart';
import 'theme/theme_manager.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(
MultiProvider(
providers: providers,
child: const MyApp(),
),
);
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Govimithura',
debugShowCheckedModeBanner: false,
theme: lightTheme,
darkTheme: darkTheme,
themeMode: Provider.of<ThemeManager>(context).themeMode,
home: const SplashScreen(),
);
}
}
import 'package:provider/provider.dart';
import 'package:provider/single_child_widget.dart';
import '../theme/theme_manager.dart';
List<SingleChildWidget> providers = [
ChangeNotifierProvider<ThemeManager>(
create: (_) => ThemeManager(),
),
];
import 'package:flutter/material.dart';
import 'package:govimithura/constants/user_types.dart';
import 'package:govimithura/providers/authentication_provider.dart';
import 'package:govimithura/screens/admin_home.dart';
import 'package:govimithura/screens/home.dart';
import 'package:govimithura/screens/login.dart';
import 'package:govimithura/widgets/utils/common_widget.dart';
import 'package:provider/provider.dart';
import '../utils/screen_size.dart';
class SplashScreen extends StatefulWidget {
const SplashScreen({super.key});
@override
State<SplashScreen> createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
late AuthenticationProvider pAuthentication;
@override
void initState() {
super.initState();
pAuthentication =
Provider.of<AuthenticationProvider>(context, listen: false);
Future.delayed(const Duration(seconds: 3), () async {
await pAuthentication.getCurentUserModel();
if (mounted) {
Navigator.pushReplacement(
context,
MaterialPageRoute(builder: (context) {
if (pAuthentication.isLoggedIn()) {
if (pAuthentication.authModel.userType == UserType.admin) {
return const AdminHome();
} else {
return const Home();
}
} else {
return const LoginScreen();
}
}),
);
}
});
}
@override
Widget build(BuildContext context) {
ScreenSize.init(context);
ThemeData theme = Theme.of(context);
return Scaffold(
backgroundColor: theme.primaryColor,
body: const Center(
child: Logo(),
),
);
}
}
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
const Color primaryColor = Colors.green;
ThemeData lightTheme = ThemeData(
textTheme: GoogleFonts.latoTextTheme(),
brightness: Brightness.light,
primaryTextTheme: const TextTheme(),
colorScheme: const ColorScheme.light(
primary: primaryColor,
),
appBarTheme: const AppBarTheme(
backgroundColor: primaryColor,
elevation: 0,
iconTheme: IconThemeData(
color: Colors.white,
),
titleTextStyle: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 20,
),
),
drawerTheme: const DrawerThemeData(
elevation: 0,
backgroundColor: Colors.white,
endShape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(20),
bottomRight: Radius.circular(20),
),
),
),
floatingActionButtonTheme: const FloatingActionButtonThemeData(
backgroundColor: primaryColor,
foregroundColor: Colors.white,
),
primaryColor: primaryColor,
bottomNavigationBarTheme: const BottomNavigationBarThemeData(
backgroundColor: Colors.white,
selectedItemColor: primaryColor,
unselectedItemColor: Colors.black,
selectedIconTheme: IconThemeData(
color: primaryColor,
),
unselectedIconTheme: IconThemeData(
color: Colors.black,
),
selectedLabelStyle: TextStyle(
fontWeight: FontWeight.w600,
),
unselectedLabelStyle: TextStyle(
fontWeight: FontWeight.w600,
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.fromLTRB(30, 15, 30, 15),
textStyle: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
backgroundColor: primaryColor,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(20),
bottomRight: Radius.circular(20),
),
),
),
),
inputDecorationTheme: InputDecorationTheme(
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
),
focusColor: primaryColor,
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: const BorderSide(color: primaryColor),
),
),
);
ThemeData darkTheme = ThemeData(
brightness: Brightness.dark,
);
import 'package:flutter/material.dart';
class ThemeManager with ChangeNotifier {
ThemeMode _themeMode = ThemeMode.light;
get themeMode => _themeMode;
toggleTheme(bool isDark) {
_themeMode = isDark ? ThemeMode.dark : ThemeMode.light;
notifyListeners();
}
}
import 'package:flutter/material.dart';
class LoadingOverlay {
BuildContext _context;
void hide() {
Navigator.of(_context).pop();
}
void show() {
showDialog(
barrierDismissible: false,
context: _context,
useSafeArea: false,
builder: (BuildContext context) {
return _FullScreenLoader();
},
);
}
Future<T> during<T>(Future<T> future) {
show();
return future.whenComplete(() => hide());
}
LoadingOverlay._create(this._context);
factory LoadingOverlay.of(BuildContext context) {
return LoadingOverlay._create(context);
}
}
class _FullScreenLoader extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
width: 250,
decoration: const BoxDecoration(
color: Color.fromRGBO(0, 0, 0, 0.5),
),
child: const Center(
child: CircularProgressIndicator(),
),
);
}
}
import 'package:flutter/material.dart';
class ScreenSize {
static double _width = 0;
static double _height = 0;
static double _appBarHeight = 0;
static double get width => _width;
static double get height => _height;
static double get appBarHeight => _appBarHeight;
static init(BuildContext context) {
_width = MediaQuery.of(context).size.width;
_height = MediaQuery.of(context).size.height;
}
static initAppBarHeight(AppBar appBar) {
_appBarHeight = appBar.preferredSize.height;
}
}
import 'package:flutter/material.dart';
import 'package:govimithura/widgets/utils/buttons/custom_elevated_button.dart';
class Utils {
static void showSnackBar(BuildContext context, String message) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(reBuildExceptionMessage(message)),
duration: const Duration(seconds: 5),
),
);
}
static void showDialogBox(BuildContext context, String message) {
showDialog(
barrierDismissible: false,
context: context,
builder: (context) {
return AlertDialog(
title: const Text('Alert !'),
content: Text(message),
actions: [
CustomElevatedButton(
text: 'OK',
onPressed: () {
Navigator.pop(context);
})
],
);
});
}
static String toSnakeCase(String text) {
return text.split(' ').map((e) => e.toLowerCase()).toList().join('_');
}
static String getAgoTime(DateTime dateTime) {
Duration duration = DateTime.now().difference(dateTime);
if (duration.inDays > 365) {
return '${(duration.inDays / 365).floor()} years ago';
} else if (duration.inDays > 30) {
return '${(duration.inDays / 30).floor()} months ago';
} else if (duration.inDays > 0) {
return '${duration.inDays} days ago';
} else if (duration.inHours > 0) {
return '${duration.inHours} hours ago';
} else if (duration.inMinutes > 0) {
return '${duration.inMinutes} minutes ago';
} else {
return 'Just now';
}
}
static String getFormattedDateTime(DateTime dateTime) {
return '${dateTime.year}-${dateTime.month.toString().padLeft(2, '0')}-${dateTime.day.toString().padLeft(2, '0')} ${dateTime.hour.toString().padLeft(2, '0')}:${dateTime.minute.toString().padLeft(2, '0')}:${dateTime.second.toString().padLeft(2, '0')}';
}
static String reBuildExceptionMessage(String message) {
if (message.startsWith("Exception:")) {
return message.substring(11, message.length - 1);
}
return message;
}
}
import 'package:flutter/material.dart';
class CustomElevatedButton extends StatelessWidget {
final String text;
final VoidCallback onPressed;
const CustomElevatedButton(
{super.key, required this.text, required this.onPressed});
@override
Widget build(BuildContext context) {
ThemeData theme = Theme.of(context);
return ElevatedButton(
onPressed: onPressed,
style: theme.elevatedButtonTheme.style,
child: Text(text),
);
}
}
import 'package:flutter/material.dart';
import 'package:govimithura/constants/post_status.dart';
import 'package:govimithura/utils/screen_size.dart';
import '../../constants/images.dart';
class Logo extends StatelessWidget {
const Logo({
super.key,
});
@override
Widget build(BuildContext context) {
return Container(
height: 200,
width: 200,
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(20),
topLeft: Radius.circular(20),
),
image: DecorationImage(
image: AssetImage(Images.logo),
fit: BoxFit.cover,
),
),
);
}
}
class LogoText extends StatelessWidget {
const LogoText({
super.key,
});
@override
Widget build(BuildContext context) {
return SizedBox(
width: ScreenSize.width,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: 100,
width: 100,
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(
bottomRight: Radius.circular(30),
topLeft: Radius.circular(30),
),
image: DecorationImage(
image: AssetImage(Images.logo),
fit: BoxFit.cover,
),
),
),
spacingWidget(10, SpaceDirection.horizontal),
Text(
"Govi Mithura",
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.w600,
),
)
],
),
);
}
}
enum SpaceDirection { horizontal, vertical }
Widget spacingWidget(double size, SpaceDirection direction) {
return direction == SpaceDirection.horizontal
? SizedBox(width: size)
: SizedBox(height: size);
}
Widget confirmationDialog(BuildContext context,
{required String title,
void Function()? yesFunction,
String additionalText = ""}) {
return AlertDialog(
title: Text(title),
content: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (additionalText.isNotEmpty)
Text(
additionalText,
style: const TextStyle(fontSize: 18),
),
const Text(
"Are you sure ",
style: TextStyle(fontSize: 18),
),
],
),
actions: [
TextButton(
onPressed: yesFunction,
child: const Text("Yes"),
),
TextButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text("No"),
),
],
);
}
class SlidePageRoute extends PageRouteBuilder {
final Widget page;
SlidePageRoute({required this.page})
: super(
pageBuilder: (_, __, ___) => page,
transitionsBuilder: (_, animation, __, child) => SlideTransition(
position: Tween<Offset>(
begin: const Offset(1.0, 0.0),
end: Offset.zero,
).animate(animation),
child: child,
),
);
}
Widget postStatus(String status) {
Color color = Colors.green;
if (status == PostStatus.pending) {
color = Colors.orange;
}
if (status == PostStatus.rejected) {
color = Colors.red;
}
return Row(
children: [
const Text(
"Status: ",
style: TextStyle(fontWeight: FontWeight.bold),
),
Container(
padding: const EdgeInsets.all(5),
decoration: BoxDecoration(
color: color,
borderRadius: BorderRadius.circular(5),
),
child: Text(
status,
style: const TextStyle(color: Colors.white),
),
),
],
);
}
import 'package:flutter/material.dart';
class CustomAssetImage extends StatelessWidget {
final String assetName;
final BoxFit fit;
const CustomAssetImage(
{super.key, required this.assetName, this.fit = BoxFit.cover});
@override
Widget build(BuildContext context) {
return Image.asset(
"assets/images/$assetName",
fit: fit,
);
}
}
import 'package:flutter/material.dart';
class PrimaryTextField extends StatefulWidget {
final Function(String)? onChanged;
final String hintText;
final Widget? prefixIcon;
final Widget? suffixIcon;
final String? Function(String?)? validator;
final int maxLines;
final bool isPassword;
final String? initialValue;
final String? label;
final TextEditingController? controller;
final Function()? onTap;
final bool isFilled;
const PrimaryTextField({
super.key,
this.onChanged,
this.hintText = "",
this.prefixIcon,
this.suffixIcon,
this.validator,
this.maxLines = 1,
this.isPassword = false,
this.initialValue,
this.label,
this.controller,
this.onTap,
this.isFilled = false,
});
@override
State<PrimaryTextField> createState() => _PrimaryTextFieldState();
}
class _PrimaryTextFieldState extends State<PrimaryTextField> {
@override
Widget build(BuildContext context) {
InputDecorationTheme inputDecorationTheme =
Theme.of(context).inputDecorationTheme;
return TextFormField(
onTap: widget.onTap,
initialValue: widget.initialValue,
controller: widget.controller,
maxLines: widget.maxLines,
onChanged: widget.onChanged,
validator: widget.validator,
obscureText: widget.isPassword,
decoration: InputDecoration(
filled: widget.isFilled,
label: widget.label != null ? Text(widget.label!) : null,
border:
widget.isFilled ? InputBorder.none : inputDecorationTheme.border,
focusedBorder: widget.isFilled
? InputBorder.none
: inputDecorationTheme.focusedBorder,
hintText: widget.hintText,
prefixIcon: widget.prefixIcon,
suffixIcon: widget.suffixIcon,
focusColor: inputDecorationTheme.focusColor,
),
);
}
}
This diff is collapsed.
name: govimithura
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
environment:
sdk: '>=2.19.0 <3.0.0'
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
provider: ^6.0.5
flutter_svg: ^2.0.4
image_picker: ^0.8.7
image_cropper: ^3.0.1
charts_flutter_new: ^0.12.0
flutter_rating_bar: ^4.0.1
firebase_core: ^2.8.0
firebase_auth: ^4.3.0
cloud_firestore: ^4.4.5
http: ^0.13.5
geolocator: ^9.0.2
geocoding: ^2.1.0
shared_preferences: ^2.0.20
dio: ^5.1.1
google_fonts: ^4.0.3
firebase_storage: ^11.1.0
dev_dependencies:
flutter_test:
sdk: flutter
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
assets:
- assets/images/
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility in the flutter_test package. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:govimithura/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MyApp());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}
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