diff --git a/.idea/LibraryAppFlutter.iml b/.idea/LibraryAppFlutter.iml
index 9d377e0..565d22c 100644
--- a/.idea/LibraryAppFlutter.iml
+++ b/.idea/LibraryAppFlutter.iml
@@ -36,6 +36,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml
index b8ce787..5c5a0b5 100644
--- a/.idea/libraries/Dart_SDK.xml
+++ b/.idea/libraries/Dart_SDK.xml
@@ -1,25 +1,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml
index 27197a0..62c263e 100644
--- a/.idea/libraries/Flutter_Plugins.xml
+++ b/.idea/libraries/Flutter_Plugins.xml
@@ -1,56 +1,54 @@
-
-
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/other.xml b/.idea/other.xml
new file mode 100644
index 0000000..0d3a1fb
--- /dev/null
+++ b/.idea/other.xml
@@ -0,0 +1,263 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 35eb1dd..41611c9 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -2,5 +2,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/android/build.gradle b/android/build.gradle
index 1f94b9d..c2a0e92 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -2,7 +2,7 @@ group 'com.assecont.servicos.assecontservices'
version '1.0-SNAPSHOT'
buildscript {
- ext.kotlin_version = '1.8.10'
+ ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
@@ -27,6 +27,7 @@ apply plugin: 'kotlin-android'
android {
compileSdkVersion 34
+ namespace "com.assecont.servicos.assecontservices"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
diff --git a/example/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
rename from example/android/gradle/wrapper/gradle-wrapper.jar
rename to android/gradle/wrapper/gradle-wrapper.jar
diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
similarity index 79%
rename from example/android/gradle/wrapper/gradle-wrapper.properties
rename to android/gradle/wrapper/gradle-wrapper.properties
index 562c5e4..3c472b9 100644
--- a/example/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
diff --git a/example/android/gradlew b/android/gradlew
similarity index 100%
rename from example/android/gradlew
rename to android/gradlew
diff --git a/example/android/gradlew.bat b/android/gradlew.bat
similarity index 100%
rename from example/android/gradlew.bat
rename to android/gradlew.bat
diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml
index a4cab34..dce34f9 100644
--- a/android/src/main/AndroidManifest.xml
+++ b/android/src/main/AndroidManifest.xml
@@ -1,5 +1,4 @@
-
+
diff --git a/example/.gitignore b/example/.gitignore
deleted file mode 100644
index a1345d0..0000000
--- a/example/.gitignore
+++ /dev/null
@@ -1,45 +0,0 @@
-# Miscellaneous
-*.class
-*.log
-*.pyc
-*.swp
-.DS_Store
-.atom/
-.buildlog/
-.history
-.svn/
-
-# 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/
-
-# Web related
-
-# 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
diff --git a/example/README.md b/example/README.md
deleted file mode 100644
index df90942..0000000
--- a/example/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# assecontservices_example
-
-Demonstrates how to use the assecontservices plugin.
-
-## 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://flutter.dev/docs/get-started/codelab)
-- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
-
-For help getting started with Flutter, view our
-[online documentation](https://flutter.dev/docs), which offers tutorials,
-samples, guidance on mobile development, and a full API reference.
diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml
deleted file mode 100644
index 61b6c4d..0000000
--- a/example/analysis_options.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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
diff --git a/example/android/.gitignore b/example/android/.gitignore
deleted file mode 100644
index 6f56801..0000000
--- a/example/android/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-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
diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml
deleted file mode 100644
index 2516d50..0000000
--- a/example/android/app/src/debug/AndroidManifest.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 0cc6851..0000000
--- a/example/android/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
deleted file mode 100644
index 8ed39f6..0000000
--- a/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package io.flutter.plugins;
-
-import androidx.annotation.Keep;
-import androidx.annotation.NonNull;
-import io.flutter.Log;
-
-import io.flutter.embedding.engine.FlutterEngine;
-
-/**
- * Generated file. Do not edit.
- * This file is generated by the Flutter tool based on the
- * plugins that support the Android platform.
- */
-@Keep
-public final class GeneratedPluginRegistrant {
- private static final String TAG = "GeneratedPluginRegistrant";
- public static void registerWith(@NonNull FlutterEngine flutterEngine) {
- try {
- flutterEngine.getPlugins().add(new com.assecont.servicos.assecontservices.AssecontservicesPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin assecontservices, com.assecont.servicos.assecontservices.AssecontservicesPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.connectivity.ConnectivityPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin connectivity_plus, dev.fluttercommunity.plus.connectivity.ConnectivityPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new com.pinciat.external_path.ExternalPathPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin external_path, com.pinciat.external_path.ExternalPathPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new com.afur.flutter_html_to_pdf.FlutterHtmlToPdfPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin flutter_html_to_pdf, com.afur.flutter_html_to_pdf.FlutterHtmlToPdfPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin flutter_plugin_android_lifecycle, io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new com.baseflow.geocoding.GeocodingPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin geocoding_android, com.baseflow.geocoding.GeocodingPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new io.flutter.plugins.googlemaps.GoogleMapsPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin google_maps_flutter_android, io.flutter.plugins.googlemaps.GoogleMapsPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new io.flutter.plugins.imagepicker.ImagePickerPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin image_picker_android, io.flutter.plugins.imagepicker.ImagePickerPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new dev.britannio.in_app_review.InAppReviewPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin in_app_review, dev.britannio.in_app_review.InAppReviewPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new com.iyaffle.launchreview.LaunchReviewPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin launch_review, com.iyaffle.launchreview.LaunchReviewPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new io.flutter.plugins.localauth.LocalAuthPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin local_auth_android, io.flutter.plugins.localauth.LocalAuthPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new com.lyokone.location.LocationPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin location, com.lyokone.location.LocationPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.packageinfo.PackageInfoPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin package_info_plus, dev.fluttercommunity.plus.packageinfo.PackageInfoPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin path_provider_android, io.flutter.plugins.pathprovider.PathProviderPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new com.xamdesign.safe_device.SafeDevicePlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin safe_device, com.xamdesign.safe_device.SafeDevicePlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new com.zt.shareextend.ShareExtendPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin share_extend, com.zt.shareextend.ShareExtendPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin shared_preferences_android, io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new com.tekartik.sqflite.SqflitePlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin sqflite, com.tekartik.sqflite.SqflitePlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new com.syncfusion.flutter.pdfviewer.SyncfusionFlutterPdfViewerPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin syncfusion_flutter_pdfviewer, com.syncfusion.flutter.pdfviewer.SyncfusionFlutterPdfViewerPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new com.wongpiwat.trust_location.TrustLocationPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin trust_location, com.wongpiwat.trust_location.TrustLocationPlugin", e);
- }
- try {
- flutterEngine.getPlugins().add(new io.flutter.plugins.urllauncher.UrlLauncherPlugin());
- } catch (Exception e) {
- Log.e(TAG, "Error registering plugin url_launcher_android, io.flutter.plugins.urllauncher.UrlLauncherPlugin", e);
- }
- }
-}
diff --git a/example/android/app/src/main/kotlin/com/assecont/servicos/assecontservices_example/MainActivity.kt b/example/android/app/src/main/kotlin/com/assecont/servicos/assecontservices_example/MainActivity.kt
deleted file mode 100644
index 0696e96..0000000
--- a/example/android/app/src/main/kotlin/com/assecont/servicos/assecontservices_example/MainActivity.kt
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.assecont.servicos.assecontservices_example
-
-import io.flutter.embedding.android.FlutterActivity
-
-class MainActivity: FlutterActivity() {
-}
diff --git a/example/android/app/src/main/res/drawable-v21/launch_background.xml b/example/android/app/src/main/res/drawable-v21/launch_background.xml
deleted file mode 100644
index f74085f..0000000
--- a/example/android/app/src/main/res/drawable-v21/launch_background.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/example/android/app/src/main/res/values-night/styles.xml b/example/android/app/src/main/res/values-night/styles.xml
deleted file mode 100644
index 3db14bb..0000000
--- a/example/android/app/src/main/res/values-night/styles.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml
deleted file mode 100644
index d460d1e..0000000
--- a/example/android/app/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
diff --git a/example/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml
deleted file mode 100644
index 2516d50..0000000
--- a/example/android/app/src/profile/AndroidManifest.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
diff --git a/example/android/assecontservices_example_android.iml b/example/android/assecontservices_example_android.iml
deleted file mode 100644
index 1899969..0000000
--- a/example/android/assecontservices_example_android.iml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/android/local.properties b/example/android/local.properties
deleted file mode 100644
index b7eb155..0000000
--- a/example/android/local.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-sdk.dir=C:\\Users\\gabri\\AppData\\Local\\Android\\sdk
-flutter.sdk=C:\\SDK\\flutter
-flutter.buildMode=debug
-flutter.versionName=3.1.2
-flutter.versionCode=1
\ No newline at end of file
diff --git a/example/android/settings.gradle b/example/android/settings.gradle
deleted file mode 100644
index 44e62bc..0000000
--- a/example/android/settings.gradle
+++ /dev/null
@@ -1,11 +0,0 @@
-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"
diff --git a/example/assets/imagens/DOWN1.png b/example/assets/imagens/DOWN1.png
deleted file mode 100644
index 7e8c10c..0000000
Binary files a/example/assets/imagens/DOWN1.png and /dev/null differ
diff --git a/example/assets/imagens/LOGO_ASSECONT.png b/example/assets/imagens/LOGO_ASSECONT.png
deleted file mode 100644
index c457bce..0000000
Binary files a/example/assets/imagens/LOGO_ASSECONT.png and /dev/null differ
diff --git a/example/assets/imagens/assecont.png b/example/assets/imagens/assecont.png
deleted file mode 100644
index b6971a8..0000000
Binary files a/example/assets/imagens/assecont.png and /dev/null differ
diff --git a/example/assets/imagens/bompacredito.jpg b/example/assets/imagens/bompacredito.jpg
deleted file mode 100644
index 2b64edc..0000000
Binary files a/example/assets/imagens/bompacredito.jpg and /dev/null differ
diff --git a/example/assets/imagens/check.png b/example/assets/imagens/check.png
deleted file mode 100644
index 26073fa..0000000
Binary files a/example/assets/imagens/check.png and /dev/null differ
diff --git a/example/assets/imagens/dispo.png b/example/assets/imagens/dispo.png
deleted file mode 100644
index a2a06a5..0000000
Binary files a/example/assets/imagens/dispo.png and /dev/null differ
diff --git a/example/assets/imagens/email.png b/example/assets/imagens/email.png
deleted file mode 100644
index c9f379f..0000000
Binary files a/example/assets/imagens/email.png and /dev/null differ
diff --git a/example/assets/imagens/ic_launcher.png b/example/assets/imagens/ic_launcher.png
deleted file mode 100644
index 2faeb6e..0000000
Binary files a/example/assets/imagens/ic_launcher.png and /dev/null differ
diff --git a/example/assets/imagens/ic_sendM4.png b/example/assets/imagens/ic_sendM4.png
deleted file mode 100644
index 1aa7daf..0000000
Binary files a/example/assets/imagens/ic_sendM4.png and /dev/null differ
diff --git a/example/assets/imagens/logo-assepontoweb.png b/example/assets/imagens/logo-assepontoweb.png
deleted file mode 100644
index 8e5516d..0000000
Binary files a/example/assets/imagens/logo-assepontoweb.png and /dev/null differ
diff --git a/example/assets/imagens/logo-asseweb.png b/example/assets/imagens/logo-asseweb.png
deleted file mode 100644
index 37010a4..0000000
Binary files a/example/assets/imagens/logo-asseweb.png and /dev/null differ
diff --git a/example/assets/imagens/logo.png b/example/assets/imagens/logo.png
deleted file mode 100644
index 13ee643..0000000
Binary files a/example/assets/imagens/logo.png and /dev/null differ
diff --git a/example/assets/imagens/logo_assepontoweb.png b/example/assets/imagens/logo_assepontoweb.png
deleted file mode 100644
index 786b940..0000000
Binary files a/example/assets/imagens/logo_assepontoweb.png and /dev/null differ
diff --git a/example/assets/imagens/pending.png b/example/assets/imagens/pending.png
deleted file mode 100644
index 41b1f5b..0000000
Binary files a/example/assets/imagens/pending.png and /dev/null differ
diff --git a/example/assets/imagens/sms.png b/example/assets/imagens/sms.png
deleted file mode 100644
index 1bf1cc3..0000000
Binary files a/example/assets/imagens/sms.png and /dev/null differ
diff --git a/example/assets/imagens/visualizado.png b/example/assets/imagens/visualizado.png
deleted file mode 100644
index c562be1..0000000
Binary files a/example/assets/imagens/visualizado.png and /dev/null differ
diff --git a/example/ios/.gitignore b/example/ios/.gitignore
deleted file mode 100644
index 7a7f987..0000000
--- a/example/ios/.gitignore
+++ /dev/null
@@ -1,34 +0,0 @@
-**/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
diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig
deleted file mode 100644
index 592ceee..0000000
--- a/example/ios/Flutter/Debug.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-#include "Generated.xcconfig"
diff --git a/example/ios/Flutter/Generated.xcconfig b/example/ios/Flutter/Generated.xcconfig
deleted file mode 100644
index 7960212..0000000
--- a/example/ios/Flutter/Generated.xcconfig
+++ /dev/null
@@ -1,14 +0,0 @@
-// This is a generated file; do not edit or check into version control.
-FLUTTER_ROOT=C:\sdk\flutter
-FLUTTER_APPLICATION_PATH=C:\Users\User\AndroidStudioProjects\LibraryAppFlutter\example
-COCOAPODS_PARALLEL_CODE_SIGN=true
-FLUTTER_TARGET=lib\main.dart
-FLUTTER_BUILD_DIR=build
-FLUTTER_BUILD_NAME=3.1.2
-FLUTTER_BUILD_NUMBER=1
-EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386
-EXCLUDED_ARCHS[sdk=iphoneos*]=armv7
-DART_OBFUSCATION=false
-TRACK_WIDGET_CREATION=true
-TREE_SHAKE_ICONS=false
-PACKAGE_CONFIG=.dart_tool/package_config.json
diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig
deleted file mode 100644
index 592ceee..0000000
--- a/example/ios/Flutter/Release.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-#include "Generated.xcconfig"
diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh
deleted file mode 100644
index 876d648..0000000
--- a/example/ios/Flutter/flutter_export_environment.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-# This is a generated file; do not edit or check into version control.
-export "FLUTTER_ROOT=C:\sdk\flutter"
-export "FLUTTER_APPLICATION_PATH=C:\Users\User\AndroidStudioProjects\LibraryAppFlutter\example"
-export "COCOAPODS_PARALLEL_CODE_SIGN=true"
-export "FLUTTER_TARGET=lib\main.dart"
-export "FLUTTER_BUILD_DIR=build"
-export "FLUTTER_BUILD_NAME=3.1.2"
-export "FLUTTER_BUILD_NUMBER=1"
-export "DART_OBFUSCATION=false"
-export "TRACK_WIDGET_CREATION=true"
-export "TREE_SHAKE_ICONS=false"
-export "PACKAGE_CONFIG=.dart_tool/package_config.json"
diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
deleted file mode 100644
index f9b0d7c..0000000
--- a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- PreviewsEnabled
-
-
-
diff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d9810..0000000
--- a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
deleted file mode 100644
index f9b0d7c..0000000
--- a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- PreviewsEnabled
-
-
-
diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift
deleted file mode 100644
index 70693e4..0000000
--- a/example/ios/Runner/AppDelegate.swift
+++ /dev/null
@@ -1,13 +0,0 @@
-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)
- }
-}
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
deleted file mode 100644
index dc9ada4..0000000
Binary files a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ
diff --git a/example/ios/Runner/GeneratedPluginRegistrant.h b/example/ios/Runner/GeneratedPluginRegistrant.h
deleted file mode 100644
index 7a89092..0000000
--- a/example/ios/Runner/GeneratedPluginRegistrant.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-// clang-format off
-
-#ifndef GeneratedPluginRegistrant_h
-#define GeneratedPluginRegistrant_h
-
-#import
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface GeneratedPluginRegistrant : NSObject
-+ (void)registerWithRegistry:(NSObject*)registry;
-@end
-
-NS_ASSUME_NONNULL_END
-#endif /* GeneratedPluginRegistrant_h */
diff --git a/example/ios/Runner/GeneratedPluginRegistrant.m b/example/ios/Runner/GeneratedPluginRegistrant.m
deleted file mode 100644
index fd3dd96..0000000
--- a/example/ios/Runner/GeneratedPluginRegistrant.m
+++ /dev/null
@@ -1,140 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-// clang-format off
-
-#import "GeneratedPluginRegistrant.h"
-
-#if __has_include()
-#import
-#else
-@import assecontservices;
-#endif
-
-#if __has_include()
-#import
-#else
-@import connectivity_plus;
-#endif
-
-#if __has_include()
-#import
-#else
-@import flutter_html_to_pdf;
-#endif
-
-#if __has_include()
-#import
-#else
-@import geocoding_ios;
-#endif
-
-#if __has_include()
-#import
-#else
-@import google_maps_flutter_ios;
-#endif
-
-#if __has_include()
-#import
-#else
-@import image_picker_ios;
-#endif
-
-#if __has_include()
-#import
-#else
-@import in_app_review;
-#endif
-
-#if __has_include()
-#import
-#else
-@import launch_review;
-#endif
-
-#if __has_include()
-#import
-#else
-@import local_auth_ios;
-#endif
-
-#if __has_include()
-#import
-#else
-@import location;
-#endif
-
-#if __has_include()
-#import
-#else
-@import package_info_plus;
-#endif
-
-#if __has_include()
-#import
-#else
-@import path_provider_foundation;
-#endif
-
-#if __has_include()
-#import
-#else
-@import safe_device;
-#endif
-
-#if __has_include()
-#import
-#else
-@import share_extend;
-#endif
-
-#if __has_include()
-#import
-#else
-@import shared_preferences_foundation;
-#endif
-
-#if __has_include()
-#import
-#else
-@import sqflite;
-#endif
-
-#if __has_include()
-#import
-#else
-@import syncfusion_flutter_pdfviewer;
-#endif
-
-#if __has_include()
-#import
-#else
-@import url_launcher_ios;
-#endif
-
-@implementation GeneratedPluginRegistrant
-
-+ (void)registerWithRegistry:(NSObject*)registry {
- [AssecontservicesPlugin registerWithRegistrar:[registry registrarForPlugin:@"AssecontservicesPlugin"]];
- [ConnectivityPlusPlugin registerWithRegistrar:[registry registrarForPlugin:@"ConnectivityPlusPlugin"]];
- [FlutterHtmlToPdfPlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterHtmlToPdfPlugin"]];
- [GeocodingPlugin registerWithRegistrar:[registry registrarForPlugin:@"GeocodingPlugin"]];
- [FLTGoogleMapsPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTGoogleMapsPlugin"]];
- [FLTImagePickerPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTImagePickerPlugin"]];
- [InAppReviewPlugin registerWithRegistrar:[registry registrarForPlugin:@"InAppReviewPlugin"]];
- [LaunchReviewPlugin registerWithRegistrar:[registry registrarForPlugin:@"LaunchReviewPlugin"]];
- [FLTLocalAuthPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTLocalAuthPlugin"]];
- [LocationPlugin registerWithRegistrar:[registry registrarForPlugin:@"LocationPlugin"]];
- [FPPPackageInfoPlusPlugin registerWithRegistrar:[registry registrarForPlugin:@"FPPPackageInfoPlusPlugin"]];
- [PathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"PathProviderPlugin"]];
- [SafeDevicePlugin registerWithRegistrar:[registry registrarForPlugin:@"SafeDevicePlugin"]];
- [ShareExtendPlugin registerWithRegistrar:[registry registrarForPlugin:@"ShareExtendPlugin"]];
- [SharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"SharedPreferencesPlugin"]];
- [SqflitePlugin registerWithRegistrar:[registry registrarForPlugin:@"SqflitePlugin"]];
- [SyncfusionFlutterPdfViewerPlugin registerWithRegistrar:[registry registrarForPlugin:@"SyncfusionFlutterPdfViewerPlugin"]];
- [FLTURLLauncherPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTURLLauncherPlugin"]];
-}
-
-@end
diff --git a/example/lib/controller/gethora.dart b/example/lib/controller/gethora.dart
deleted file mode 100644
index 3013177..0000000
--- a/example/lib/controller/gethora.dart
+++ /dev/null
@@ -1,22 +0,0 @@
-
-import 'dart:async';
-
-import 'package:flutter/cupertino.dart';
-import 'package:intl/intl.dart';
-
-class GetHora extends ChangeNotifier {
- GetHora(){
- atualizarhora();
- }
- static Timer? timer;
- String get horarioAtual => "${DateFormat('HH:mm').format(DateTime.now())}";
-
- atualizarhora() {
- timer = Timer.periodic(
- Duration(seconds: 1), (Timer timer) {
- horarioAtual;
- notifyListeners();
- }
- );
- }
-}
\ No newline at end of file
diff --git a/example/lib/controller/gps.dart b/example/lib/controller/gps.dart
deleted file mode 100644
index d3a76eb..0000000
--- a/example/lib/controller/gps.dart
+++ /dev/null
@@ -1,69 +0,0 @@
-import 'package:flutter/foundation.dart';
-import 'package:flutter/material.dart';
-
-import 'package:google_maps_flutter/google_maps_flutter.dart';
-import 'package:location/location.dart';
-import 'package:assecontservices/assecontservices.dart';
-
-
-
-class Gps extends ChangeNotifier {
- Location location = Location();
- LocationData? locationData;
-
- CameraPosition _cam = const CameraPosition(target: LatLng(-23.5505199, -46.6333094), zoom: 18);
- CameraPosition get cam => _cam;
- set cam(CameraPosition c){
- _cam = c;
- notifyListeners();
- }
-
- Future get serviceEnabled async {
- return await location.serviceEnabled();
- }
-
- Future get isMockLocation async {
- return await SafeDevice.canMockLocation;;
- }
-
- localizacao() async {
- PermissionStatus _permissionGranted;
- try{
- _permissionGranted = await location.hasPermission();
- if (_permissionGranted == PermissionStatus.denied) {
- _permissionGranted = await location.requestPermission();
- }
-
- bool _serviceEnabled = await location.serviceEnabled();
- if (!_serviceEnabled) {
- _serviceEnabled = await location.requestService();
- }
-
- if ((_permissionGranted == PermissionStatus.granted ||
- _permissionGranted == PermissionStatus.grantedLimited ) && _serviceEnabled) {
- //if(!Config.isIOS) TrustLocation.start(5) ;
- //location.changeConfig(accuracy: LocationAccuracy.balanced);
- getLocalizacao();
- }else{
- //locationData = null;
- }
- }catch (e){
- debugPrint(e.toString());
- //locationData = null;
- //erro();
- }
- }
-
- getLocalizacao() async {
- try{
- locationData = await location.getLocation();
- cam = CameraPosition(
- target: LatLng(locationData!.latitude!, locationData!.longitude!),
- zoom: 18
- );
- }catch(e){
- debugPrint(e.toString());
- }
- }
-
-}
\ No newline at end of file
diff --git a/example/lib/controller/home_controller.dart b/example/lib/controller/home_controller.dart
deleted file mode 100644
index b2adddd..0000000
--- a/example/lib/controller/home_controller.dart
+++ /dev/null
@@ -1,13 +0,0 @@
-import 'package:flutter/cupertino.dart';
-
-class HomeController extends ChangeNotifier {
- static PageController pageController = PageController();
- int page = 0;
- int? filtro;
-
- void setPage(int value) {
- page = value;
- pageController.jumpToPage(value);
- notifyListeners();
- }
-}
diff --git a/example/lib/controller/tutor_controller.dart b/example/lib/controller/tutor_controller.dart
deleted file mode 100644
index 514fa58..0000000
--- a/example/lib/controller/tutor_controller.dart
+++ /dev/null
@@ -1,324 +0,0 @@
-
-
-import 'package:assecontservices/assecontservices.dart';
-import 'package:flutter/material.dart';
-
-class TutorController {
- List itens = [];
-
- final GlobalKey> keyMenu = GlobalKey();
- final GlobalKey keyMenu1 = GlobalKey();
- final GlobalKey keyMenu2 = GlobalKey();
- final GlobalKey keyMenu3 = GlobalKey();
- final GlobalKey keyMenu4 = GlobalKey();
- final GlobalKey keyMenu5 = GlobalKey();
- final GlobalKey keyResumo = GlobalKey();
- final GlobalKey keyListMenu = GlobalKey();
- final GlobalKey keyRegistro = GlobalKey();
-
- init(BuildContext context){
- itens.addAll({
- TutorialItens(
- globalKey: keyMenu1,
- touchScreen: true,
- top: WidgetsBinding.instance.window.padding.top,
- left: 10,
- right: 180,
- children: [
- Container(
- color: Colors.black54,
- child: CustomText.text(
- "Nesse menu é possível alterar o período para consultas.",
- style: const TextStyle(color: Colors.white, fontSize: 18),
- textAlign: TextAlign.center,
- softWrap: true,
- ),
- ),
- const SizedBox(
- height: 50,
- )
- ],
- widgetNext: Container(
- padding: const EdgeInsets.all(5),
- color: Colors.black12,
- child: CustomText.text(
- "Continuar",
- style: const TextStyle(
- color: Config.corPri,
- fontWeight: FontWeight.bold,
- ),
- ),
- ),
- shapeFocus: ShapeFocus.square),
- TutorialItens(
- globalKey: keyMenu2,
- touchScreen: true,
- top: 30 + (WidgetsBinding.instance.window.padding.top),
- left: 10,
- right: 180,
- children: [
- Container(
- color: Colors.black54,
- child: CustomText.text(
- "Nesse menu é possível alterar a senha do usuário.",
- style: const TextStyle(color: Colors.white, fontSize: 18),
- textAlign: TextAlign.center,
- softWrap: true,
- ),
- ),
- const SizedBox(
- height: 50,
- )
- ],
- widgetNext: Container(
- padding: const EdgeInsets.all(5),
- color: Colors.black12,
- child: CustomText.text(
- "Continuar",
- style: const TextStyle(
- color: Config.corPri,
- fontWeight: FontWeight.bold,
- ),
- softWrap: true,
- ),
- ),
- shapeFocus: ShapeFocus.square),
- TutorialItens(
- globalKey: keyMenu3,
- touchScreen: true,
- top: 60 + (WidgetsBinding.instance.window.padding.top),
- left: 10,
- right: 180,
- children: [
- Container(
- color: Colors.black54,
- child: CustomText.text(
- "Nesse menu é possível verificar versão do app, alterar modo escuro e autenticação.",
- style: const TextStyle(color: Colors.white, fontSize: 18),
- textAlign: TextAlign.center,
- softWrap: true,
- ),
- ),
- const SizedBox(
- height: 50,
- )
- ],
- widgetNext: Container(
- padding: const EdgeInsets.all(5),
- color: Colors.black12,
- child: CustomText.text(
- "Continuar",
- style: const TextStyle(
- color: Config.corPri,
- fontWeight: FontWeight.bold,
- ),
- ),
- ),
- shapeFocus: ShapeFocus.square),
- if (!Config.isWin)
- TutorialItens(
- globalKey: keyMenu4,
- touchScreen: true,
- top: 120 + (WidgetsBinding.instance.window.padding.top),
- left: 10,
- right: 180,
- children: [
- Container(
- color: Colors.black54,
- child: CustomText.text(
- "Nesse menu é possível avaliar o app na loja.",
- softWrap: true,
- style: const TextStyle(color: Colors.white, fontSize: 18),
- textAlign: TextAlign.center,
- ),
- ),
- const SizedBox(
- height: 50,
- )
- ],
- widgetNext: Container(
- padding: const EdgeInsets.all(5),
- color: Colors.black12,
- child: CustomText.text(
- "Continuar",
- style: const TextStyle(
- color: Config.corPri,
- fontWeight: FontWeight.bold,
- ),
- ),
- ),
- shapeFocus: ShapeFocus.square),
- TutorialItens(
- globalKey: keyMenu5,
- touchScreen: true,
- top: 160 + (WidgetsBinding.instance.window.padding.top),
- left: 10,
- right: 180,
- children: [
- Container(
- color: Colors.black54,
- child: CustomText.text(
- "Nesse menu é possível deslogar do usuário atual.",
- softWrap: true,
- style: const TextStyle(color: Colors.white, fontSize: 18),
- textAlign: TextAlign.center,
- ),
- ),
- const SizedBox(
- height: 50,
- )
- ],
- widgetNext: Container(
- padding: const EdgeInsets.all(5),
- color: Colors.black12,
- child: CustomText.text(
- "Continuar",
- style: const TextStyle(
- color: Config.corPri,
- fontWeight: FontWeight.bold,
- ),
- ),
- ),
- shapeFocus: ShapeFocus.square),
- TutorialItens(
- globalKey: keyListMenu,
- touchScreen: true,
- bottom: 100,
- right: 0,
- left: 0,
- children: [
- Container(
- color: Colors.black54,
- padding: const EdgeInsets.only(top: 20, bottom: 20, left: 20),
- child: Center(
- child: CustomText.text(
- "Lista de menu deslizável na horizontal.",
- softWrap: true,
- style: const TextStyle(color: Colors.white, fontSize: 18),
- textAlign: TextAlign.center,
- ),
- ),
- ),
- const SizedBox(
- height: 50,
- )
- ],
- widgetNext: Container(
- padding: const EdgeInsets.all(5),
- //margin: EdgeInsets.only(right: 30),
- color: Colors.black12,
- child: CustomText.text(
- "Continuar",
- style: const TextStyle(
- color: Config.corPri,
- fontWeight: FontWeight.bold,
- ),
- ),
- ),
- shapeFocus: ShapeFocus.square,
- ),
- TutorialItens(
- globalKey: keyResumo,
- touchScreen: true,
- top: 300,
- right: 0,
- left: 0,
- children: [
- Container(
- color: Colors.black54,
- padding: const EdgeInsets.only(
- top: 20,
- bottom: 20,
- ),
- child: Center(
- child: CustomText.text(
- "Resumo dos resultados do período.",
- softWrap: true,
- style: const TextStyle(color: Colors.white, fontSize: 18),
- textAlign: TextAlign.center,
- ),
- ),
- ),
- const SizedBox(
- height: 30,
- )
- ],
- widgetNext: Container(
- padding:
- const EdgeInsets.all(5), //margin: EdgeInsets.only(right: 30),
- color: Colors.black12,
- child: CustomText.text(
- "Continuar",
- style: const TextStyle(
- color: Config.corPri,
- fontWeight: FontWeight.bold,
- ),
- ),
- ),
- shapeFocus: ShapeFocus.square,
- ),
- TutorialItens(
- globalKey: keyRegistro,
- touchScreen: true,
- bottom: 220,
- right: 20,
- left: 20,
- children: [
- Container(
- color: Colors.black54,
- padding: const EdgeInsets.only(top: 20, bottom: 20, right: 50),
- child: Center(
- child: CustomText.text(
- "Clicando em Registrar é possível realizar a marcação de ponto.",
- style: const TextStyle(color: Colors.white, fontSize: 18),
- textAlign: TextAlign.center,
- ),
- ),
- ),
- const SizedBox(
- height: 20,
- )
- ],
- widgetNext: Container(
- padding:
- const EdgeInsets.all(5), //margin: EdgeInsets.only(right: 30),
- color: Colors.black12,
- child: CustomText.text(
- "Sair",
- style: const TextStyle(
- color: Config.corPri,
- fontWeight: FontWeight.bold,
- ),
- ),
- ),
- shapeFocus: ShapeFocus.oval,
- ),
- });
-
- keyStatus(context);
- }
-
- void keyStatus(BuildContext context) async {
- Future.delayed(const Duration(microseconds: 200)).then((value) async {
- keyMenu.currentState?.showButtonMenu();
- Future.delayed(const Duration(seconds: 1)).then((value) async {
- Tutorial.showTutorial(context, itens, (v) {
- if (v == (Config.isWin ? 3 : 4) &&
- (keyMenu.currentState?.mounted ?? false)) {
- //keyMenu.currentState!.showButtonMenu();
- Navigator.pop(
- keyMenu.currentState!.context,
- );
- } else if (v == (Config.isWin ? 5 : 6)) {
- Config().priacesso();
- } else if (v == (Config.isWin ? 6 : 7)) {
- BiometriaAlert(context);
- itens.clear();
- }
- });
- });
- });
- }
-
-
-}
\ No newline at end of file
diff --git a/example/lib/main.dart b/example/lib/main.dart
deleted file mode 100644
index 36aec18..0000000
--- a/example/lib/main.dart
+++ /dev/null
@@ -1,43 +0,0 @@
-import 'package:flutter/material.dart';
-
-import 'package:assecontservices/assecontservices.dart';
-
-
-import '../route_generator.dart';
-import 'controller/gps.dart';
-import 'controller/home_controller.dart';
-import 'controller/tutor_controller.dart';
-
-
-void main() {
- WidgetsFlutterBinding.ensureInitialized();
-
- Assecontservices.init(
- config: ConfiguracoesModel(
- apiAsseweb: 'https://www.asseweb.com.br/ApiAsseweb',
- apiHolerite: 'https://www.asseweb.com.br/AssecontAPI',
- apiHoleriteEmail: 'https://www.asseweb.com.br/HoleriteApi',
- apiAsseponto: 'https://www.asseponto.com.br/asseponto.api.v5',
- apiEspelho: 'https://www.asseponto.com.br/ApiEspelho',
- apiAssepontoNova: 'https://www.asseponto.com.br/ApiAsseponto',
- androidAppId: 'com.assecont.AssepontoMobile',
- iosAppId: 'com.assecont.assepontoweb',
- iosAppIdNum: '1490469231',
- nomeApp: VersaoApp.PontoApp
- ),
- titulo: 'Asseponto App',
- rotas: RouteGenerator.generateRoute,
- providers: [
-
- ChangeNotifierProvider(
- create: (_)=> Gps(),
- ),
- ChangeNotifierProvider(
- create: (_)=> HomeController(),
- ),
- Provider(
- create: (_)=> TutorController(),
- ),
- ]
- );
-}
\ No newline at end of file
diff --git a/example/lib/route_generator.dart b/example/lib/route_generator.dart
deleted file mode 100644
index cb971d9..0000000
--- a/example/lib/route_generator.dart
+++ /dev/null
@@ -1,88 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-import 'package:assecontservices/assecontservices.dart';
-
-import '../ui/espelho/espelho_screen.dart';
-import '../ui/home/home.dart';
-import '../ui/login/start_screen.dart';
-import '../ui/registro/screen_registro.dart';
-import '../ui/banco_horas/banco_screen.dart';
-import '../ui/marcacoes/Marcacoes.dart';
-import '../ui/solicitacoes/solicitacoes_screen.dart';
-import 'ui/comprovantes/comprovantes_screen.dart';
-
-
-class RouteGenerator {
- static Route generateRoute(RouteSettings settings){
-
- switch (settings.name) {
- case '/':
- return MaterialPageRoute(
- builder: (_) => IntroScreen()
- );
- case '/login':
- if(UserPontoManager.susuario != null){
- return MaterialPageRoute(
- builder: (_) => Home()
- );
- }
- return MaterialPageRoute(
- builder: (_) => StartScreen()
- );
- case '/holerites':
- return MaterialPageRoute(
- builder: (_) => HoleriteScreen()
- );
- case '/espelho':
- return MaterialPageRoute(
- builder: (_) => EspelhoScreen()
- );
- case '/registro':
- return MaterialPageRoute(
- builder: (_) => RegistroScreen()
- );
- case '/comprovantes':
- return MaterialPageRoute(
- builder: (_) => ComprovantesScreen()
- );
- case '/home':
- return MaterialPageRoute(
- builder: (_) => Home()
- );
- case '/banco':
- return MaterialPageRoute(
- builder: (_) => BancoHorasScreen()
- );
- case '/marcacoes':
- return MaterialPageRoute(
- builder: (_) => MarcacoesPage(filtro: settings.arguments as int?,)
- );
- case '/solicitacoes':
- return MaterialPageRoute(
- builder: (_) => Solicitacoes()
- );
- case '/configuracoes':
- return MaterialPageRoute(
- builder: (_) => ConfigScreen()
- );
- default:
- return _erroRota();
- }
-
- }
-
- static Route _erroRota(){
- return MaterialPageRoute(
- builder: (_){
- return Scaffold(
- appBar: AppBar(title: CustomText.text("Tela não encontrada!"),),
- body: Center(
- child: CustomText.text("Tela não encontrada!"),
- ),
- );
- }
- );
- }
-
-}
\ No newline at end of file
diff --git a/example/lib/ui/banco_horas/banco_screen.dart b/example/lib/ui/banco_horas/banco_screen.dart
deleted file mode 100644
index fb12661..0000000
--- a/example/lib/ui/banco_horas/banco_screen.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-import 'package:assecontservices/assecontservices.dart';
-
-import 'detalhes_banco.dart';
-
-class BancoHorasScreen extends StatefulWidget {
- @override
- _BancoHorasScreenState createState() => _BancoHorasScreenState();
-}
-
-class _BancoHorasScreenState extends State {
- ConnectionStatusSingleton connectionStatus = ConnectionStatusSingleton.getInstance();
-
- final GlobalKey _scaffoldKey = GlobalKey();
- final CalendarWeekController _controller = CalendarWeekController();
-
- @override
- void initState() {
- context.read().getFuncionarioHistorico();
- super.initState();
- }
-
-
-
-
- @override
- Widget build(BuildContext context) {
- return Consumer(
- builder: (_, banco, __){
-
-
- String? saldoAnteror() {
- String? _saldo;
- try{
- if(banco.listabanco.any((element) =>
- element.data != null ? banco.data.compareTo(
- DateTime(element.data!.year, element.data!.month, element.data!.day)) > 0 : false
- )) {
- _saldo = banco.listabanco.lastWhere((element) =>
- element.data != null ? banco.data.compareTo(
- DateTime(element.data!.year, element.data!.month,
- element.data!.day)) > 0 : false
- ).saldo;
- }
- }catch (e){
- _saldo = null;
- }
-
- return _saldo;
- }
-
- return CustomScaffold.calendario(
- key: _scaffoldKey,
- context: context,
- appTitle:'Banco de Horas',
- funcData: (DateTime datetime) {
- banco.data = datetime;
- },
- listdecoration: banco.listdecoration,
- controller: _controller,
- dataInit: banco.data,
- dataMin: context.read().usuario?.periodo?.dataInicial,
- dataMax: context.read().usuario?.periodo?.dataFinal,
- body: Center(
- child: !connectionStatus.hasConnection ? CustomText.text('Verifique sua Conexão com Internet') :
- FutureBuilder(
- future: banco.getBancodia(),
- builder: (context, snapshot){
- Widget resultado = Container();
- String? _saldo = saldoAnteror();
- switch( snapshot.connectionState ){
- case ConnectionState.none :
- case ConnectionState.waiting :
- resultado = const Center(child: CircularProgressIndicator());
- break;
- case ConnectionState.active :
- case ConnectionState.done :
- if( snapshot.hasError ){
- resultado = GestureDetector(
- child: Icon(Icons.autorenew_outlined,
- color: Config.corPri, size: 70,),
- onTap: (){
- setState(() {});
- }
- );
- }else {
- resultado = DetalhesBanco(snapshot.data, banco.data, _saldo);
- }
- break;
- }
- return resultado;
- },
- )
- ),
- );
- }
- );
- }
-}
\ No newline at end of file
diff --git a/example/lib/ui/banco_horas/detalhes_banco.dart b/example/lib/ui/banco_horas/detalhes_banco.dart
deleted file mode 100644
index 4a81602..0000000
--- a/example/lib/ui/banco_horas/detalhes_banco.dart
+++ /dev/null
@@ -1,139 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-import 'package:assecontservices/assecontservices.dart';
-
-import '../solicitacoes/lancar_solicitacao.dart';
-import '../solicitacoes/solicitacoes_screen.dart';
-
-class DetalhesBanco extends StatefulWidget {
- BancoDiasList? bancoHoras;
- DateTime? dia;
- String? saldo;
- DetalhesBanco(this.bancoHoras, this.dia, this.saldo);
-
- @override
- _DetalhesMarcacaoState createState() => _DetalhesMarcacaoState();
-}
-
-class _DetalhesMarcacaoState extends State {
- final ScrollController scrollController = ScrollController();
- bool diaMaiorHoje = false;
-
- @override
- void initState() {
- if(widget.dia != null) {
- diaMaiorHoje = widget.dia!.compareTo(DateTime.now()) > 0;
- }
- super.initState();
- }
-
- Widget card(String menu, String valor){
- return Container(
- padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 35),
- child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- CustomText.text(menu,style: const TextStyle(fontSize: 20),),
- CustomText.text(valor.trim(),style: const TextStyle(fontSize: 20),),
- ],
- ),
- );
- }
-
- @override
- Widget build(BuildContext context) {
- List list = context.watch().memorandoDia(widget.dia);
-
-
-
- return Scaffold(
- body: Container(
- decoration: BoxDecoration(
- border: Border(
- bottom: BorderSide(width: 80,
- color: Theme.of(context).scaffoldBackgroundColor))
- ),
- //height: MediaQuery.of(context).size.height,
- child: SingleChildScrollView(
- controller: scrollController,
- child: Column(crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- const SizedBox(height: 15,),
- Padding(
- padding: EdgeInsets.symmetric(horizontal: 30),
- child: CustomText.text('Resumo'),
- ),
- const SizedBox(height: 5,),
- card("Creditos:", widget.bancoHoras?.credito == null || widget.bancoHoras?.credito == '' || diaMaiorHoje
- ? "0:00" : widget.bancoHoras!.credito! ),
- if(!diaMaiorHoje && widget.bancoHoras?.descricaoCredito != null && widget.bancoHoras?.descricaoCredito != '')
- Container(
- padding: const EdgeInsets.symmetric(horizontal: 35),
- child: CustomText.text(widget.bancoHoras?.descricaoCredito ?? "",
- style: const TextStyle(fontSize: 14),)
- ),
- const SizedBox(height: 10,),
- card("Debitos:", widget.bancoHoras?.debito == null || widget.bancoHoras?.debito == '' || diaMaiorHoje
- ? "0:00" : widget.bancoHoras!.debito! ),
- if(!diaMaiorHoje && widget.bancoHoras?.descricaoDebito != null && widget.bancoHoras?.descricaoDebito != '')
- Container(
- padding: const EdgeInsets.symmetric(horizontal: 35),
- child: CustomText.text(widget.bancoHoras?.descricaoDebito ?? "",
- style: const TextStyle(fontSize: 14),)
- ),
-
- if(!diaMaiorHoje)
- const SizedBox(height: 10,),
- if(!diaMaiorHoje)
- card("Saldo do dia:", widget.bancoHoras?.saldodia == null
- ? "0:00" : widget.bancoHoras!.saldodia ),
-
- if(widget.bancoHoras?.lancamentos != null && widget.bancoHoras?.lancamentos != '')
- const SizedBox(height: 10,),
- if(widget.bancoHoras?.lancamentos != null && widget.bancoHoras?.lancamentos != '')
- card("Lançamentos Manual:", widget.bancoHoras!.lancamentos! ),
- if(widget.bancoHoras?.descricaoLancamentos != null && widget.bancoHoras?.descricaoLancamentos != '')
- Container(
- padding: const EdgeInsets.symmetric(horizontal: 35),
- child: CustomText.text(widget.bancoHoras?.descricaoLancamentos ?? "",
- style: const TextStyle(fontSize: 14),)
- ),
-
-
- if(!diaMaiorHoje)
- const SizedBox(height: 15,),
- if(!diaMaiorHoje)
- card("Saldo:", widget.bancoHoras?.saldo == null ? widget.saldo == null
- ? "0:00" : widget.saldo! : widget.bancoHoras!.saldo!),
-
- const SizedBox(height: 20,),
- Padding(
- padding: EdgeInsets.symmetric(horizontal: 30),
- child: CustomText.text('Obs: Esses dados podem ser alterados ate o fechamento!'),
- ),
- const Padding(
- padding: EdgeInsets.symmetric(horizontal: 30, vertical: 5),
- child: Divider(height: 2,),
- ),
-
- ListSolicitacoes( list, 90.0 * list.length, scrollController)
- ]),
- ),
- ),
- floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
- floatingActionButton: FloatingActionButton.extended(
- backgroundColor: Config.corPri,
- onPressed: () async {
- CustomAlert.custom(
- context: context,
- titulo: 'LANÇAR SOLICITAÇÃO',
- corpo: LancarSolicitacao(
- data: widget.dia
- ),
- );
- },
- label: CustomText.text('Solicitação'.toUpperCase(), style: const TextStyle(fontSize: 20, color: Colors.white),)
- ),
- );
- }
-}
diff --git a/example/lib/ui/camera/foto_screen.dart b/example/lib/ui/camera/foto_screen.dart
deleted file mode 100644
index 07a7cad..0000000
--- a/example/lib/ui/camera/foto_screen.dart
+++ /dev/null
@@ -1,235 +0,0 @@
-import 'dart:convert';
-import 'dart:typed_data';
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-import 'package:assecontservices/assecontservices.dart';
-import 'package:photo_view/photo_view.dart';
-
-class ImageHero extends StatefulWidget {
- List? foto;
-
- ImageHero(this.foto);
-
- @override
- _ImageHeroState createState() => _ImageHeroState();
-}
-
-class _ImageHeroState extends State {
- @override
- Widget build(BuildContext context) {
- return Hero(
- tag: "foto",
- child: Scaffold(
- backgroundColor: Colors.black,
- appBar: AppBar(
- backgroundColor: Colors.black,
- iconTheme: const IconThemeData(color: Colors.white),
- ),
- body: Stack(alignment: AlignmentDirectional.bottomCenter, children: [
- Container(
- //height: MediaQuery.of(context).size.height * 0.78,
- color: Colors.black,
- child: widget.foto != null
- ? PhotoView(
- imageProvider:
- MemoryImage(Uint8List.fromList(widget.foto!)))
- : Container(),
- ),
-
- Container(
- height: 80,
- color: Colors.black,
- padding: const EdgeInsets.only(bottom: 20),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: [
- if (!Config.isWin)
- GestureDetector(
- onTap: () async {
- Uint8List? img = await CameraService.getImage();
- if (img != null) {
- carregar(context);
- bool result = await context
- .read()
- .setPhoto(context.read().usuario!,
- img, null);
- if (result) {
- context
- .read()
- .usuario
- ?.funcionario
- ?.foto = base64Encode(img);
- Navigator.pop(context);
- Navigator.pop(
- context,
- context
- .read()
- .usuario
- ?.funcionario
- ?.foto);
- } else {
- Navigator.pop(context);
- CustomAlert.erro(
- context: context,
- mensage:
- 'Não foi possivel atualizar sua foto, tente novamente mais tarde!',
- );
- }
- }
- },
- child: const Icon(
- Icons.camera,
- color: Colors.white,
- size: 50,
- ),
- ),
- //SizedBox(width: 27,),
- GestureDetector(
- onTap: () async {
- Uint8List? img = await CameraService.getGallery();
-
- if (img != null) {
- carregar(context);
- bool result = await context
- .read()
- .setPhoto(context.read().usuario!,
- img, null);
- if (result) {
- context
- .read()
- .usuario
- ?.funcionario
- ?.foto = base64Encode(img);
- Navigator.pop(context);
- Navigator.pop(
- context,
- context
- .read()
- .usuario
- ?.funcionario
- ?.foto);
- } else {
- Navigator.pop(context);
- CustomAlert.erro(
- context: context,
- mensage:
- 'Não foi possivel atualizar sua foto, tente novamente mais tarde!',
- );
- }
- }
- },
- child: const Icon(
- Icons.add_photo_alternate,
- color: Colors.white,
- size: 50,
- ),
- ),
- ],
- ),
- ),
- //SizedBox(height: 20,),
- ]),
- ),
- );
- }
-}
-
-/*
-class ImageHero extends StatefulWidget {
- var foto;
-
- ImageHero(this.foto);
-
- @override
- _ImageHeroState createState() => _ImageHeroState();
-}
-
-class _ImageHeroState extends State {
- @override
- Widget build(BuildContext context) {
- double height = MediaQuery.of(context).size.height;
- double width = MediaQuery.of(context).size.width;
- Orientation orientation = MediaQuery.of(context).orientation;
-
- return Hero(tag: "foto",
- child: Scaffold(backgroundColor: Colors.black,
- appBar: AppBar(
- backgroundColor: Colors.black,
- iconTheme: IconThemeData(color: Colors.white),
- ),
- body: SingleChildScrollView(
- child: Container(height: orientation != Orientation.landscape ? height * 0.865 : null,
- child: Column(mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Container(height: MediaQuery.of(context).size.height * 0.78,
- color: Colors.black,
- child: PhotoView(
- imageProvider: MemoryImage( base64Decode( widget.foto ))
- ),
- ),
-
- Container(height: 50, color: Colors.black,
- child: Row(mainAxisAlignment: MainAxisAlignment.center,
- children: [
- GestureDetector(
- onTap: () async {
- List img = await CustomCamera().getImage();
- if(img != null){
- await context.read().setPhoto(
- img,
- onSuccess: () {
- context.read().updateImg( base64Encode(img) );
- Navigator.pop(context);
- },
- onFail: (s, c) {
- WarningAlertBox(
- context: context,
- title: 'Falha',
- messageText: s,
- buttonText: 'ok'
- );
- }
- );
- }
- },
- child: Icon(Icons.camera, color: Colors.white, size: 50,),
- ),
- SizedBox(width: 50,),
- GestureDetector(
- onTap: () async {
- List img = await CustomCamera().getGallery();
- if(img != null){
- await context.read().setPhoto(
- img,
- onSuccess: () {
- context.read().updateImg( base64Encode(img) );
- Navigator.pop(context);
- },
- onFail: (s, c) {
- WarningAlertBox(
- context: context,
- title: 'Falha',
- messageText: s,
- buttonText: 'ok'
- );
- }
- );
- }
- },
- child: Icon(Icons.add_photo_alternate, color: Colors.white, size: 50,),
- ),
- ],
- ),
- ),
- //SizedBox(height: 20,),
- ]),
- ),
- )
- ),
- );
- }
-}
-
-
- */
\ No newline at end of file
diff --git a/example/lib/ui/comprovantes/comprovantes_screen.dart b/example/lib/ui/comprovantes/comprovantes_screen.dart
deleted file mode 100644
index c016aad..0000000
--- a/example/lib/ui/comprovantes/comprovantes_screen.dart
+++ /dev/null
@@ -1,108 +0,0 @@
-import 'package:flutter/foundation.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-import 'package:assecontservices/assecontservices.dart';
-
-import 'detelhes_comprovantes.dart';
-
-
-class ComprovantesScreen extends StatefulWidget {
-
- @override
- _ComprovantesScreenState createState() => _ComprovantesScreenState();
-}
-
-class _ComprovantesScreenState extends State {
- final GlobalKey _scaffoldKey = GlobalKey();
- ConnectionStatusSingleton connectionStatus = ConnectionStatusSingleton.getInstance();
-
- Apontamento? _apontamento;
-
- @override
- void initState() {
- _apontamento = context.read().apontamento.first ;
- super.initState();
- }
-
- @override
- Widget build(BuildContext context) {
-
- return Consumer(
- builder: (_, aponta, __){
-
- return CustomScaffold.custom(
- context: context,
- key: _scaffoldKey,
- height: 70,
- appTitle: 'Meus Comprovantes\nApp/Asseface',
- appbar: Center(
- child: Container(
- height: 40,
- constraints: BoxConstraints(maxWidth: 400),
- margin: EdgeInsets.only(left: 30, right: 30, bottom: 20, top: 5),
- padding: EdgeInsets.symmetric(horizontal: 10),
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.circular(15),
- border: Border.all(color: Colors.grey, width: 1)
- ),
- child: DropdownButton(
- isExpanded: true,
- dropdownColor: Colors.white,
- value: _apontamento ?? aponta.apontamento.first,
- iconSize: 20,
- elevation: 0,
- icon: Icon(Icons.arrow_drop_down, color: Colors.black,),
- style: TextStyle(color: Colors.black),
- underline: Container(),
- onChanged: ( newValue) {
- setState(() {
- _apontamento = newValue;
- });
- },
- items: aponta.apontamento.
- map>(( value) {
- return DropdownMenuItem(
- value: value,
- child: Padding(
- padding: EdgeInsets.symmetric(vertical: 8),
- child: CustomText.text(value.descricao ?? ''),
- ),
- );
- }).toList(),
- ),
- ),
- ),
- body: Column(
- children: [
- Padding(
- padding: const EdgeInsets.all(8.0),
- child: CustomText.text(
- kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone ? 'Esses comprovantes são apenas das marcações realizadasno aplicativo ou equipamento Asseponto facil (Relogio de ponto da Assecont)'
- : 'Esses comprovantes são apenas das marcações\nrealizadasno aplicativo ou equipamento\nAsseponto facil (Relogio de ponto da Assecont)',
- textAlign: TextAlign.center
- ),
- ),
- Expanded(
- child: !connectionStatus.hasConnection ?
- Center(child: CustomText.text('Verifique sua Conexão com Internet')) :
- aponta.apontamento.isEmpty ?
- Center(
- child: CustomText.text('Não possui comprovantes de marcações do App/AsseFace neste dia',
- style: TextStyle(fontSize: 20),),
- ) : _apontamento == null ?
- Center(
- child: CustomText.text('Seleciona um periodo',
- style: TextStyle(fontSize: 20),),
- ) : Center(
- child: DetalhesComprovantes(_apontamento!)
- )
- ),
- ],
- ),
- );
- }
- );
- }
-}
\ No newline at end of file
diff --git a/example/lib/ui/comprovantes/detelhes_comprovantes.dart b/example/lib/ui/comprovantes/detelhes_comprovantes.dart
deleted file mode 100644
index 5f46286..0000000
--- a/example/lib/ui/comprovantes/detelhes_comprovantes.dart
+++ /dev/null
@@ -1,115 +0,0 @@
-import 'dart:io';
-import 'dart:typed_data';
-
-import 'package:flutter/foundation.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-import 'package:assecontservices/assecontservices.dart';
-
-class DetalhesComprovantes extends StatefulWidget {
- Apontamento apontamento;
-
- DetalhesComprovantes(this.apontamento);
-
- @override
- _DetalhesComprovantesState createState() => _DetalhesComprovantesState();
-}
-
-class _DetalhesComprovantesState extends State {
- bool load = false;
-
- @override
- Widget build(BuildContext context) {
- double height = MediaQuery.of(context).size.height - (WidgetsBinding.instance.window.padding.top);
- double width = MediaQuery.of(context).size.width;
-
- return Consumer(
- builder: (_, comprovantes,__) {
- return Scaffold(
- body: Container(
- decoration: BoxDecoration(
- border: Border(bottom: BorderSide(width: 70, color: Theme.of(context).scaffoldBackgroundColor))
- ),
- width: width,
- height: height,
- alignment: Alignment.topCenter,
- padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 12),
- child: FutureBuilder>(
- future: comprovantes.listarMarcacoes(
- context.read().usuario,
- widget.apontamento
- ),
- builder: (_, snapshot){
- Widget resultado;
- switch( snapshot.connectionState ){
- case ConnectionState.none :
- case ConnectionState.waiting :
- resultado = Center(
- child: Container(
- width: 50,
- child: const LinearProgressIndicator(minHeight: 10, backgroundColor: Colors.transparent,)
- ),
- );
- break;
- case ConnectionState.active :
- case ConnectionState.done :
- if( snapshot.hasError || !snapshot.hasData || snapshot.data == null){
- resultado = GestureDetector(
- child: const Center(
- child: Icon(Icons.autorenew_outlined,
- color: Config.corPri, size: 70,),
- ),
- onTap: (){
- setState(() {});
- }
- );
- }else {
- if(snapshot.data != null && snapshot.data!.isNotEmpty){
- resultado = ListView(
- children: snapshot.data!.map((e) {
- return Hero(
- tag: 'File-${e.marcacaoId}',
- child: InkWell(
- onTap: () async {
- carregar(context);
- Uint8List? file = await comprovantes.getPDF(context.read().usuario, e.marcacaoId!);
- Navigator.pop(context);
- if(file != null){
- Navigator.push(context, MaterialPageRoute(
- builder: (context)=> FileHero('Comprovante de Ponto - ${DateFormat('dd-MM-yyy HH-mm', 'pt_BR').format(e.dataHora!)}',
- memori: file,
- )
- ));
- }else{
- CustomSnackbar.context(context, 'Não foi possivel gerar seu comprovante, tente novamente mais tarde!', Colors.red);
- }
- },
- child: Card(
- child: Padding(
- padding: kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone ? const EdgeInsets.all(8.0) : EdgeInsets.zero ,
- child: ListTile(
- leading: Text(DateFormat('dd/MM\nE', 'pt_BR').format(e.dataHora!).toUpperCase()),
- title: Text('Horario da Marcação: ${DateFormat('HH:mm', 'pt_BR').format(e.dataHora!)}'),
- ),
- ),
- ),
- ),
- );
- }).toList(),
- );
- }else{
- resultado = Center(child: CustomText.text('Nenhum comprovante disponivel'));
- }
- }
- break;
- }
- return resultado;
- }
- ),
- ),
- );
- }
- );
- }
-}
diff --git a/example/lib/ui/espelho/detelhes_espelho.dart b/example/lib/ui/espelho/detelhes_espelho.dart
deleted file mode 100644
index 3fcf99c..0000000
--- a/example/lib/ui/espelho/detelhes_espelho.dart
+++ /dev/null
@@ -1,227 +0,0 @@
-import 'package:flutter/foundation.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-
-import 'package:syncfusion_flutter_pdfviewer/pdfviewer.dart';
-import 'package:assecontservices/assecontservices.dart';
-
-class DetalhesEspelho extends StatefulWidget {
- Apontamento apontamento;
- DetalhesEspelho(this.apontamento);
-
- @override
- _DetalhesEspelhoState createState() => _DetalhesEspelhoState();
-}
-
-class _DetalhesEspelhoState extends State {
- @override
- Widget build(BuildContext context) {
- double height = MediaQuery.of(context).size.height -
- (WidgetsBinding.instance.window.padding.top);
- double width = MediaQuery.of(context).size.width;
-
- return FutureBuilder(
- future: context.read().postEspelhoPontoPDF(
- context.read().usuario, widget.apontamento),
- builder: (_, snapshot) {
- Widget resultado;
- switch (snapshot.connectionState) {
- case ConnectionState.none:
- case ConnectionState.waiting:
- resultado = Center(
- child: Container(
- width: 50,
- child: const LinearProgressIndicator(
- minHeight: 10,
- backgroundColor: Colors.transparent,
- )),
- );
- break;
- case ConnectionState.active:
- case ConnectionState.done:
- if (snapshot.hasError ||
- !snapshot.hasData ||
- snapshot.data == null) {
- resultado = GestureDetector(
- child: Icon(
- Icons.autorenew_outlined,
- color: Config.corPri,
- size: 60,
- ),
- onTap: () {
- context.read().postEspelhoPontoPDF(
- context.read().usuario,
- widget.apontamento);
- });
- } else {
- if (snapshot.data != null) {
-
- resultado = Scaffold(
- body: Center(
- child: Container(
- decoration: BoxDecoration(
- border: snapshot.data?.data != null
- ? null
- : Border(
- bottom: BorderSide(
- width: 70,
- color: Theme.of(context)
- .scaffoldBackgroundColor))),
- width: kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone ? 600 : width,
- height: kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone ? null : height,
- alignment: Alignment.center,
- padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 12),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisSize: MainAxisSize.max,
- children: [
- Expanded(
- child: Container(
- alignment: Alignment.center,
- decoration: BoxDecoration(
- border: Border.all(color: Colors.grey)),
- child: Stack(
- alignment: Alignment.center,
- children: [
- SfPdfViewer.memory(
- snapshot.data!.espelhoHtml!,
- enableDocumentLinkAnnotation: false,
- canShowPaginationDialog: false,
- enableDoubleTapZooming: false,
- enableTextSelection: false,
- canShowScrollStatus: false,
- canShowScrollHead: false,
- canShowPasswordDialog: false,
- pageSpacing: 4,
- interactionMode:
- PdfInteractionMode.pan),
- /*SingleChildScrollView(
- child: HtmlContentViewer(
- htmlContent: snapshot.data!.espelhoHtml ?? '',
- initialContentHeight: MediaQuery.of(context).size.height,
- initialContentWidth: MediaQuery.of(context).size.width,
- ),
- ),*/
-
- Hero(
- tag: 'File',
- child: GestureDetector(
- child: Center(
- child: Container(
- height: 80, width: double.infinity,
- alignment: Alignment.center,
- color: Colors.black26,
- child: Text('Clique aqui para baixar'),
- ),
- ),
- onTap: () {
- Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) =>
- FileHero('Espelho de Ponto - ${widget.apontamento.descricao}',
- file: kIsWeb ? null : snapshot.data!.espelho!,
- memori: snapshot.data!.espelhoHtml!,
- )));
- },
- ),
- ),
- ],
- )),
- ),
- const SizedBox(
- height: 10,
- ),
- if (snapshot.data?.data != null)
- Padding(
- padding:
- const EdgeInsets.symmetric(vertical: 20),
- child: CustomText.text('Espelho Assinado em: ' +
- DateFormat('dd/MM/yyyy HH:mm')
- .format(snapshot.data!.data!)),
- )
- ],
- )),
- ),
- floatingActionButtonLocation:
- FloatingActionButtonLocation.centerFloat,
- floatingActionButton: snapshot.data?.data != null
- ? null
- : widget.apontamento.datatermino
- .compareTo(DateTime.now()) >=
- 0
- ? null
- : FloatingActionButton.extended(
- backgroundColor: Config.corPri,
- onPressed: () async {
- await CustomAlert.custom(
- context: context,
- titulo: 'Assinar Espelho de Ponto',
- corpo: Container(
- padding: const EdgeInsets.only(
- bottom: 20, top: 5),
- child: CustomText.text(
- 'Esta deacordo com as informações\ndo espelho de ponto?',
- textAlign: TextAlign.center,
- style: TextStyle(fontSize: 16),
- ),
- ),
- txtBotaoSucess: 'CONFIRMAR',
- txtBotaoCancel: 'REJEITAR',
- funcSucess: () async {
- bool result = await context
- .read()
- .postEspelhoStatus(
- context
- .read()
- .usuario,
- widget.apontamento,
- true);
- if (result) {
- setState(() {});
- CustomAlert.sucess(
- context: context,
- mensage:
- 'Espelho de ponto assinado.\n',
- );
- } else {
- CustomAlert.erro(
- context: context,
- mensage:
- 'Não foi possivel assinar seu espelho\ntente novamente!',
- );
- }
- },
- funcCancel: () async {
- await context
- .read()
- .postEspelhoStatus(
- context
- .read()
- .usuario,
- widget.apontamento,
- false);
- });
- },
- label: Padding(
- padding: EdgeInsets.symmetric(horizontal: 5),
- child: CustomText.text(
- 'ASSINAR',
- style: TextStyle(
- fontSize: 20, color: Colors.white),
- ),
- )),
- );
- } else {
- resultado = Center(
- child: CustomText.text('Nenhum Espelho disponivel'));
- }
- }
- break;
- }
- return resultado;
- });
- }
-}
diff --git a/example/lib/ui/espelho/espelho_screen.dart b/example/lib/ui/espelho/espelho_screen.dart
deleted file mode 100644
index 21ec77f..0000000
--- a/example/lib/ui/espelho/espelho_screen.dart
+++ /dev/null
@@ -1,94 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-import 'package:assecontservices/assecontservices.dart';
-
-import 'detelhes_espelho.dart';
-
-
-class EspelhoScreen extends StatefulWidget {
-
- @override
- _EspelhoScreenState createState() => _EspelhoScreenState();
-}
-
-class _EspelhoScreenState extends State {
- final GlobalKey _scaffoldKey = GlobalKey();
- ConnectionStatusSingleton connectionStatus = ConnectionStatusSingleton.getInstance();
-
- @override
- void initState() {
- List aponta = context.read().apontamento;
- if(aponta.length > 0)context.read().setMesAtual(aponta.first);
- super.initState();
- }
-
-
- @override
- Widget build(BuildContext context) {
- //double width = MediaQuery.of(context).size.width;
-
- return Consumer2(
- builder: (_, espelho, aponta, __){
- return CustomScaffold.custom(
- context: context,
- height: 70,
- key: _scaffoldKey,
- appTitle: 'Meu Espelhos',
- expanAppbar: Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Center(
- child: Container(
- height: 40,
- margin: const EdgeInsets.only(left: 30, right: 30, bottom: 20, top: 5),
- padding: const EdgeInsets.symmetric(horizontal: 10),
- constraints: BoxConstraints(maxWidth: 400),
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.circular(15),
- border: Border.all(color: Colors.grey, width: 1)
- ),
- child: DropdownButton(
- isExpanded: true,
- dropdownColor: Colors.white,
- value: espelho.dropdowndata,
- iconSize: 20,
- elevation: 0,
- icon: const Icon(Icons.arrow_drop_down, color: Colors.black,),
- style: const TextStyle(color: Colors.black),
- underline: Container(),
- onChanged: ( newValue) {
- espelho.dropdowndata = newValue!;
- espelho.apontamento = aponta.apontamento.firstWhere((e) => e.descricao == newValue);
- },
- items: aponta.apontamento.map((e) => e.descricao).
- toList().map>(( value) {
- return DropdownMenuItem(
- value: value,
- child: Padding(
- padding: const EdgeInsets.symmetric(vertical: 8),
- child: CustomText.text(value ?? ''),
- ),
- );
- }).toList(),
- ),
- ),
- ),
- ],
- ),
- body: Container(
- child: !connectionStatus.hasConnection ?
- Center(child: CustomText.text('Verifique sua Conexão com Internet')) :
- espelho.apontamento == null ?
- Center(
- child: CustomText.text('Usuario nao possui periodo de apontamento',
- style: TextStyle(fontSize: 16), textAlign: TextAlign.center,),
- ) : Center(child: DetalhesEspelho(espelho.apontamento!))
- ),
- );
- }
- );
- }
-}
\ No newline at end of file
diff --git a/example/lib/ui/ferias/ferias.dart b/example/lib/ui/ferias/ferias.dart
deleted file mode 100644
index 5455c4f..0000000
--- a/example/lib/ui/ferias/ferias.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-import 'package:assecontservices/assecontservices.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-import 'package:flutter/rendering.dart';
-
-class FeriasPage extends StatefulWidget {
- @override
- _FeriasPageState createState() => _FeriasPageState();
-}
-
-class _FeriasPageState extends State {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- title: CustomText.text("Férias"),
- centerTitle: true,
- ),
- body: Center(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- CustomText.text(
- 'Aqui será a página para exibir as FÉRIAS',
- style: TextStyle(color: Colors.black, fontSize: 20),
- ),
- ],
- ),
- ),
- );
- }
-}
diff --git a/example/lib/ui/home/componentes/custom_listTile.dart b/example/lib/ui/home/componentes/custom_listTile.dart
deleted file mode 100644
index 0b6c4ed..0000000
--- a/example/lib/ui/home/componentes/custom_listTile.dart
+++ /dev/null
@@ -1,73 +0,0 @@
-import 'package:assecontservices/assecontservices.dart';
-import 'package:flutter/cupertino.dart';
-import 'package:flutter/material.dart';
-
-class CustomListTile extends StatelessWidget {
- Widget icon;
- String titulo;
- String valor;
- VoidCallback? function;
-
- CustomListTile(this.icon, this.titulo, this.valor, this.function);
-
- @override
- Widget build(BuildContext context) {
- double width = MediaQuery.of(context).size.width;
-
- return Padding(
- padding: EdgeInsets.symmetric(horizontal: width * 0.025, vertical: 2),
- child: Card(
- child: InkWell(
- onTap: function,
- child: Container(
- padding:
- EdgeInsets.symmetric(horizontal: width * 0.02, vertical: 15),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Expanded(
- flex: 2,
- child: Row(
- children: [
- icon == null
- ? Container()
- : Padding(
- padding: EdgeInsets.only(right: 12),
- child: icon,
- ),
- Expanded(
- child: CustomText.text(
- titulo,
- maxLines: 1,
- style: TextStyle(
- fontWeight: FontWeight.bold,
- fontSize: icon == null ? 12 : 16,
- ),
- ),
- ),
- ],
- ),
- ),
- Expanded(
- flex: 1,
- child: Padding(
- padding: const EdgeInsets.only(right: 5),
- child: CustomText.text(
- valor,
- textAlign: TextAlign.end,
- maxLines: 1,
- style: TextStyle(
- fontWeight: FontWeight.bold,
- fontSize: icon == null ? 14 : 18,
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- );
- }
-}
diff --git a/example/lib/ui/home/componentes/custom_listTile_web.dart b/example/lib/ui/home/componentes/custom_listTile_web.dart
deleted file mode 100644
index 49f897f..0000000
--- a/example/lib/ui/home/componentes/custom_listTile_web.dart
+++ /dev/null
@@ -1,66 +0,0 @@
-import 'package:assecontservices/assecontservices.dart';
-import 'package:flutter/cupertino.dart';
-import 'package:flutter/material.dart';
-
-class CustomListTileWeb extends StatelessWidget {
- Widget? icon;
- String titulo;
- String valor;
- VoidCallback? function;
-
- CustomListTileWeb(this.icon, this.titulo, this.valor, this.function);
-
- @override
- Widget build(BuildContext context) {
- double width = MediaQuery.of(context).size.width;
-
- return Container(
- padding: EdgeInsets.symmetric(horizontal: width * 0.025, vertical: 2),
- child: Card(
- child: InkWell(
- onTap: function,
- child: Container(
- height: 200, width: 200,
- padding: EdgeInsets.symmetric(horizontal: width * 0.02, vertical: 15),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Expanded(
- flex: 2,
- child: icon == null
- ? Container()
- : icon!,
- ),
- Expanded(
- child: CustomText.text(
- titulo,
- maxLines: 1,
- style: TextStyle(
- fontWeight: FontWeight.bold,
- fontSize: icon == null ? 12 : 16,
- ),
- ),
- ),
- Expanded(
- flex: 1,
- child: Padding(
- padding: const EdgeInsets.only(right: 5),
- child: CustomText.text(
- valor,
- textAlign: TextAlign.end,
- maxLines: 1,
- style: TextStyle(
- fontWeight: FontWeight.bold,
- fontSize: icon == null ? 18 : 22,
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- );
- }
-}
diff --git a/example/lib/ui/home/componentes/load_widget.dart b/example/lib/ui/home/componentes/load_widget.dart
deleted file mode 100644
index 203febb..0000000
--- a/example/lib/ui/home/componentes/load_widget.dart
+++ /dev/null
@@ -1,34 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-import 'package:shimmer/shimmer.dart';
-import 'package:assecontservices/assecontservices.dart';
-
-Widget shimmerWidget(double width, BuildContext context) {
- return Container(
- child: Shimmer.fromColors(
- baseColor: context.watch().darkTemas ? Colors.grey[800]! : Colors.grey[300]!,
- highlightColor: context.watch().darkTemas ? Colors.grey : Colors.white,
- child: Container(
- padding: EdgeInsets.symmetric(horizontal: width * 0.026),
- child: Column(
- children:[
- const SizedBox(height: 10,),
- Container(margin: const EdgeInsets.only(bottom: 10,),
- color: Colors.black,
- height: 50,
- ),
- Container(margin: const EdgeInsets.only(bottom: 10),
- color: Colors.black,
- height: 50,
- ),
- Container(margin: const EdgeInsets.only(bottom: 10),
- color: Colors.black,
- height: 50,
- ),
- ]
- ),
- ),
- ),
- );
-}
\ No newline at end of file
diff --git a/example/lib/ui/home/componentes/resultados.dart b/example/lib/ui/home/componentes/resultados.dart
deleted file mode 100644
index 0419a31..0000000
--- a/example/lib/ui/home/componentes/resultados.dart
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-import 'package:assecontservices/assecontservices.dart';
-
-
-import 'package:flutter/cupertino.dart';
-import 'package:flutter/foundation.dart';
-import 'package:flutter/material.dart';
-
-import '../../../controller/tutor_controller.dart';
-import 'custom_listTile.dart';
-import 'custom_listTile_web.dart';
-import 'load_widget.dart';
-
-class ResiltatosView extends StatefulWidget {
- UsuarioPonto? usuario;
- HomePontoModel? homeModel;
- ScrollController? scrollController;
-
- ResiltatosView(this.usuario, this.homeModel, this.scrollController);
-
- @override
- State createState() => _ResiltatosViewState();
-}
-
-class _ResiltatosViewState extends State {
- Widget icon = Container();
- VoidCallback? function;
-
-
- @override
- Widget build(BuildContext context) {
- double width = MediaQuery.of(context).size.width;
- dynamic data = DateFormat('EEEE d MMM y', 'pt_BR').format(DateTime.now());
-
- return Container(
- padding: const EdgeInsets.all(15),
- decoration: BoxDecoration(
- border: Border(bottom: BorderSide(width: 80,
- color: Theme.of(context).scaffoldBackgroundColor))),
- child: widget.usuario == null
- ? Container(
- key: context.read().keyResumo,
- child: shimmerWidget(width, context),
- ) : Card(
- //color: Colors.white.withOpacity(0.95),
- child: Column(
- children: [
- Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- if(kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone)
- Column(
- children: [
- CustomText.text(
- context.watch().horarioAtual,
- textAlign: TextAlign.center,
- style: const TextStyle(
- fontSize: 50,
- fontWeight: FontWeight.bold,
- letterSpacing: 2),
- ),
- CustomText.text(data
- .toUpperCase()
- .toString()
- .replaceAll("-FEIRA", ""),
- style: TextStyle(fontSize: 12), textAlign: TextAlign.center),
- ],
- ),
- SizedBox(height: 10,),
- //const SizedBox(height: 10,),
- Row(children: [
- const SizedBox(
- width: 50,
- ),
- CustomText.text(
- 'Resumo:',
- style: const TextStyle(
- //fontWeight: FontWeight.bold,
- fontSize: 14,
- ),
- ),
- ]),
- const SizedBox(
- width: 5,
- ),
- CustomText.text(
- widget.usuario?.periodo?.descricao?.toUpperCase() ?? '',
- style: const TextStyle(
- //fontWeight: FontWeight.bold,
- fontSize: 14,
- ),
- ),
- ],
- ),
- ExpandedOrContainer(
- key: context.read().keyResumo,
- isContainer: kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone,
- height: 230,
- //height: 80.0 * (home.homeModel?.resultadoItemList?.length ?? 1),
- child: ListView.builder(
- controller: widget.scrollController,
- scrollDirection: kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone ? Axis.horizontal : Axis.vertical,
- itemBuilder: (BuildContext context, int index) {
- customIcon(widget.homeModel?.resultadosList![index].id);
- return kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone ?
- CustomListTileWeb(
- icon,
- widget.homeModel?.resultadosList![index].titulo ?? '',
- widget.homeModel?.resultadosList![index].valor ?? '',
- (widget.usuario?.app ?? false) ? function
- : () {
- CustomAlert.info(
- context: context,
- mensage:
- 'Você está utilizando a Versão free.\nContate seu gestor para contratar a versão máster!\n',
- );
- }
- )
- : CustomListTile(
- icon,
- widget.homeModel?.resultadosList![index].titulo ?? '',
- widget.homeModel?.resultadosList![index].valor ?? '',
- (widget.usuario?.app ?? false) ? function
- : () {
- CustomAlert.info(
- context: context,
- mensage:
- 'Você está utilizando a Versão free.\nContate seu gestor para contratar a versão máster!\n',
- );
- });
- },
- itemCount:
- (widget.homeModel?.resultadosList?.length ?? 0),
- ),
- ),
- ],
- ),
- )
- );
- }
-
-
- customIcon(int? desc) {
- switch (desc) {
- case 2:
- icon = Transform.rotate(
- angle: 12.0,
- child: Icon(
- Icons.arrow_forward_outlined,
- size: kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone ? 60 : 30,
- ),
- );
- function = () {
- Navigator.pushNamed(context, '/marcacoes', arguments: 2);
- };
- break;
- case 3:
- icon = Transform.rotate(
- angle: 15.0,
- child: Icon(Icons.arrow_forward_outlined, size: kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone ? 60 : 30),
- );
- function = () {
- Navigator.pushNamed(context, '/marcacoes', arguments: 1);
- };
- break;
- case 4:
- icon = Icon(Icons.medical_services_outlined, size: kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone ? 60 : 30);
- function = () {
- Navigator.pushNamed(context, '/marcacoes', arguments: 3);
- };
- break;
- case 5:
- icon = Icon(Icons.account_balance, size: kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone ? 60 : 30);
- function = () {
- Navigator.pushNamed(
- context,
- '/banco',
- );
- };
- break;
- case 1:
- icon = Icon(Icons.timer_off_outlined, size: kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone ? 60 : 30);
- function = () {
- Navigator.pushNamed(context, '/marcacoes', arguments: 4);
- };
- break;
- default:
- icon = Container();
- function = null;
- break;
- }
- }
-}
-
-
diff --git a/example/lib/ui/home/home.dart b/example/lib/ui/home/home.dart
deleted file mode 100644
index f4b82cb..0000000
--- a/example/lib/ui/home/home.dart
+++ /dev/null
@@ -1,284 +0,0 @@
-
-import 'package:flutter/foundation.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-import 'package:assecontservices/assecontservices.dart';
-
-import '../../controller/gps.dart';
-import '../../controller/home_controller.dart';
-import '../../controller/tutor_controller.dart';
-
-import '../banco_horas/banco_screen.dart';
-import '../comprovantes/comprovantes_screen.dart';
-import '../espelho/espelho_screen.dart';
-import '../marcacoes/Marcacoes.dart';
-import '../registro/screen_registro.dart';
-import '../solicitacoes/solicitacoes_screen.dart';
-import 'componentes/resultados.dart';
-
-class Home extends StatefulWidget {
- @override
- _HomePageState createState() => _HomePageState();
-}
-
-class _HomePageState extends State {
- final ScrollController scrollController = ScrollController();
-
- bool load = false;
-
- deleteHist() {
- RegistroManger().deleteHistorico();
- }
-
- @override
- void initState() {
- context.read().getHome();
- context
- .read()
- .getPeriodo(context.read().usuario);
-
- RegistroManger().enviarMarcacoes();
- deleteHist();
- if (!kIsWeb) {
- context.read().init(context);
- } else {
- BiometriaAlert(context);
- }
- super.initState();
- }
-
- @override
- void dispose() {
- super.dispose();
- }
-
- @override
- Widget build(BuildContext context) {
-
-
- return Container(
- color: context.watch().darkTemas
- ? Theme.of(context).appBarTheme.backgroundColor
- : Config.corPribar,
- child: SafeArea(
- child: Consumer(builder: (_, user, __) {
- return CustomScaffold.home(
- context: context,
- height: 170 + MediaQuery.of(context).padding.top,
- keyListMenu: context.read().keyListMenu,
- listMenu: [
- if(kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone)
- CustomMenuItem(
- const Icon(Icons.fingerprint_sharp),
- 'Registrar',
- () {
- context.read().setPage(0);
- },
- isSelect: context.watch().page == 0,
- ),
- CustomMenuItem(
- const Icon(Icons.calendar_month_sharp),
- 'Marcações',
- () {
- if(kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone) context.read().setPage(1);
- else Navigator.pushNamed(context, '/marcacoes');
- },
- isSelect: context.watch().page == 1
- ),
- if (!(user.usuario?.app ?? false))
- CustomMenuItem(
- const Icon(Icons.receipt_rounded),
- 'Comprovantes',
- () {
- if(kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone) context.read().setPage(5);
- else Navigator.pushNamed(context, '/comprovantes');
- },
- isSelect: context.watch().page == 5,
- ),
- CustomMenuItem(
- const Icon(
- CupertinoIcons.doc_text_fill,
- ),
- 'Espelho de Ponto',
- () {
- if (user.usuario?.app ?? false) {
- if(kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone) context.read().setPage(2);
- else Navigator.pushNamed(context, '/espelho');
- } else {
- CustomAlert.info(
- context: context,
- mensage:
- 'Você está utilizando a Versão free.\nContate seu gestor para contratar a versão máster!\n',
- );
- }
- },
- isSelect: context.watch().page == 2,
- ),
- CustomMenuItem(
- const Icon(
- Icons.account_balance,
- ),
- 'Banco Horas',
- () {
- if (user.usuario?.app ?? false) {
- if(kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone) context.read().setPage(3);
- else Navigator.pushNamed(context, '/banco');
- } else {
- CustomAlert.info(
- context: context,
- mensage:
- 'Você está utilizando a Versão free.\nContate seu gestor para contratar a versão máster!\n',
- );
- }
- },
- isSelect: context.watch().page == 3,
- ),
- CustomMenuItem(
- const Icon(Icons.question_answer),
- 'Solicitações',
- () {
- if (user.usuario?.app ?? false) {
- if(kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone) context.read().setPage(4);
- else Navigator.pushNamed(context, '/solicitacoes');
- } else {
- CustomAlert.info(
- context: context,
- mensage:
- 'Você está utilizando a Versão free.\nContate seu gestor para contratar a versão máster!\n',
- );
- }
- },
- isSelect: context.watch().page == 4,
- ),
- if (user.usuario?.app ?? false)
- CustomMenuItem(
- const Icon(Icons.receipt_rounded),
- 'Comprovantes',
- () {
- if(kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone) context.read().setPage(5);
- else Navigator.pushNamed(context, '/comprovantes');
- },
- isSelect: context.watch().page == 5,
- ),
-
- CustomMenuItem(
- const Icon(Icons.monetization_on_outlined),
- 'Holerites',
- () {
- if (user.usuario?.app ?? false) {
- if(kIsWeb && !ResponsiveBreakpoints.of(context).isMobile && !ResponsiveBreakpoints.of(context).isPhone) context.read().setPage(6);
- else Navigator.pushNamed(context, '/holerites');
- } else {
- CustomAlert.info(
- context: context,
- mensage:
- 'Você está utilizando a Versão free.\nContate seu gestor para contratar a versão máster!\n',
- );
- }
- },
- isSelect: context.watch().page == 6,
- ),
- ],
- keyMenu: context.read().keyMenu,
- key1: context.read().keyMenu1,
- key2: context.read().keyMenu2,
- key3: context.read().keyMenu3,
- key4: context.read().keyMenu4,
- key5: context.read().keyMenu5,
- foto: user.usuario?.funcionario?.foto,
- nome: user.usuario?.funcionario?.nome,
- cargo: user.usuario?.funcionario?.cargo,
- dados: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- CustomText.text(
- 'Olá, ' + (user.usuario?.funcionario?.nome ?? ''),
- maxLines: 1,
- overflow: TextOverflow.visible,
- style: const TextStyle(
- fontWeight: FontWeight.bold,
- fontSize: 18,
- color: Config.corPri),
- ),
- CustomText.text(
- user.usuario?.funcionario?.cargo ?? '',
- maxLines: 1,
- style: const TextStyle(
- fontSize: 14,
- color: Config.corPri,
- letterSpacing: 1,
- ),
- ),
- const SizedBox(
- height: 20,
- ),
- ],
- ),
- appTitle: 'ASSEPONTO APP',
- body: PageView(
- controller: HomeController.pageController,
- pageSnapping: false,
- physics: const NeverScrollableScrollPhysics(),
- children: [
- ResiltatosView(user.usuario,user.homeModel, scrollController),
- MarcacoesPage(),
- EspelhoScreen(),
- BancoHorasScreen(),
- Solicitacoes(),
- ComprovantesScreen(),
- HoleriteScreen(),
- ]
- ),
- buttom: context.watch().page != 0 ? null : FloatingActionButton.extended(
- key: context.read().keyRegistro,
- backgroundColor: Config.corPri,
- onPressed: () async {
- if(kIsWeb){
- if(user.usuario?.funcionario?.permitirMarcarPontoWeb ?? true){
- await context.read().postPontoMarcar(
- context, context.read().usuario!, null, null,
- );
- }else{
- CustomAlert.info(
- context: context,
- mensage: 'Você não tem permissão para marca o ponto!',
- );
- }
- }else{
- if (user.usuario?.funcionario?.permitirMarcarPonto ?? true) {
- if (context
- .read()
- .usuario
- ?.funcionario
- ?.capturarGps ??
- false) {
- context.read().localizacao();
- }
- Navigator.push(
- context,
- MaterialPageRoute(builder: (context) => RegistroScreen()),
- );
- //setState(() {});
- } else {
- CustomAlert.info(
- context: context,
- mensage: 'Você não tem permissão para marca o ponto!',
- );
- }
- }
- },
- label: CustomText.text(
- 'REGISTRAR',
- style: const TextStyle(fontSize: 20, color: Colors.white),
- )
- ),
- );
- }),
- ),
- );
- }
-
-
-}
diff --git a/example/lib/ui/login/esqueci_senha_screen.dart b/example/lib/ui/login/esqueci_senha_screen.dart
deleted file mode 100644
index ee095d1..0000000
--- a/example/lib/ui/login/esqueci_senha_screen.dart
+++ /dev/null
@@ -1,153 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-
-import 'package:assecontservices/assecontservices.dart';
-
-
-class EsqueciSenhaScreen extends StatefulWidget {
- final GlobalKey scaffoldKey;
- EsqueciSenhaScreen(this.scaffoldKey);
-
- @override
- State createState() => _EsqueciSenhaScreenState();
-}
-
-class _EsqueciSenhaScreenState extends State {
- final GlobalKey _formKey = GlobalKey();
-
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: const EdgeInsets.all(20.0),
- child:Form(
- key: _formKey,
- child: ListView(
- children: [
- _menssagem(),
- const SizedBox(height: 13,),
-
- textFormFieldEmail(context),
-
- const SizedBox(height: 13,),
- _enviarSenha(context),
- ],
- )),
- );
- }
-
- Container _menssagem( ) {
- return Container(
- padding: const EdgeInsets.symmetric(horizontal: 15),
- child: CustomText.text("Informe o seu e-mail para o envio de sua senha",
- textAlign: TextAlign.center,
- style: TextStyle(
- fontSize: 24, color: Colors.white,),
- ),
- );
- }
-
- //Enviar Senha
- Widget _enviarSenha(BuildContext context) {
- double w = MediaQuery.of(context).size.width;
-
- return Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- children: [
- Container(
- width: w * 0.4 > 200 ? 200 : w * 0.4,
- //margin: EdgeInsets.symmetric(horizontal: 15),
- alignment: Alignment.center,
- decoration: const BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(15)),
- color: Colors.white,
- ),
- child: TextButton(
- onPressed: () {
- context.read().setPage(0);
- },
- child: Center(
- child: CustomText.text( 'VOLTAR',
- style: TextStyle(fontSize: 20, color: Config.corPribar),),
- ),
- ),
- ),
- Container(
- width: w * 0.4 > 200 ? 200 : w * 0.4,
- //margin: EdgeInsets.symmetric(horizontal: 15),
- alignment: Alignment.center,
- decoration: const BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(15)),
- color: Colors.white,
- ),
- child: TextButton(
- onPressed: () {
- _clickLogin(context);
- },
- child: Center(
- child: CustomText.text('ENVIAR',
- style: TextStyle(fontSize: 20, color: Config.corPribar),),
- ),
- ),
- )
- ]);
- }
-
- textFormFieldEmail(BuildContext context) {
- return Container(
- padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 15),
- child: TextFormField(
- keyboardType: TextInputType.emailAddress,
- controller: context.watch().email,
- style: const TextStyle(color: Colors.white),
- decoration: InputDecoration(
- enabledBorder: const UnderlineInputBorder(borderSide: BorderSide(color: Colors.white)),
- border: const UnderlineInputBorder(borderSide: BorderSide(color: Colors.white)),
- hintStyle: const TextStyle(
- color: Colors.white,
- ),
- errorStyle: TextStyle( color: Colors.red[100]),
- hintText: "E-mail",
- prefixIcon: const Padding(
- padding: EdgeInsets.only(left: 5,right: 10),
- child: Icon(
- Icons.person,
- color: Colors.white,
- size: 25,
- ),
- ),
- ),
- validator: (email){
- if(!emailValid(email!)){
- return 'E-mail inválido';
- }else{
- return null;
- }
- },
- ),
- );
- }
-
- _clickLogin(BuildContext context) async {
- if (_formKey.currentState!.validate()) {
- carregar(context,);
- bool result = await context.read().sendPass(
- context.read().email.text,
- );
- if(result){
- Navigator.pop(context);
- context.read().setPage(0);
- await CustomAlert.sucess(
- context: context,
- mensage: 'Nova senha enviada para seu email!\n',
- );
- }else{
- Navigator.pop(context);
- await CustomAlert.erro(
- context: context,
- mensage: 'Não foi possivel enviar sua senha, tente novamente!',
- );
- }
- }
- }
-}
diff --git a/example/lib/ui/login/login_screen.dart b/example/lib/ui/login/login_screen.dart
deleted file mode 100644
index 33e4b23..0000000
--- a/example/lib/ui/login/login_screen.dart
+++ /dev/null
@@ -1,352 +0,0 @@
-import 'package:flutter/cupertino.dart';
-import 'package:flutter/foundation.dart';
-import 'package:flutter/material.dart';
-
-import 'package:assecontservices/assecontservices.dart';
-
-
-
-class LoginScreen extends StatefulWidget {
- const LoginScreen(
- this.scaffoldKey,
- );
-
- final GlobalKey scaffoldKey;
-
- @override
- _LoginScreenState createState() => _LoginScreenState();
-}
-
-class _LoginScreenState extends State {
- final GlobalKey _formKey = GlobalKey();
- final GlobalKey _formKeyEmail = GlobalKey();
- bool load = false;
- bool loadAcessar = true;
-
- @override
- void initState() {
- super.initState();
- loadAcessar = !kIsWeb;
- }
-
- @override
- Widget build(BuildContext context) {
- return Container(
- child: SingleChildScrollView(
- padding: const EdgeInsets.all(25.0),
- child: Column(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: [
- loadAcessar ? acessar() : loginSenha(),
- const SizedBox(
- height: 20,
- ),
- !load
- ? Container(
- margin: const EdgeInsets.symmetric(horizontal: 15),
- alignment: Alignment.center,
- decoration: const BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(15)),
- color: Colors.white,
- ),
- child: TextButton(
- onPressed: () {
- loadAcessar
- ? _clickAcesso(context
- .read()
- .email
- .text
- .trim())
- : _clickLogin(
- context.read().email.text.trim(),
- context.read().senha.text);
- },
- child: Center(
- child: CustomText.text(
- loadAcessar ? 'ACESSAR' : 'LOGIN',
- style: TextStyle(
- fontSize: 20, color: Config.corPribar),
- ),
- ),
- ),
- )
- : const Center(
- child: CircularProgressIndicator(),
- ),
- const SizedBox(
- height: 20,
- ),
- Container(
- alignment: Alignment.centerRight,
- decoration: const BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(15)),
- ),
- child: TextButton(
- onPressed: () {
- context.read().setPage(1);
- },
- child: Center(
- child: CustomText.text(
- 'ESQUECEU A SENHA',
- style: TextStyle(
- color: Colors.white70,
- fontWeight: FontWeight.w900,
- fontSize: 12
- ),
- ),
- ),
- ),
- ),
- if(!Config.isIOS)
- Container(
- alignment: Alignment.centerRight,
- decoration: const BoxDecoration(
- borderRadius: BorderRadius.all(Radius.circular(15)),
- ),
- child: TextButton(
- onPressed: () {
- PrimeiroAcessoAlert(context);
- },
- child: Center(
- child: CustomText.text(
- 'PRIMEIRO ACESSO',
- style: TextStyle(
- color: Colors.white70,
- fontWeight: FontWeight.w900,
- fontSize: 12
- ),
- ),
- ),
- ),
- ),
- ])),
- );
- }
-
- Widget acessar() {
- return Form(
- key: _formKeyEmail,
- child: Container(
- padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 15),
- child: TextFormField(
- keyboardType: TextInputType.emailAddress,
- controller: context.watch().email,
- style: const TextStyle(color: Colors.white),
- decoration: InputDecoration(
- suffixIcon: IconButton(
- icon: const Icon(
- Icons.clear,
- color: Colors.white54,
- size: 25,
- ),
- onPressed: () {
- context.read().email.clear();
- }),
- enabledBorder: const UnderlineInputBorder(
- borderSide: BorderSide(color: Colors.white)),
- border: const UnderlineInputBorder(
- borderSide: BorderSide(color: Colors.white)),
- hintStyle: const TextStyle(
- color: Colors.white,
- ),
- errorStyle: TextStyle(color: Colors.red[100]),
- hintText: "E-mail",
- prefixIcon: const Padding(
- padding: EdgeInsets.only(left: 5, right: 10),
- child: Icon(
- Icons.person,
- color: Colors.white,
- size: 25,
- ),
- ),
- ),
- validator: (email) {
- if (!emailValid(email!)) {
- return 'E-mail inválido';
- } else {
- return null;
- }
- },
- ),
- ),
- );
- }
-
- Widget loginSenha() {
- final focus = FocusNode();
-
- return Form(
- key: _formKey,
- child: Column(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: [
- Container(
- padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 15),
- child: TextFormField(
- keyboardType: TextInputType.emailAddress,
- controller: context.watch().email,
- style: const TextStyle(color: Colors.white),
- decoration: InputDecoration(
- enabledBorder: const UnderlineInputBorder(
- borderSide: BorderSide(color: Colors.white)),
- border: const UnderlineInputBorder(
- borderSide: BorderSide(color: Colors.white)),
- hintStyle: const TextStyle(
- color: Colors.white,
- ),
- errorStyle: TextStyle(color: Colors.red[100]),
- hintText: "E-mail",
- suffix: GestureDetector(
- child: const Icon(
- Icons.clear,
- color: Colors.white54,
- size: 25,
- ),
- onTap: () {
- context.read().email.clear();
- }),
-
- prefixIcon: const Padding(
- padding: EdgeInsets.only(left: 5, right: 10),
- child: Icon(
- Icons.person,
- color: Colors.white,
- size: 25,
- ),
- ),
- ),
- onSaved: (t){
- FocusScope.of(context).requestFocus(focus);
- },
- validator: (email) {
- if (!emailValid(email!)) {
- return 'E-mail inválido';
- } else {
- return null;
- }
- },
- ),
- ),
- Container(
- padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 15),
- child: TextFormField(
- keyboardType: TextInputType.visiblePassword,
- controller: context.watch().senha,
- style: const TextStyle(color: Colors.white),
- focusNode: focus,
- decoration: InputDecoration(
- suffixIcon: GestureDetector(
- child: const Icon(
- Icons.clear,
- color: Colors.white54,
- size: 25,
- ),
- onTap: () {
- context.read().senha.clear();
- }),
- enabledBorder: const UnderlineInputBorder(
- borderSide: BorderSide(color: Colors.white)),
- border: const UnderlineInputBorder(
- borderSide: BorderSide(color: Colors.white)),
- hintStyle: const TextStyle(
- color: Colors.white,
- ),
- errorStyle: TextStyle(color: Colors.red[100]),
- hintText: "Senha",
- alignLabelWithHint: true,
- prefixIcon: const Padding(
- padding: EdgeInsets.only(left: 5, right: 10),
- child: Icon(
- Icons.lock_outline,
- color: Colors.white,
- size: 25,
- ),
- ),
- ),
- obscureText: true,
- onSaved: (value){
- _clickLogin(
- context.read().email.text.trim(),
- context.read().senha.text);
- },
- validator: (senha) {
- if (senha!.isEmpty || senha.length < 0) {
- return "Digite sua senha!";
- } else {
- return null;
- }
- },
- ),
- ),
- Container(
- child: Theme(
- data: Theme.of(context).copyWith(
- disabledColor: Colors.white,
- unselectedWidgetColor: Colors.white),
- child: CheckboxListTile(
- title: CustomText.text(
- "Manter-se Logado",
- style: TextStyle(color: Colors.white),
- ),
- activeColor: Colors.redAccent,
- value: context.watch().status,
- onChanged: (valor) {
- context.read().status = valor!;
- }),
- ))
- ],
- ),
- );
- }
-
- _clickLogin(String email, String senha) async {
- if (_formKey.currentState!.validate()) {
- bool? result = await context.read().auth(context, email, senha, false);
-
- if(result ?? false){
- Navigator.pushNamedAndRemoveUntil(context, '/home', (route) => false);
- }
- }
- }
-
- _clickAcesso(String email) async {
- if (_formKeyEmail.currentState!.validate()) {
- if (context.read().bio) {
- if (email == context.read().uemail) {
- bool? result = await context.read().auth(context,
- email, '', true,
- ).onError((error, stackTrace) {
- setState(() {
- loadAcessar = false;
- });
- });
-
- if(result ?? false){
- Config.usenha = context.read().senha.text;
- Navigator.pushNamedAndRemoveUntil(context, '/home', (route) => false);
- }else{
- setState(() {
- loadAcessar = false;
- });
- }
- } else {
- setState(() {
- loadAcessar = false;
- });
- }
- } else {
- setState(() {
- loadAcessar = false;
- });
- }
- } else {
- setState(() {
- loadAcessar = false;
- });
- }
- }
-}
-
-//isabelaf@assecont.com.br
diff --git a/example/lib/ui/login/start_screen.dart b/example/lib/ui/login/start_screen.dart
deleted file mode 100644
index 4d7b266..0000000
--- a/example/lib/ui/login/start_screen.dart
+++ /dev/null
@@ -1,76 +0,0 @@
-import 'package:flutter/cupertino.dart';
-import 'package:flutter/material.dart';
-
-import 'package:assecontservices/assecontservices.dart';
-
-import 'esqueci_senha_screen.dart';
-import 'login_screen.dart';
-
-class StartScreen extends StatelessWidget {
- final GlobalKey _scaffoldKey = GlobalKey();
- final PageController pageController = PageController();
-
-
- @override
- Widget build(BuildContext context) {
- double height = MediaQuery.of(context).size.height;
- double width = MediaQuery.of(context).size.width;
- return Scaffold(key: _scaffoldKey,
- body: Container(
- alignment: Alignment.center,
- constraints: BoxConstraints.expand(),
- decoration: BoxDecoration(
- gradient: LinearGradient(
- begin: Alignment.topCenter,
- end: Alignment.bottomCenter,
- colors: [Config.corPribar2, Config.corPribar]
- )
- ),
- child: ChangeNotifierProvider(
- create: (_) => PageManager(pageController),
- child: SingleChildScrollView(
- child: Container(
- width: width,height: height,
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- flex: 1,
- child: Container(
- //width: width,
- alignment: Alignment.bottomCenter,
- padding: EdgeInsets.only(
- left: height * 0.050, right: height * 0.050, //top: height * 0.050
- ),
- child: Image.asset("assets/imagens/logo-assepontoweb.png",
- fit: BoxFit.fitWidth,
- )
- ),
- ),
-
- Expanded(
- flex: 2,
- child: Container(
- //height: height * 0.60,
- constraints: BoxConstraints(maxWidth: 500),
- alignment: Alignment.topCenter,
- child: PageView(
- controller: pageController,
- physics: const NeverScrollableScrollPhysics(),
- children: [
- LoginScreen(_scaffoldKey),
- EsqueciSenhaScreen(_scaffoldKey)
- ]),
- ),
- ),
- ]
- ),
- ),
- ),
- ),
- ),
- );
- }
-
-}
diff --git a/example/lib/ui/marcacoes/Marcacoes.dart b/example/lib/ui/marcacoes/Marcacoes.dart
deleted file mode 100644
index bf75a69..0000000
--- a/example/lib/ui/marcacoes/Marcacoes.dart
+++ /dev/null
@@ -1,85 +0,0 @@
-import 'package:flutter/foundation.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-
-import 'package:assecontservices/assecontservices.dart';
-
-import '../../controller/home_controller.dart';
-import 'detelhes_marcacao.dart';
-
-class MarcacoesPage extends StatefulWidget {
- int? filtro;
- MarcacoesPage({this.filtro});
-
- @override
- _MarcacoesState createState() => _MarcacoesState();
-}
-
-class _MarcacoesState extends State {
- final GlobalKey _scaffoldKey = new GlobalKey();
- ConnectionStatusSingleton connectionStatus = ConnectionStatusSingleton.getInstance();
-
- final CalendarWeekController _controller = CalendarWeekController();
-
-
- @override
- void initState() {
- if(kIsWeb) widget.filtro = context.read().filtro;
- context.read().getEspelho(filtro: widget.filtro);
- super.initState();
- }
-
- @override
- Widget build(BuildContext context) {
-
- return Consumer(
- builder: (_, marcacao, __){
-
- return CustomScaffold.calendario(
- key: _scaffoldKey,
- context: context,
- appTitle:'Marcações',
- funcData: (DateTime datetime) {
- marcacao.data = datetime;
- },
- listdecoration: marcacao.listdecoration,
- controller: _controller,
- dataInit: marcacao.data,
- dataMin: context.read().usuario?.periodo?.dataInicial,
- dataMax: context.read().usuario?.periodo?.dataFinal,
- body: Center(
- child: !connectionStatus.hasConnection ? CustomText.text('Verifique sua Conexão com Internet') :
- FutureBuilder(
- future: marcacao.getMarcacaoDia(),
- builder: (context, snapshot){
- Widget resultado;
- switch( snapshot.connectionState ){
- case ConnectionState.none :
- case ConnectionState.waiting :
- resultado = const CircularProgressIndicator();
- break;
- case ConnectionState.active :
- case ConnectionState.done :
- if( snapshot.hasError ){
- resultado = GestureDetector(
- child: Icon(Icons.autorenew_outlined,
- color: Config.corPri, size: 70,),
- onTap: (){
- setState(() {});
- }
- );
- }else {
- resultado = DetalhesMarcacao(snapshot.data, marcacao.data);
- }
- break;
- }
- return resultado;
- },
- )
- )
- );
- }
- );
- }
-}
diff --git a/example/lib/ui/marcacoes/detelhes_marcacao.dart b/example/lib/ui/marcacoes/detelhes_marcacao.dart
deleted file mode 100644
index 4b04574..0000000
--- a/example/lib/ui/marcacoes/detelhes_marcacao.dart
+++ /dev/null
@@ -1,117 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-import 'package:assecontservices/assecontservices.dart';
-
-import '../solicitacoes/lancar_solicitacao.dart';
-import '../solicitacoes/solicitacoes_screen.dart';
-
-
-class DetalhesMarcacao extends StatefulWidget {
- Marcacao? listaMarcacao;
- DateTime? dia;
- DetalhesMarcacao(this.listaMarcacao, this.dia);
-
- @override
- _DetalhesMarcacaoState createState() => _DetalhesMarcacaoState();
-}
-
-class _DetalhesMarcacaoState extends State {
- final ScrollController scrollController = ScrollController();
- Widget card(String menu, String valor){
- return Container(
- padding: const EdgeInsets.symmetric(vertical: 5, horizontal: 35),
- child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- CustomText.text(menu, style: const TextStyle(fontSize: 20),),
- CustomText.text(valor, style: const TextStyle(fontSize: 20)),
- ],
- ),
- );
- }
-
- @override
- Widget build(BuildContext context) {
- List list = context.watch().memorandoDia(widget.dia);
-
- return Scaffold(
- body: Container(
- decoration: (UserPontoManager().usuario?.app ?? false) ?
- BoxDecoration(
- border: Border(bottom: BorderSide(width: 80,
- color: Theme.of(context).scaffoldBackgroundColor))
- ) : null,
- height: MediaQuery.of(context).size.height,
- child: SingleChildScrollView(
- controller: scrollController,
- child: Column(crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- const SizedBox(height: 15,),
- Padding(
- padding: EdgeInsets.symmetric(horizontal: 30),
- child: CustomText.text('Marcações'),
- ),
- const SizedBox(height: 5,),
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 30),
- child: Center(
- child: CustomText.text(widget.listaMarcacao?.marcacao.toString().
- replaceAll("[", "").replaceAll("]", "").replaceAll(",", " -") ?? "",
- maxLines: 2, style: const TextStyle(fontSize: 18),
- ),
- ),
- ),
- const Padding(
- padding: EdgeInsets.symmetric(horizontal: 30, vertical: 10),
- child: Divider(height: 2,),
- ),
- Padding(
- padding: EdgeInsets.symmetric(horizontal: 30),
- child: CustomText.text('Resumo'),
- ),
- const SizedBox(height: 5,),
- card("Horas Extras:", widget.listaMarcacao?.resultado?.extras ?? "0:00"),
- const SizedBox(height: 10,),
- card("Noturno:", widget.listaMarcacao?.resultado?.noturno ?? "0:00"),
- const SizedBox(height: 10,),
- card("Abonos:", widget.listaMarcacao?.resultado?.abono ?? "0:00"),
- const SizedBox(height: 10,),
- card("Descontos", widget.listaMarcacao?.resultado?.descontos ?? "0:00"),
- const SizedBox(height: 10,),
- card("Falta:", widget.listaMarcacao?.resultado?.faltasDias.toString() ?? "0"),
- const SizedBox(height: 10,),
- Padding(
- padding: EdgeInsets.symmetric(horizontal: 30),
- child: CustomText.text('Obs: Esses dados podem ser alterados ate o fechamento!'),
- ),
-
- const Padding(
- padding: EdgeInsets.symmetric(horizontal: 30, vertical: 5),
- child: Divider(height: 2,),
- ),
- //Expanded(child: null)
- ListSolicitacoes( list, 90.0 * list.length, scrollController)
- ]),
- ),
- ),
- floatingActionButtonLocation: (UserPontoManager().usuario?.app ?? false) ?
- FloatingActionButtonLocation.centerFloat : null,
- floatingActionButton: (UserPontoManager().usuario?.app ?? false) ?
- FloatingActionButton.extended(
- backgroundColor: Config.corPri,
- onPressed: () async {
- CustomAlert.custom(
- context: context,
- titulo: 'LANÇAR SOLICITAÇÃO',
- corpo: Container(
- child: LancarSolicitacao(
- data: widget.dia
- )
- ),
- );
- },
- label: CustomText.text('Solicitação'.toUpperCase(), style: const TextStyle(fontSize: 20, color: Colors.white),)
- ) : null,
- );
- }
-}
diff --git a/example/lib/ui/password/alterar_senha.dart b/example/lib/ui/password/alterar_senha.dart
deleted file mode 100644
index 9fb882b..0000000
--- a/example/lib/ui/password/alterar_senha.dart
+++ /dev/null
@@ -1,165 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-import 'dart:ui';
-
-
-import 'package:assecontservices/assecontservices.dart';
-
-
-
-Future AlterarSenhaModal(BuildContext context){
- return CustomAlert.custom(
- context: context,
- titulo: 'Alterar Senha'.toUpperCase(),
- corpo: AlertSenha()
- );
-}
-
-class AlertSenha extends StatefulWidget {
-
- @override
- _AlertSenhaState createState() => _AlertSenhaState();
-}
-
-class _AlertSenhaState extends State {
- final GlobalKey _formKey = GlobalKey();
- final TextEditingController senhaAtual = TextEditingController();
- final TextEditingController senhaNova = TextEditingController();
- bool _showSenhaAtual = true;
- bool _showSenhaNova = true;
-
-
- @override
- Widget build(BuildContext context) {
-
- return Container(
- child: Form(
- key: _formKey,
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- CustomText.text(
- "Deseja trocar a senha?",
- textAlign: TextAlign.center,
- style: TextStyle(fontSize: 20),
- ),
- const SizedBox(height: 12,),
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 10,),
- child: TextFormField(
- controller: senhaAtual,
- validator: (value) {
- if (value == null || value == '') {
- return "Digite sua senha";
- }else if(value != Config.usenha){
- return "Senha Inválida";
- }
- return null;
- },
- decoration: InputDecoration(
- labelText: "Senha Atual",
- errorStyle: const TextStyle(color: Colors.red),
- border: OutlineInputBorder(
- borderRadius: BorderRadius.circular(5.0),
- ),
-
- suffixIcon: GestureDetector(
- child: Icon(
- !_showSenhaAtual
- ? Icons.visibility_off
- : Icons.visibility,
- color: context.watch().darkTemas ? Colors.white : Colors.black,
- ),
- onTap: () {
- setState(() {
- _showSenhaAtual = !_showSenhaAtual;
- });
- },
- ),
- ),
- obscureText: _showSenhaAtual,
-
- ),
- ),
-
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 15),
- child: TextFormField(
- controller: senhaNova,
- validator: (value) {
- if (value == null || value == '') {
- return "Digite sua nova senha";
- }
- return null;
- },
- decoration: InputDecoration(
- labelText: "Nova Senha",
- errorStyle: const TextStyle(color: Colors.red),
- border: OutlineInputBorder(
- borderRadius: BorderRadius.circular(5.0),
- ),
- suffixIcon: GestureDetector(
- child: Icon(
- !_showSenhaNova
- ? Icons.visibility_off
- : Icons.visibility,
- color: context.watch().darkTemas ? Colors.white : Colors.black,
- ),
- onTap: () {
- setState(() {
- _showSenhaNova = !_showSenhaNova;
- });
- },
- ),
- ),
- obscureText: _showSenhaNova,
- ),
- ),
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 10,),
- child: TextButton(
- style: TextButton.styleFrom(
- primary: Colors.white,
- backgroundColor: Config.corPri,
- ),
- child: Center(
- child: CustomText.text("ENVIAR",
- style: TextStyle(color: Colors.white, fontSize: 20.0),
- ),
- ),
- // onPressed: () {},
- onPressed: () async {
- if (_formKey.currentState!.validate()) {
- carregar(context);
- bool result = await context.read().alteracaoPass(
- context, context.read().usuario!,
- senhaAtual.text, senhaNova.text,
- );
-
- if(result){
- Navigator.pop(context);
- Navigator.pop(context);
- CustomAlert.sucess(
- context: context,
- mensage: 'Senha Alterada!',
- );
- }else{
- Navigator.pop(context);
- CustomAlert.erro(
- context: context,
- mensage: 'Senha Alterada!\n',
- );
- }
- }
- },
- ),
- ),
- const SizedBox(height: 15,)
- ],
- ),
- )
- );
- }
-}
-
diff --git a/example/lib/ui/registro/screen_registro.dart b/example/lib/ui/registro/screen_registro.dart
deleted file mode 100644
index a2c4169..0000000
--- a/example/lib/ui/registro/screen_registro.dart
+++ /dev/null
@@ -1,369 +0,0 @@
-import 'dart:async';
-import 'dart:convert';
-import 'package:flutter/material.dart';
-import 'package:flutter/cupertino.dart';
-
-import 'package:google_maps_flutter/google_maps_flutter.dart';
-import 'package:shimmer/shimmer.dart';
-import 'package:assecontservices/assecontservices.dart';
-
-
-import '../../controller/gps.dart';
-
-
-class RegistroScreen extends StatefulWidget {
- @override
- _RegistroState createState() => _RegistroState();
-}
-
-class _RegistroState extends State {
- String txt = "Ponto Registrado com Sucesso";
-
-/* @override
- void initState() {
- super.initState();
- img = context.read().img;
- mapa = GoogleMap(
- buildingsEnabled: false,
- zoomControlsEnabled: false,
- mapToolbarEnabled: false,
- rotateGesturesEnabled: false,
- scrollGesturesEnabled: false,
- zoomGesturesEnabled: false,
- myLocationButtonEnabled: false,
- tiltGesturesEnabled: false,
- mapType: MapType.normal,
- myLocationEnabled: true,
- initialCameraPosition: context.read().cam,
- onMapCreated: onMapCreated
- );
- }*/
-
- @override
- Widget build(BuildContext context) {
- dynamic data = DateFormat('EEEE d MMM y', 'pt_BR').format(DateTime.now());
- double height = MediaQuery.of(context).size.height -
- AppBar().preferredSize.height - MediaQuery.of(context).padding.top;
- double width = MediaQuery.of(context).size.width;
-
- return Scaffold(
- appBar: AppBar(
- title: CustomText.text('Marcação de Ponto'),
- centerTitle: true,
- actions: [
- actions(context, registro: true),
- ],
- ),
- body: Container(
- height: height,
- child: SingleChildScrollView(
- child: Stack(
- alignment: AlignmentDirectional.topCenter,
- children: [
- Container(
- height: height,
- width: width,
- child: Mapa(),
- ),
- Container(
- height: 276,
- decoration: BoxDecoration(
- color: context.watch().darkTemas
- ? Theme.of(context).primaryColor
- : Config.corPribar,
- borderRadius: const BorderRadius.only(
- bottomRight: Radius.circular(45),
- bottomLeft: Radius.circular(45),
- )),
- alignment: Alignment.topCenter,
- child: Column(
- //mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: [
- Container(
- width: width * 0.6,
- padding: const EdgeInsets.only(left: 15, right: 5),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- CustomText.text(
- 'Olá, ${context
- .read()
- .usuario
- ?.funcionario
- ?.nome ??
- ''}',
- maxLines: 1,
- overflow: TextOverflow.visible,
- style: const TextStyle(
- fontWeight: FontWeight.bold,
- fontSize: 18,
- color: Config.corPri),
- ),
- CustomText.text(
- context
- .read()
- .usuario
- ?.funcionario
- ?.cargo ??
- '',
- maxLines: 1,
- style: const TextStyle(
- fontSize: 14,
- color: Config.corPri,
- letterSpacing: 1,
- ),
- ),
- ],
- ),
- ),
- Padding(
- padding: const EdgeInsets.all(5.0),
- child: Hero(
- tag: "foto",
- child: GestureDetector(
- onTap: () async {
- List? _img = await Navigator.push(
- context,
- MaterialPageRoute(
- builder: (context) => ImageHero(context
- .read()
- .usuario
- ?.funcionario
- ?.foto ==
- null
- ? null
- : base64Decode(context
- .read()
- .usuario!
- .funcionario!
- .foto!))));
-
- if (_img != null) {
- context
- .read()
- .usuario
- ?.funcionario
- ?.foto = base64Encode(_img);
- }
- },
- child: Container(
- alignment: Alignment.center,
- height: 115,
- width: 115,
- decoration: BoxDecoration(
- border: context
- .read()
- .usuario
- ?.funcionario
- ?.foto !=
- null
- ? Border.all(
- color: Config.corPri, width: 2)
- : Border.all(
- color: Colors.white, width: 5),
- borderRadius: BorderRadius.circular(100),
- color: Config.corPri,
- image: context
- .read()
- .usuario
- ?.funcionario
- ?.foto !=
- null
- ? DecorationImage(
- image: MemoryImage(base64Decode(
- context
- .read()
- .usuario!
- .funcionario!
- .foto!)),
- fit: BoxFit.cover)
- : null),
- child: context
- .read()
- .usuario
- ?.funcionario
- ?.foto ==
- null
- ? const Icon(
- CupertinoIcons.person,
- color: Colors.white,
- size: 105,
- )
- : null,
- ),
- ),
- ),
- ),
- ],
- ),
- Consumer(
- builder: (_, hora, __) {
- return Container(
- alignment: Alignment.center,
- padding: const EdgeInsets.only(
- top: 20,
- ),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Padding(
- padding: const EdgeInsets.only(bottom: 5),
- child: CustomText.text(
- data
- .toUpperCase()
- .toString()
- .replaceAll("-FEIRA", ""),
- textAlign: TextAlign.center,
- style: const TextStyle(
- fontWeight: FontWeight.bold,
- fontSize: 18,
- color: Colors.white,
- letterSpacing: 1),
- ),
- ),
- CustomText.text(
- hora.horarioAtual,
- textAlign: TextAlign.center,
- style: const TextStyle(
- fontSize: 70,
- color: Colors.white,
- fontWeight: FontWeight.bold,
- letterSpacing: 2),
- ),
- ],
- ),
- );
- },
- ),
- ],
- ),
- ),
- ],
- ))),
- floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
- floatingActionButton: FloatingActionButton.extended(
- backgroundColor: context.watch().regButtom
- ? Config.corPri.withOpacity(0.7)
- : Config.corPri,
- onPressed: context.watch().regButtom
- ? null
- : () async {
- context.read().regButtom = true;
-
- if (context
- .read()
- .usuario
- ?.funcionario
- ?.capturarGps ??
- false) {
- await context.read().localizacao();
- }
- double? lat = context.read().locationData?.latitude;
- double? long = context.read().locationData?.longitude;
-
- if (!(context.read().usuario?.funcionario?.capturarGps ?? true) || ((await context.read().serviceEnabled))) {
- if(await context.read().isMockLocation){
- CustomAlert.info(
- context: context,
- mensage: 'Identificamos que o recurso de localização fictícia está ativo.\nPor favor, desative essa função para poder realizar a marcação de ponto.',
- );
- }else{
- if (!(context
- .read()
- .usuario
- ?.funcionario
- ?.capturarGps ??
- true) ||
- context.read().locationData != null) {
- await context.read().postPontoMarcar(
- context,
- context.read().usuario!,
- lat,
- long,
- );
- } else {
- CustomAlert.info(
- context: context,
- mensage: 'Aguarde carregar o mapa!',
- );
- }
- }
- } else {
- Navigator.pop(context);
- CustomAlert.info(
- context: context,
- mensage: 'Ative seu GPS!',
- );
- }
- context.read().regButtom = false;
- },
- label: Center(
- child: context.watch().regButtom
- ? Shimmer.fromColors(
- baseColor: context.watch().darkTemas
- ? Colors.grey[800]!
- : Colors.grey[300]!,
- highlightColor: context.watch