├── lib ├── ui │ ├── ui.dart │ └── custom_snackbar.dart ├── models │ ├── models.dart │ ├── perfil.dart │ ├── lugares.dart │ ├── search_result.dart │ ├── route_destination.dart │ ├── reporte.dart │ ├── usuarios_response.dart │ ├── login_response.dart │ ├── mensajes_response.dart │ ├── comentarioPerson.dart │ ├── salas_mensaje_response.dart │ ├── institucionmodel.dart │ └── comentarios.dart ├── helpers │ ├── helpers.dart │ ├── custom_image_marker.dart │ ├── debouncer.dart │ ├── page_route.dart │ ├── show_loading_message.dart │ └── mostrar_alerta.dart ├── resources │ └── services │ │ ├── services.dart │ │ ├── socket_service.dart │ │ └── noification.dart ├── themes │ └── themes.dart ├── views │ ├── views.dart │ ├── image_view.dart │ └── map_view.dart ├── widgets │ ├── widgets.dart │ ├── logo_login.dart │ ├── labels_login.dart │ ├── page_title.dart │ ├── btn_toggle_user_route.dart │ ├── home │ │ ├── btn_follow_user.dart │ │ ├── btn_location.dart │ │ └── searchbar.dart │ ├── background.dart │ ├── boton_login.dart │ └── custom_input.dart ├── global │ └── environment.dart ├── screens │ ├── alerprueba.dart │ ├── product.dart │ ├── loading_map_screen.dart │ ├── alerts_screen.dart │ ├── code_create_sreen.dart │ ├── config_screen.dart │ ├── code_add_sreen.dart │ ├── screens.dart │ ├── image_screen.dart │ ├── home_screen.dart │ ├── perfil │ │ └── edit_nombre.dart │ ├── report_finish_screen.dart │ └── report_screen.dart └── blocs │ ├── gps │ ├── gps_event.dart │ └── gps_state.dart │ ├── blocs.dart │ ├── location │ ├── localtion_event.dart │ └── localtion_state.dart │ ├── auth │ └── auth_state.dart │ ├── navigator │ ├── navigator_bloc.dart │ ├── navigator_state.dart │ └── navigator_event.dart │ ├── notification │ ├── notification_state.dart │ ├── notification_event.dart │ └── notification_bloc.dart │ ├── room │ ├── room_state.dart │ └── room_event.dart │ ├── members │ ├── members_state.dart │ └── members_event.dart │ ├── map │ ├── map_event.dart │ └── map_state.dart │ ├── search │ ├── search_state.dart │ └── search_event.dart │ └── publication │ └── publication_state.dart ├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt └── my_application.h ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-50x50@1x.png │ │ │ ├── Icon-App-50x50@2x.png │ │ │ ├── Icon-App-57x57@1x.png │ │ │ ├── Icon-App-57x57@2x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-72x72@1x.png │ │ │ ├── Icon-App-72x72@2x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ ├── AppDelegate.swift │ ├── GoogleService-Info.plist │ └── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard ├── Runner.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── ios │ └── Runner │ │ └── AppDelegate.swift ├── .gitignore └── macos │ └── Runner │ └── Info.plist ├── macos ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_64.png │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_512.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── DebugProfile.entitlements │ ├── Release.entitlements │ ├── MainFlutterWindow.swift │ └── Info.plist ├── .gitignore ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Runner.xcodeproj │ └── project.xcworkspace │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── assets ├── sos.png ├── ecuador.jpg ├── iconv23.png ├── logonew.png ├── icon │ └── logo.png ├── no-image.png ├── tag-logo.png ├── alertaIcon.png ├── altoparlante.png ├── jar-loading.gif ├── perroPerdido.jpg ├── alertas │ ├── comunicar.png │ ├── corazon.png │ ├── mascotas.png │ ├── newPost.png │ ├── user-usuario.svg │ ├── problemas-de-basura.svg │ ├── emergencia-de-seguridad.svg │ ├── drogas2.svg │ ├── drogas.svg │ ├── emergencia-de-bomberos.svg │ ├── emergencia-de-ambulancia.svg │ ├── robo-a-casa.svg │ ├── problems-de-transporte-publico.svg │ ├── robo-a-persona.svg │ ├── problemas-de-energia.svg │ ├── robo-de-vehiculo.svg │ ├── actividad-sospechosa.svg │ ├── problemas-de-telecomunicaciones.svg │ ├── accidente.svg │ ├── problemas-alcantarillado.svg │ └── disturbios.svg ├── iconvinculacion │ ├── iconvinculacion - Shortcut.lnk │ ├── robo.svg │ ├── otros.svg │ └── maltrato3.svg ├── info │ └── advertencia.svg └── vinculacionalertas │ ├── robo.svg │ └── maltrato3.svg ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json └── index.html ├── key └── bingnotes.jks ├── fonts ├── Roboto-Black.ttf ├── Roboto-Bold.ttf ├── Roboto-Italic.ttf ├── Roboto-Light.ttf ├── Roboto-Medium.ttf ├── Roboto-Thin.ttf ├── Roboto-Regular.ttf ├── Roboto-BlackItalic.ttf ├── Roboto-BoldItalic.ttf ├── Roboto-LightItalic.ttf ├── Roboto-ThinItalic.ttf └── Roboto-MediumItalic.ttf ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── launcher_icon.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── launcher_icon.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── launcher_icon.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── launcher_icon.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── launcher_icon.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── vinicioborja │ │ │ │ │ └── flutter_maps_adv │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── google-services.json │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ ├── main.cpp │ ├── CMakeLists.txt │ ├── utils.cpp │ └── flutter_window.cpp ├── .gitignore └── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ └── generated_plugin_registrant.cc ├── .gitignore ├── .vscode └── settings.json ├── test └── widget_test.dart ├── analysis_options.yaml └── .metadata /lib/ui/ui.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/models/models.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/helpers/helpers.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /lib/resources/services/services.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /lib/themes/themes.dart: -------------------------------------------------------------------------------- 1 | export './uber.dart'; 2 | -------------------------------------------------------------------------------- /lib/views/views.dart: -------------------------------------------------------------------------------- 1 | export 'dart:collection'; 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /assets/sos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/sos.png -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/web/favicon.png -------------------------------------------------------------------------------- /assets/ecuador.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/ecuador.jpg -------------------------------------------------------------------------------- /assets/iconv23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/iconv23.png -------------------------------------------------------------------------------- /assets/logonew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/logonew.png -------------------------------------------------------------------------------- /key/bingnotes.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/key/bingnotes.jks -------------------------------------------------------------------------------- /lib/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'package:flutter_maps_adv/widgets/home/btn_location.dart'; 2 | -------------------------------------------------------------------------------- /assets/icon/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/icon/logo.png -------------------------------------------------------------------------------- /assets/no-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/no-image.png -------------------------------------------------------------------------------- /assets/tag-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/tag-logo.png -------------------------------------------------------------------------------- /assets/alertaIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/alertaIcon.png -------------------------------------------------------------------------------- /assets/altoparlante.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/altoparlante.png -------------------------------------------------------------------------------- /assets/jar-loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/jar-loading.gif -------------------------------------------------------------------------------- /assets/perroPerdido.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/perroPerdido.jpg -------------------------------------------------------------------------------- /fonts/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/fonts/Roboto-Black.ttf -------------------------------------------------------------------------------- /fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /fonts/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/fonts/Roboto-Italic.ttf -------------------------------------------------------------------------------- /fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /fonts/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/fonts/Roboto-Thin.ttf -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /assets/alertas/comunicar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/alertas/comunicar.png -------------------------------------------------------------------------------- /assets/alertas/corazon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/alertas/corazon.png -------------------------------------------------------------------------------- /assets/alertas/mascotas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/alertas/mascotas.png -------------------------------------------------------------------------------- /assets/alertas/newPost.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/alertas/newPost.png -------------------------------------------------------------------------------- /fonts/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/fonts/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /fonts/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/fonts/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /fonts/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/fonts/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /fonts/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/fonts/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /fonts/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/fonts/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /assets/iconvinculacion/iconvinculacion - Shortcut.lnk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/assets/iconvinculacion/iconvinculacion - Shortcut.lnk -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/android/app/src/main/res/mipmap-hdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/android/app/src/main/res/mipmap-mdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /lib/models/perfil.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Perfil { 4 | String nombre; 5 | Icon icono; 6 | 7 | Perfil(this.nombre, this.icono); 8 | } 9 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Vinici0/seguridad-espe-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/vinicioborja/flutter_maps_adv/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.vinicioborja.flutter_maps_adv 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/models/lugares.dart: -------------------------------------------------------------------------------- 1 | class Lugares { 2 | String idUsuario; 3 | String uid; 4 | String ciudad; 5 | String barrio; 6 | 7 | Lugares({ 8 | required this.idUsuario, 9 | required this.uid, 10 | required this.ciudad, 11 | required this.barrio, 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /lib/models/search_result.dart: -------------------------------------------------------------------------------- 1 | class SearchResult { 2 | final bool cancel; 3 | final bool manual; 4 | 5 | SearchResult({required this.cancel, this.manual = false}); 6 | 7 | @override 8 | String toString() { 9 | return '{ cancel: $cancel, manual: $manual }'; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/global/environment.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | class Environment { 4 | static String apiUrl = Platform.isAndroid 5 | ? 'http://192.188.58.82:3000/api/v2' 6 | : 'http://localhost:3000/api'; 7 | static String socketUrl = Platform.isAndroid 8 | ? 'http://192.188.58.82:3000' 9 | : 'http://localhost:3000'; 10 | } 11 | -------------------------------------------------------------------------------- /lib/models/route_destination.dart: -------------------------------------------------------------------------------- 1 | import 'package:google_maps_flutter/google_maps_flutter.dart' show LatLng; 2 | 3 | class RouteDestination { 4 | final List points; 5 | final double duration; 6 | final double distance; 7 | 8 | RouteDestination( 9 | {required this.points, required this.duration, required this.distance}); 10 | } 11 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /lib/helpers/custom_image_marker.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui' as ui; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:google_maps_flutter/google_maps_flutter.dart' 5 | show BitmapDescriptor; 6 | 7 | Future getAssetImageMarker() async { 8 | return BitmapDescriptor.fromAssetImage( 9 | const ImageConfiguration(devicePixelRatio: 2.5), 'assets/custom-pin.png'); 10 | } 11 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /lib/views/image_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ImageViewScreen extends StatelessWidget { 4 | static const routeName = 'image-view'; 5 | const ImageViewScreen({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return const Scaffold( 10 | body: Center( 11 | child: Text('ImageViewScreen'), 12 | ), 13 | ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /assets/alertas/user-usuario.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/screens/alerprueba.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AlertPruebaScreen extends StatelessWidget { 4 | static const String routName = "AlertaPrueba"; 5 | const AlertPruebaScreen({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return const Scaffold( 10 | body: Center( 11 | child: Text('AlertPruebaScreen'), 12 | ), 13 | ); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /lib/blocs/gps/gps_event.dart: -------------------------------------------------------------------------------- 1 | part of 'gps_bloc.dart'; 2 | 3 | abstract class GpsEvent extends Equatable { 4 | const GpsEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | class GpsPermissionGranted extends GpsEvent { 11 | final bool isGpsPermissionGranted; 12 | final bool isGpsEnabled; 13 | 14 | const GpsPermissionGranted({ 15 | required this.isGpsPermissionGranted, 16 | required this.isGpsEnabled, 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/helpers/debouncer.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | // Creditos 3 | // https://stackoverflow.com/a/52922130/7834829 4 | 5 | class Debouncer { 6 | Debouncer({required this.duration, this.onValue}); 7 | 8 | final Duration duration; 9 | 10 | void Function(T value)? onValue; 11 | 12 | T? _value; 13 | Timer? _timer; 14 | 15 | T get value => _value!; 16 | 17 | set value(T val) { 18 | _value = val; 19 | _timer?.cancel(); 20 | _timer = Timer(duration, () => onValue!(_value!)); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /assets/alertas/problemas-de-basura.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/screens/product.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PruductScreen extends StatelessWidget { 4 | static const String routeName = 'product'; 5 | const PruductScreen({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | final args = ModalRoute.of(context)?.settings.arguments ?? 'No data'; 10 | return Scaffold( 11 | body: Center( 12 | child: Text('$args', style: TextStyle(fontSize: 30)), 13 | ), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /assets/alertas/emergencia-de-seguridad.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /assets/info/advertencia.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/blocs/blocs.dart: -------------------------------------------------------------------------------- 1 | export 'package:flutter_maps_adv/blocs/search/search_bloc.dart'; 2 | 3 | export 'package:flutter_maps_adv/blocs/auth/auth_bloc.dart'; 4 | export 'package:flutter_maps_adv/blocs/gps/gps_bloc.dart'; 5 | export 'package:flutter_maps_adv/blocs/location/localtion_bloc.dart'; 6 | export 'package:flutter_maps_adv/blocs/map/map_bloc.dart'; 7 | export 'package:flutter_maps_adv/blocs/members/members_bloc.dart'; 8 | export 'package:flutter_maps_adv/blocs/navigator/navigator_bloc.dart'; 9 | export 'package:flutter_maps_adv/blocs/publication/publication_bloc.dart'; 10 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | import GoogleMaps 4 | 5 | 6 | @UIApplicationMain 7 | @objc class AppDelegate: FlutterAppDelegate { 8 | override func application( 9 | _ application: UIApplication, 10 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 11 | ) -> Bool { 12 | GMSServices.provideAPIKey("AIzaSyDSbietbt8gSaq_L7FGbzngaj6nhYsExYY") 13 | GeneratedPluginRegistrant.register(with: self) 14 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/widgets/logo_login.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | 4 | class Logo extends StatelessWidget { 5 | final String text; 6 | const Logo({super.key, required this.text}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Column( 11 | children: [ 12 | SizedBox( 13 | width: 240, 14 | height: 240, 15 | child: SvgPicture.asset( 16 | 'assets/iconvinculacion/login.svg', 17 | )), 18 | ], 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/blocs/location/localtion_event.dart: -------------------------------------------------------------------------------- 1 | part of 'localtion_bloc.dart'; 2 | 3 | abstract class LocaltionEvent extends Equatable { 4 | const LocaltionEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | class OnNewUserLocationEvent extends LocaltionEvent { 11 | //Se le pasa la nueva ubicación 12 | final LatLng newLocation; 13 | const OnNewUserLocationEvent(this.newLocation); 14 | } 15 | 16 | //Siguiendo al usuario 17 | class OnStartFollowingUser extends LocaltionEvent {} 18 | 19 | //Dejar de seguir al usuario 20 | class OnStopFollowingUser extends LocaltionEvent {} 21 | -------------------------------------------------------------------------------- /assets/alertas/drogas2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/blocs/auth/auth_state.dart: -------------------------------------------------------------------------------- 1 | part of 'auth_bloc.dart'; 2 | 3 | class AuthState extends Equatable { 4 | final Usuario? usuario; 5 | final List ubicaciones; 6 | 7 | const AuthState({ 8 | this.usuario, 9 | required this.ubicaciones, 10 | }); 11 | 12 | AuthState copyWith({ 13 | Usuario? usuario, 14 | List? ubicaciones, 15 | }) => 16 | AuthState( 17 | usuario: usuario ?? this.usuario, 18 | ubicaciones: ubicaciones ?? this.ubicaciones, 19 | ); 20 | 21 | @override 22 | List get props => [ 23 | usuario, 24 | ubicaciones, 25 | ]; 26 | } 27 | -------------------------------------------------------------------------------- /lib/models/reporte.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Reporte { 4 | String tipo; 5 | String icon; 6 | String color; 7 | bool isSvg; 8 | 9 | Reporte( 10 | {required this.tipo, 11 | required this.icon, 12 | required this.color, 13 | this.isSvg = true}); 14 | 15 | factory Reporte.fromJson(Map json) { 16 | return Reporte( 17 | tipo: json['tipo'], 18 | icon: json['icon'], 19 | color: json['color'], 20 | isSvg: true); 21 | } 22 | 23 | Map toJson() => 24 | {'tipo': tipo, 'icon': icon, 'color': color, 'isSvg': isSvg}; 25 | } 26 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /lib/ui/custom_snackbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CustomSnackbar extends SnackBar { 4 | CustomSnackbar( 5 | {Key? key, 6 | required String message, 7 | String btnLabel = 'OK', 8 | Duration duration = const Duration(seconds: 2), 9 | VoidCallback? onOk}) 10 | : super( 11 | key: key, 12 | content: Text(message), 13 | duration: duration, 14 | action: SnackBarAction( 15 | label: btnLabel, 16 | onPressed: () { 17 | if (onOk != null) { 18 | onOk(); 19 | } 20 | }), 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = flutter_maps_adv 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterMapsAdv 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /assets/alertas/drogas.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /lib/helpers/page_route.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CreateRoute { 4 | static Route createRoute(Widget screen) { 5 | return PageRouteBuilder( 6 | pageBuilder: (context, animation, secondaryAnimation) => screen, 7 | transitionsBuilder: (context, animation, secondaryAnimation, child) { 8 | const begin = Offset(0.0, 1.0); 9 | const end = Offset.zero; 10 | const curve = Curves.ease; 11 | 12 | var tween = 13 | Tween(begin: begin, end: end).chain(CurveTween(curve: curve)); 14 | 15 | return SlideTransition( 16 | position: animation.drive(tween), 17 | child: child, 18 | ); 19 | }, 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /assets/alertas/emergencia-de-bomberos.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.2.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.15' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /lib/widgets/labels_login.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Labels extends StatelessWidget { 4 | final String ruta; 5 | final String text; 6 | final String text2; 7 | 8 | const Labels( 9 | {Key? key, required this.ruta, required this.text, required this.text2}) 10 | : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Column( 15 | children: [ 16 | Text(text, style: const TextStyle(color: Colors.black54)), 17 | TextButton( 18 | onPressed: () { 19 | Navigator.pushReplacementNamed(context, ruta); 20 | }, 21 | child: Text(text2, 22 | style: const TextStyle(color: Color(0xFF7ab466), fontSize: 18)), 23 | ), 24 | ], 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /assets/alertas/emergencia-de-ambulancia.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/screens/loading_map_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_maps_adv/blocs/blocs.dart'; 4 | import 'package:flutter_maps_adv/screens/gps_access_screen.dart'; 5 | import 'package:flutter_maps_adv/screens/map_screen.dart'; 6 | 7 | class LoadingMapScreen extends StatelessWidget { 8 | static const String loadingroute = 'loading'; 9 | 10 | const LoadingMapScreen({Key? key}) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return BlocBuilder( 15 | builder: (context, state) { 16 | return !state.isAllGranted 17 | ? const GpsAccessScreen() 18 | //que dirija a la pantalla de mapaScren 19 | : const MapScreen(); 20 | }, 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /assets/alertas/robo-a-casa.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | 12 | void fl_register_plugins(FlPluginRegistry* registry) { 13 | g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar = 14 | fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin"); 15 | flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar); 16 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 17 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 18 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 19 | } 20 | -------------------------------------------------------------------------------- /lib/blocs/navigator/navigator_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | import 'package:equatable/equatable.dart'; 3 | 4 | part 'navigator_event.dart'; 5 | part 'navigator_state.dart'; 6 | 7 | class NavigatorBloc extends Bloc { 8 | NavigatorBloc() : super(NavigatorStateInit(index: 0)) { 9 | on((event, emit) { 10 | emit(state.copyWith(index: event.index)); 11 | }); 12 | 13 | on((event, emit) { 14 | emit(state.copyWith(isNewSelected: event.isNewSelected)); 15 | }); 16 | 17 | on((event, emit) { 18 | emit(state.copyWith(isNumberFamilySelected: event.isPlaceSelected)); 19 | }); 20 | 21 | on((event, emit) { 22 | emit(state.copyWith(isNumberFamily: event.isNumberFamily)); 23 | }); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /assets/alertas/problems-de-transporte-publico.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | key.properties 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Android Studio will place build artifacts here 43 | /android/app/debug 44 | /android/app/profile 45 | /android/app/release 46 | -------------------------------------------------------------------------------- /assets/alertas/robo-a-persona.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | flutter_secure_storage_linux 7 | url_launcher_linux 8 | ) 9 | 10 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 11 | ) 12 | 13 | set(PLUGIN_BUNDLED_LIBRARIES) 14 | 15 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 16 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 17 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 20 | endforeach(plugin) 21 | 22 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 23 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 25 | endforeach(ffi_plugin) 26 | -------------------------------------------------------------------------------- /lib/models/usuarios_response.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter_maps_adv/models/usuario.dart'; 4 | 5 | UsuariosResponse usuariosResponseFromJson(String str) => 6 | UsuariosResponse.fromJson(json.decode(str)); 7 | 8 | String usuariosResponseToJson(UsuariosResponse data) => 9 | json.encode(data.toJson()); 10 | 11 | class UsuariosResponse { 12 | UsuariosResponse({ 13 | required this.ok, 14 | required this.usuarios, 15 | }); 16 | bool ok; 17 | List usuarios; 18 | 19 | factory UsuariosResponse.fromJson(Map json) => 20 | UsuariosResponse( 21 | ok: json["ok"], 22 | usuarios: List.from( 23 | json["usuarios"].map((x) => Usuario.fromJson(x))), 24 | ); 25 | 26 | Map toJson() => { 27 | "ok": ok, 28 | "usuarios": List.from(usuarios.map((x) => x.toJson())), 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /assets/alertas/problemas-de-energia.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/widgets/page_title.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PageTitle extends StatelessWidget { 4 | const PageTitle({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return SafeArea( 9 | bottom: false, 10 | child: Container( 11 | margin: const EdgeInsets.symmetric(horizontal: 20), 12 | child: Column( 13 | crossAxisAlignment: CrossAxisAlignment.start, 14 | children: const [ 15 | Text('Classify transaction', 16 | style: TextStyle( 17 | fontSize: 20, 18 | fontWeight: FontWeight.bold, 19 | color: Colors.black)), 20 | SizedBox(height: 10), 21 | Text('Classify this transaction into a particular category', 22 | style: TextStyle(fontSize: 16, color: Colors.black)), 23 | ], 24 | ), 25 | ), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/blocs/gps/gps_state.dart: -------------------------------------------------------------------------------- 1 | part of 'gps_bloc.dart'; 2 | 3 | //por usar equatable, no es necesario sobreescribir el metodo == y hashCode 4 | class GpsState extends Equatable { 5 | final bool isGpsEnabled; 6 | final bool isGpsPermissionGranted; 7 | 8 | //Va a ser true cuando el gps este activo y el permiso tambien 9 | bool get isAllGranted => isGpsEnabled && isGpsPermissionGranted; 10 | 11 | const GpsState({ 12 | required this.isGpsEnabled, 13 | required this.isGpsPermissionGranted, 14 | }); 15 | 16 | GpsState copyWith({ 17 | bool? isGpsEnabled, 18 | bool? isGpsPermissionGranted, 19 | }) => 20 | GpsState( 21 | isGpsEnabled: isGpsEnabled ?? this.isGpsEnabled, 22 | isGpsPermissionGranted: 23 | isGpsPermissionGranted ?? this.isGpsPermissionGranted, 24 | ); 25 | 26 | @override 27 | List get props => [ 28 | isGpsEnabled, 29 | isGpsPermissionGranted, 30 | ]; 31 | } 32 | -------------------------------------------------------------------------------- /lib/blocs/location/localtion_state.dart: -------------------------------------------------------------------------------- 1 | part of 'localtion_bloc.dart'; 2 | 3 | class LocaltionState extends Equatable { 4 | final bool followingUser; //Siguiendo al usuario 5 | final LatLng? lastKnownLocation; 6 | final List myLocationHistory; 7 | 8 | LocaltionState({ 9 | this.followingUser = true, 10 | this.lastKnownLocation, 11 | myLocationHistory, 12 | }) : myLocationHistory = myLocationHistory ?? []; 13 | 14 | LocaltionState copyWith({ 15 | bool? followingUser, 16 | LatLng? lastKnownLocation, 17 | List? myLocationHistory, 18 | }) { 19 | return LocaltionState( 20 | followingUser: followingUser ?? this.followingUser, 21 | lastKnownLocation: lastKnownLocation ?? this.lastKnownLocation, 22 | myLocationHistory: myLocationHistory ?? this.myLocationHistory, 23 | ); 24 | } 25 | 26 | @override 27 | List get props => 28 | [followingUser, lastKnownLocation, myLocationHistory]; 29 | } 30 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /assets/alertas/robo-de-vehiculo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/blocs/navigator/navigator_state.dart: -------------------------------------------------------------------------------- 1 | part of 'navigator_bloc.dart'; 2 | 3 | class NavigatorStateInit extends Equatable { 4 | int index; 5 | final bool isNewSelected; 6 | final bool isPlaceSelected; 7 | final bool isNumberFamily; 8 | 9 | NavigatorStateInit( 10 | {this.index = 0, 11 | this.isNewSelected = false, 12 | this.isNumberFamily = false, 13 | this.isPlaceSelected = false}); 14 | 15 | NavigatorStateInit copyWith({ 16 | int? index, 17 | bool? isNewSelected, 18 | bool? isNumberFamilySelected, 19 | bool? isNumberFamily, 20 | }) { 21 | return NavigatorStateInit( 22 | index: index ?? this.index, 23 | isNewSelected: isNewSelected ?? this.isNewSelected, 24 | isPlaceSelected: isNumberFamilySelected ?? this.isPlaceSelected, 25 | isNumberFamily: isNumberFamily ?? this.isNumberFamily, 26 | ); 27 | } 28 | 29 | @override 30 | List get props => 31 | [index, isNewSelected, isPlaceSelected, isNumberFamily]; 32 | } 33 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | connectivity_plus 7 | firebase_core 8 | flutter_secure_storage_windows 9 | geolocator_windows 10 | permission_handler_windows 11 | share_plus 12 | url_launcher_windows 13 | ) 14 | 15 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 16 | ) 17 | 18 | set(PLUGIN_BUNDLED_LIBRARIES) 19 | 20 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 22 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 25 | endforeach(plugin) 26 | 27 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 28 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 29 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 30 | endforeach(ffi_plugin) 31 | -------------------------------------------------------------------------------- /lib/screens/alerts_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_maps_adv/widgets/home/table_alertas_comunidad.dart'; 3 | import 'package:flutter_maps_adv/widgets/home/table_alertas_seguridad.dart'; 4 | 5 | class AlertsScreen extends StatelessWidget { 6 | static const String routeName = 'alertas'; 7 | const AlertsScreen({Key? key}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return DefaultTabController( 12 | length: 2, 13 | child: Scaffold( 14 | backgroundColor: Colors.blueGrey[50], 15 | appBar: AppBar( 16 | centerTitle: false, 17 | title: const Text("Reportar"), 18 | //color de la flcha de regreso blanco 19 | iconTheme: const IconThemeData(color: Colors.white), 20 | backgroundColor: const Color(0xFF111b21), 21 | ), 22 | body: Container( 23 | color: const Color(0xFF111b21), 24 | child: TableAlertsSeguridad(), 25 | ), 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/widgets/btn_toggle_user_route.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_maps_adv/blocs/blocs.dart'; 4 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 5 | 6 | class BtnToggleUserRoute extends StatelessWidget { 7 | const BtnToggleUserRoute({Key? key}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | final mapBloc = BlocProvider.of(context); 12 | 13 | return Container( 14 | margin: const EdgeInsets.only(bottom: 10), 15 | child: Material( 16 | elevation: 0, 17 | shape: const CircleBorder(), 18 | child: CircleAvatar( 19 | backgroundColor: Colors.white, 20 | maxRadius: 25, 21 | child: IconButton( 22 | icon: Icon(FontAwesomeIcons.route, color: Colors.grey[800]), 23 | onPressed: () { 24 | mapBloc.add(OpToggleUserRouteEvent()); 25 | }), 26 | ), 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /assets/alertas/actividad-sospechosa.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/blocs/notification/notification_state.dart: -------------------------------------------------------------------------------- 1 | part of 'notification_bloc.dart'; 2 | 3 | class NotificationState extends Equatable { 4 | final bool isActive; 5 | final List notificaciones; 6 | final bool loading; 7 | final String currentText; 8 | 9 | const NotificationState( 10 | {this.isActive = false, 11 | this.notificaciones = const [], 12 | this.currentText = '', 13 | this.loading = false}); 14 | 15 | //copyWith 16 | NotificationState copyWith({ 17 | bool? isActive, 18 | List? notificaciones, 19 | bool? loading, 20 | String? currentText, 21 | }) { 22 | return NotificationState( 23 | isActive: isActive ?? this.isActive, 24 | notificaciones: notificaciones ?? this.notificaciones, 25 | loading: loading ?? this.loading, 26 | currentText: currentText ?? this.currentText, 27 | ); 28 | } 29 | 30 | @override 31 | List get props => [ 32 | isActive, 33 | notificaciones, 34 | loading, 35 | currentText, 36 | ]; 37 | } 38 | -------------------------------------------------------------------------------- /assets/iconvinculacion/robo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flutter_maps_adv", 3 | "short_name": "flutter_maps_adv", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /assets/vinculacionalertas/robo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/blocs/room/room_state.dart: -------------------------------------------------------------------------------- 1 | part of 'room_bloc.dart'; 2 | 3 | class RoomState extends Equatable { 4 | final bool isError; 5 | final bool isLoading; 6 | final List salas; 7 | final Sala salaSeleccionada; 8 | 9 | const RoomState({ 10 | required this.isError, 11 | required this.isLoading, 12 | required this.salas, 13 | required this.salaSeleccionada, 14 | }); 15 | 16 | RoomState copyWith({ 17 | bool? isError, 18 | bool? isLoading, 19 | List? salas, 20 | List? usuariosSala, 21 | Sala? salaSeleccionada, 22 | }) { 23 | return RoomState( 24 | isError: isError ?? this.isError, 25 | isLoading: isLoading ?? this.isLoading, 26 | salas: salas ?? this.salas, 27 | salaSeleccionada: salaSeleccionada ?? this.salaSeleccionada, 28 | ); 29 | } 30 | 31 | //set and get salaseleccionada 32 | Sala get getSalaSeleccionada => salaSeleccionada; 33 | 34 | @override 35 | List get props => [ 36 | salas, 37 | salaSeleccionada, 38 | isLoading, 39 | isError, 40 | ]; 41 | } 42 | -------------------------------------------------------------------------------- /lib/models/login_response.dart: -------------------------------------------------------------------------------- 1 | // To parse this JSON data, do 2 | // 3 | // final loginResponse = loginResponseFromJson(jsonString); 4 | 5 | import 'dart:convert'; 6 | 7 | import 'package:flutter_maps_adv/models/usuario.dart'; 8 | 9 | LoginResponse loginResponseFromJson(String str) => 10 | LoginResponse.fromJson(json.decode(str)); 11 | 12 | String loginResponseToJson(LoginResponse data) => json.encode(data.toJson()); 13 | 14 | class LoginResponse { 15 | bool ok; 16 | Usuario usuario; 17 | String token; 18 | 19 | LoginResponse({ 20 | required this.ok, 21 | required this.usuario, 22 | required this.token, 23 | }); 24 | 25 | factory LoginResponse.fromJson(Map json) { 26 | final token = json["token"] as String? ?? ''; 27 | 28 | return LoginResponse( 29 | ok: json["ok"] ?? false, // Use the default value (false) if ok is null 30 | usuario: Usuario.fromJson(json["usuario"]), 31 | token: token, 32 | ); 33 | } 34 | 35 | Map toJson() => { 36 | "ok": ok, 37 | "usuario": usuario.toJson(), 38 | "token": token, 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /lib/blocs/members/members_state.dart: -------------------------------------------------------------------------------- 1 | part of 'members_bloc.dart'; 2 | 3 | class MembersState extends Equatable { 4 | final List usuariosAll; 5 | final bool isLoading; 6 | final bool isError; 7 | final List messages; 8 | final List mensajesSalas; 9 | const MembersState({ 10 | this.usuariosAll = const [], 11 | this.messages = const [], 12 | this.mensajesSalas = const [], 13 | this.isLoading = false, 14 | this.isError = false, 15 | }); 16 | 17 | MembersState copyWith({ 18 | List? usuariosAll, 19 | List? messages, 20 | List? mensajesSalas, 21 | bool? isLoading, 22 | bool? isError, 23 | }) { 24 | return MembersState( 25 | usuariosAll: usuariosAll ?? this.usuariosAll, 26 | messages: messages ?? this.messages, 27 | mensajesSalas: mensajesSalas ?? this.mensajesSalas, 28 | isLoading: isLoading ?? this.isLoading, 29 | isError: isError ?? this.isError, 30 | ); 31 | } 32 | 33 | @override 34 | List get props => 35 | [usuariosAll, isLoading, isError, messages, mensajesSalas]; 36 | } 37 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "interactive", 3 | "cmake.sourceDirectory": "D:/FlutterProyectos/FlutterAvanzadoProyectos/mapas/flutter_maps_adv/linux", 4 | "workbench.colorCustomizations": { 5 | "activityBar.activeBackground": "#3399ff", 6 | "activityBar.background": "#3399ff", 7 | "activityBar.foreground": "#15202b", 8 | "activityBar.inactiveForeground": "#15202b99", 9 | "activityBarBadge.background": "#bf0060", 10 | "activityBarBadge.foreground": "#e7e7e7", 11 | "commandCenter.border": "#e7e7e799", 12 | "sash.hoverBorder": "#3399ff", 13 | "statusBar.background": "#007fff", 14 | "statusBar.foreground": "#e7e7e7", 15 | "statusBarItem.hoverBackground": "#3399ff", 16 | "statusBarItem.remoteBackground": "#007fff", 17 | "statusBarItem.remoteForeground": "#e7e7e7", 18 | "titleBar.activeBackground": "#007fff", 19 | "titleBar.activeForeground": "#e7e7e7", 20 | "titleBar.inactiveBackground": "#007fff99", 21 | "titleBar.inactiveForeground": "#e7e7e799" 22 | }, 23 | "peacock.color": "#007fff" 24 | } -------------------------------------------------------------------------------- /lib/widgets/home/btn_follow_user.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_maps_adv/blocs/blocs.dart'; 4 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 5 | 6 | class BtnFollowUser extends StatelessWidget { 7 | const BtnFollowUser({Key? key}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | final mapBloc = BlocProvider.of(context); 12 | final searchBloc = BlocProvider.of(context); 13 | 14 | return Container( 15 | margin: const EdgeInsets.only(bottom: 10), 16 | child: CircleAvatar( 17 | backgroundColor: Colors.white, 18 | maxRadius: 25, 19 | child: BlocBuilder( 20 | builder: (context, state) { 21 | return IconButton( 22 | icon: 23 | Icon(FontAwesomeIcons.layerGroup, color: Colors.grey[800]), 24 | onPressed: () { 25 | searchBloc.add(const ToggloUpdateTypeMapEvent()); 26 | }); 27 | }, 28 | ), 29 | ), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /assets/alertas/problemas-de-telecomunicaciones.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/resources/services/socket_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_maps_adv/global/environment.dart'; 2 | import 'package:flutter_maps_adv/resources/services/auth_provider.dart'; 3 | import 'package:socket_io_client/socket_io_client.dart' as IO; 4 | 5 | // ignore: constant_identifier_names 6 | enum ServerStatus { Online, Offline, Connecting } 7 | 8 | class SocketService { 9 | ServerStatus _serverStatus = ServerStatus.Connecting; 10 | late IO.Socket _socket; 11 | 12 | ServerStatus get serverStatus => _serverStatus; 13 | 14 | IO.Socket get socket => _socket; 15 | Function get emit => _socket.emit; 16 | 17 | void connect() async { 18 | final token = await AuthService.getToken(); 19 | 20 | _socket = IO.io(Environment.socketUrl, { 21 | 'transports': ['websocket'], 22 | 'autoConnect': true, 23 | 'forceNew': true, 24 | 'extraHeaders': {'x-token': token} 25 | }); 26 | 27 | _socket.on('connect', (_) { 28 | _serverStatus = ServerStatus.Online; 29 | }); 30 | 31 | _socket.on('disconnect', (_) { 32 | _serverStatus = ServerStatus.Offline; 33 | }); 34 | } 35 | 36 | void disconnect() { 37 | _socket.disconnect(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_maps_adv/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /ios/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /assets/alertas/accidente.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/blocs/navigator/navigator_event.dart: -------------------------------------------------------------------------------- 1 | part of 'navigator_bloc.dart'; 2 | 3 | abstract class NavigatorEvent extends Equatable { 4 | const NavigatorEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | class NavigatorIndexEvent extends NavigatorEvent { 11 | final int index; 12 | 13 | const NavigatorIndexEvent({required this.index}); 14 | 15 | @override 16 | List get props => [index]; 17 | } 18 | 19 | class NavigatorIsNewSelectedEvent extends NavigatorEvent { 20 | final bool isNewSelected; 21 | 22 | const NavigatorIsNewSelectedEvent({required this.isNewSelected}); 23 | 24 | @override 25 | List get props => [isNewSelected]; 26 | } 27 | 28 | class NavigatorIsPlaceSelectedEvent extends NavigatorEvent { 29 | final bool isPlaceSelected; 30 | 31 | const NavigatorIsPlaceSelectedEvent({required this.isPlaceSelected}); 32 | 33 | @override 34 | List get props => [isPlaceSelected]; 35 | } 36 | 37 | //isNumberFamily 38 | class NavigatorIsNumberFamilyEvent extends NavigatorEvent { 39 | final bool isNumberFamily; 40 | 41 | const NavigatorIsNumberFamilyEvent({required this.isNumberFamily}); 42 | 43 | @override 44 | List get props => [isNumberFamily]; 45 | } 46 | -------------------------------------------------------------------------------- /lib/blocs/map/map_event.dart: -------------------------------------------------------------------------------- 1 | part of 'map_bloc.dart'; 2 | 3 | abstract class MapEvent extends Equatable { 4 | const MapEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | class OnMapInitialzedEvent extends MapEvent { 11 | //Sirve para controlar el mapa y sus funciones 12 | final GoogleMapController controller; 13 | const OnMapInitialzedEvent(this.controller); 14 | } 15 | 16 | class OnStopFollowingUserEvent extends MapEvent {} 17 | 18 | class OnStartFollowingUserEvent extends MapEvent {} 19 | 20 | class UpdateUserPolylineEvent extends MapEvent { 21 | final List 22 | userLocations; //Todas las ubicaciones del usuario en tiempo real 23 | const UpdateUserPolylineEvent(this.userLocations); 24 | } 25 | 26 | class OpToggleUserRouteEvent extends MapEvent {} 27 | 28 | //reiniciar polylines 29 | class OnMapMovedEvent extends MapEvent {} 30 | 31 | class DisplayPolylinesEvent extends MapEvent { 32 | final Map polylines; 33 | final Map markers; 34 | const DisplayPolylinesEvent(this.polylines, this.markers); 35 | } 36 | 37 | class ActivePolylineEvent extends MapEvent { 38 | const ActivePolylineEvent(); 39 | 40 | @override 41 | List get props => []; 42 | } 43 | -------------------------------------------------------------------------------- /lib/helpers/show_loading_message.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | void showLoadingMessage(BuildContext context) { 6 | // Android 7 | if (Platform.isAndroid) { 8 | showDialog( 9 | context: context, 10 | barrierDismissible: false, 11 | builder: (context) => AlertDialog( 12 | title: const Text('Calculando ruta'), 13 | content: Container( 14 | width: 100, 15 | height: 100, 16 | margin: const EdgeInsets.only(top: 10), 17 | child: Column( 18 | children: const [ 19 | Text( 20 | 'Espere por favor...', 21 | textAlign: TextAlign.center, 22 | ), 23 | SizedBox(height: 15), 24 | CircularProgressIndicator( 25 | strokeWidth: 3, 26 | color: Color(0xFF7ab466), 27 | ), 28 | ], 29 | ), 30 | ), 31 | ), 32 | ); 33 | return; 34 | } 35 | 36 | // iOS 37 | showCupertinoDialog( 38 | context: context, 39 | builder: (context) => const CupertinoAlertDialog( 40 | title: Text('Calculando ruta'), 41 | content: CupertinoActivityIndicator(), 42 | ), 43 | ); 44 | } 45 | -------------------------------------------------------------------------------- /lib/widgets/background.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'dart:math'; 3 | 4 | class Background extends StatelessWidget { 5 | final boxDecoration = const BoxDecoration( 6 | gradient: LinearGradient( 7 | begin: Alignment.topCenter, 8 | end: Alignment.bottomCenter, 9 | stops: [0.2, 0.8], 10 | colors: [Color(0xff2E305F), Color(0xff202333)])); 11 | 12 | const Background({super.key}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Stack( 17 | children: [ 18 | // Purple Gradinet 19 | Container(decoration: boxDecoration), 20 | 21 | // Pink box 22 | Positioned(top: -100, left: -30, child: _PinkBox()), 23 | ], 24 | ); 25 | } 26 | } 27 | 28 | class _PinkBox extends StatelessWidget { 29 | @override 30 | Widget build(BuildContext context) { 31 | return Transform.rotate( 32 | angle: -pi / 5, 33 | child: Container( 34 | width: 360, 35 | height: 360, 36 | decoration: BoxDecoration( 37 | borderRadius: BorderRadius.circular(80), 38 | gradient: const LinearGradient(colors: [ 39 | Color.fromRGBO(236, 98, 188, 1), 40 | Color.fromRGBO(241, 142, 172, 1), 41 | ])), 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /assets/alertas/problemas-alcantarillado.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/screens/code_create_sreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_maps_adv/widgets/group_contenido.dart'; 3 | 4 | class CodigoCreateGrupoScreen extends StatelessWidget { 5 | static const String codigoGruporoute = 'codigoGrupo'; 6 | 7 | const CodigoCreateGrupoScreen({ 8 | Key? key, 9 | }) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | centerTitle: false, 16 | elevation: 0.5, 17 | iconTheme: const IconThemeData(color: Colors.black87), 18 | title: const Text('Crear Grupo', 19 | //alinea a la izquierda 20 | style: TextStyle(color: Colors.black87, fontSize: 20)), 21 | ), 22 | body: Column( 23 | children: [ 24 | Expanded( 25 | child: Container( 26 | margin: const EdgeInsets.only(left: 10, top: 10, right: 10), 27 | //alineacion de los elementos a la izquierda 28 | color: Colors.white, 29 | child: const GroupContenido( 30 | textoHint: 'Nombre del grupo', 31 | textoButton: 'Crear Grupo', 32 | textoTitulo: 'Nombre', 33 | ), 34 | ), 35 | ) 36 | ], 37 | ), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /assets/iconvinculacion/otros.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 538224676274-1c5a8j3l015hvvhe69on6mtd0u65nb4c.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.538224676274-1c5a8j3l015hvvhe69on6mtd0u65nb4c 9 | ANDROID_CLIENT_ID 10 | 538224676274-6dm96dvsaknf5gf1uh7sp672demu4at1.apps.googleusercontent.com 11 | API_KEY 12 | AIzaSyAMztOBzWsk8fTBfeHkXSdeZVUnpEB7c8I 13 | GCM_SENDER_ID 14 | 538224676274 15 | PLIST_VERSION 16 | 1 17 | BUNDLE_ID 18 | com.vinicioborja.flutter-maps-adv 19 | PROJECT_ID 20 | notificaiones-f1109 21 | STORAGE_BUCKET 22 | notificaiones-f1109.appspot.com 23 | IS_ADS_ENABLED 24 | 25 | IS_ANALYTICS_ENABLED 26 | 27 | IS_APPINVITE_ENABLED 28 | 29 | IS_GCM_ENABLED 30 | 31 | IS_SIGNIN_ENABLED 32 | 33 | GOOGLE_APP_ID 34 | 1:538224676274:ios:83d1758547d1f2eef028ab 35 | 36 | -------------------------------------------------------------------------------- /lib/helpers/mostrar_alerta.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | 6 | void mostrarAlerta(BuildContext context, String titulo, String subtitulo) { 7 | if (Platform.isAndroid) { 8 | showDialog( 9 | context: context, 10 | builder: (BuildContext context) { 11 | return AlertDialog( 12 | title: Text(titulo), 13 | content: Text(subtitulo), 14 | actions: [ 15 | TextButton( 16 | onPressed: () { 17 | Navigator.pop(context); 18 | }, 19 | child: const Text( 20 | 'OK', 21 | style: TextStyle(color: Color(0xFF7ab466)), 22 | ), 23 | ), 24 | ], 25 | ); 26 | }, 27 | ); 28 | } else { 29 | showCupertinoDialog( 30 | context: context, 31 | builder: (BuildContext context) { 32 | return CupertinoAlertDialog( 33 | title: Text(titulo), 34 | content: Text(subtitulo), 35 | actions: [ 36 | CupertinoDialogAction( 37 | isDefaultAction: true, 38 | onPressed: () { 39 | Navigator.pop(context); 40 | }, 41 | child: const Text('OK'), 42 | ), 43 | ], 44 | ); 45 | }, 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/widgets/boton_login.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | 4 | class BotonForm extends StatelessWidget { 5 | final String text; 6 | final Function onPressed; 7 | 8 | const BotonForm({ 9 | Key? key, 10 | required this.text, 11 | required this.onPressed, 12 | }) : super(key: key); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Material( 17 | child: MaterialButton( 18 | onPressed: () => this.onPressed(), 19 | elevation: 2, 20 | highlightElevation: 5, 21 | color: const Color(0xFF7ab466), 22 | shape: const StadiumBorder(), 23 | minWidth: double.infinity, 24 | height: 50, 25 | child: text == "Google" 26 | ? Row( 27 | mainAxisAlignment: MainAxisAlignment.center, 28 | children: [ 29 | const Icon( 30 | FontAwesomeIcons.google, 31 | color: Colors.white, 32 | ), 33 | const SizedBox(width: 10), 34 | Text(text, 35 | style: 36 | const TextStyle(color: Colors.white, fontSize: 20)), 37 | ], 38 | ) 39 | : Text(text, 40 | style: const TextStyle(color: Colors.white, fontSize: 20)), 41 | ), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"flutter_maps_adv", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import connectivity_plus 9 | import firebase_core 10 | import firebase_messaging 11 | import flutter_secure_storage_macos 12 | import geolocator_apple 13 | import path_provider_foundation 14 | import share_plus 15 | import shared_preferences_foundation 16 | import sqflite 17 | import url_launcher_macos 18 | 19 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 20 | ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) 21 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) 22 | FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) 23 | FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) 24 | GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin")) 25 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 26 | SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) 27 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 28 | SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) 29 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 30 | } 31 | -------------------------------------------------------------------------------- /lib/widgets/home/btn_location.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_maps_adv/blocs/blocs.dart'; 4 | import 'package:flutter_maps_adv/ui/custom_snackbar.dart'; 5 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 6 | 7 | class BtnCurrentLocation extends StatelessWidget { 8 | const BtnCurrentLocation({Key? key}) : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | //TODO: Se accede a los dos blocs 13 | final locationBloc = BlocProvider.of(context); 14 | final mapBloc = BlocProvider.of(context); 15 | 16 | return Container( 17 | margin: const EdgeInsets.only(bottom: 10), 18 | child: CircleAvatar( 19 | backgroundColor: Colors.white, 20 | maxRadius: 25, 21 | child: IconButton( 22 | icon: Icon(FontAwesomeIcons.locationArrow, color: Colors.grey[800]), 23 | onPressed: () { 24 | //ultima ubicacion conocida del usuario 25 | final userLocation = locationBloc.state.lastKnownLocation; 26 | 27 | if (userLocation == null) { 28 | final snack = CustomSnackbar(message: 'No hay ubicación'); 29 | ScaffoldMessenger.of(context).showSnackBar(snack); 30 | return; 31 | } 32 | 33 | mapBloc.moveCamera(userLocation); 34 | }), 35 | ), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/blocs/map/map_state.dart: -------------------------------------------------------------------------------- 1 | part of 'map_bloc.dart'; 2 | 3 | class MapState extends Equatable { 4 | final bool isMapInitialized; 5 | final bool isFollowUser; 6 | final bool showRoutePreview; 7 | //Polylines 8 | final Map polylines; 9 | final Map markers; 10 | /* 11 | 'mi_ruta: { 12 | id: polylineID Google, 13 | points: [ [lat,lng], [123123,123123], [123123,123123] ] 14 | width: 3 15 | color: black87 16 | }, 17 | */ 18 | const MapState({ 19 | this.isMapInitialized = false, 20 | this.isFollowUser = true, 21 | this.showRoutePreview = true, 22 | Map? polylines, 23 | Map? markers, 24 | }) : polylines = polylines ?? const {}, 25 | markers = markers ?? const {}; 26 | 27 | MapState copyWith({ 28 | bool? isMapInitialized, 29 | bool? isFollowUser, 30 | bool? showRoutePreview, 31 | Map? polylines, 32 | Map? markers, 33 | }) => 34 | MapState( 35 | showRoutePreview: showRoutePreview ?? this.showRoutePreview, 36 | isMapInitialized: isMapInitialized ?? this.isMapInitialized, 37 | isFollowUser: isFollowUser ?? this.isFollowUser, 38 | polylines: polylines ?? this.polylines, 39 | markers: markers ?? this.markers, 40 | ); 41 | 42 | @override 43 | List get props => 44 | [isMapInitialized, isFollowUser, polylines, showRoutePreview, markers]; 45 | } 46 | 47 | // class MapInitial extends MapState {} 48 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "538224676274", 4 | "project_id": "notificaiones-f1109", 5 | "storage_bucket": "notificaiones-f1109.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:538224676274:android:03e9fe6f1ede7ac2f028ab", 11 | "android_client_info": { 12 | "package_name": "com.vinicioborja.flutter_maps_adv" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "538224676274-6dm96dvsaknf5gf1uh7sp672demu4at1.apps.googleusercontent.com", 18 | "client_type": 1, 19 | "android_info": { 20 | "package_name": "com.vinicioborja.flutter_maps_adv", 21 | "certificate_hash": "a685c2d10e8664a5560703db989eb6475b977d7c" 22 | } 23 | }, 24 | { 25 | "client_id": "538224676274-66q03vper7rorc34ndtnb3g7sllclt8n.apps.googleusercontent.com", 26 | "client_type": 3 27 | } 28 | ], 29 | "api_key": [ 30 | { 31 | "current_key": "AIzaSyAWenvlv2PtIX7KVMyueqLHM4e8pmgRocQ" 32 | } 33 | ], 34 | "services": { 35 | "appinvite_service": { 36 | "other_platform_oauth_client": [ 37 | { 38 | "client_id": "538224676274-66q03vper7rorc34ndtnb3g7sllclt8n.apps.googleusercontent.com", 39 | "client_type": 3 40 | } 41 | ] 42 | } 43 | } 44 | } 45 | ], 46 | "configuration_version": "1" 47 | } -------------------------------------------------------------------------------- /lib/screens/config_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_maps_adv/blocs/auth/auth_bloc.dart'; 4 | import 'package:flutter_maps_adv/screens/auth_screen.dart'; 5 | import 'package:flutter_maps_adv/screens/screens.dart'; 6 | 7 | class ConfigScreen extends StatelessWidget { 8 | static const String configroute = 'config'; 9 | const ConfigScreen({Key? key}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Center( 14 | child: ElevatedButton(onPressed: () { 15 | Navigator.pushReplacement( 16 | context, 17 | PageRouteBuilder( 18 | pageBuilder: (_, __, ___) => const LoadingMapScreen(), 19 | transitionDuration: const Duration(milliseconds: 0))); 20 | }, child: BlocBuilder( 21 | builder: (context, state) { 22 | //Boton cerrar sesion de 23 | return MaterialButton( 24 | child: Text('Cerrar sesion ${state.usuario?.nombre}'), 25 | onPressed: () { 26 | BlocProvider.of(context).add(const AuthLogoutEvent()); 27 | Navigator.pushReplacement( 28 | context, 29 | PageRouteBuilder( 30 | pageBuilder: (_, __, ___) => const AuthScreen(), 31 | transitionDuration: const Duration(milliseconds: 0))); 32 | }, 33 | ); 34 | }, 35 | )), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | void RegisterPlugins(flutter::PluginRegistry* registry) { 18 | ConnectivityPlusWindowsPluginRegisterWithRegistrar( 19 | registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); 20 | FirebaseCorePluginCApiRegisterWithRegistrar( 21 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 22 | FlutterSecureStorageWindowsPluginRegisterWithRegistrar( 23 | registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); 24 | GeolocatorWindowsRegisterWithRegistrar( 25 | registry->GetRegistrarForPlugin("GeolocatorWindows")); 26 | PermissionHandlerWindowsPluginRegisterWithRegistrar( 27 | registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); 28 | SharePlusWindowsPluginCApiRegisterWithRegistrar( 29 | registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi")); 30 | UrlLauncherWindowsRegisterWithRegistrar( 31 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 32 | } 33 | -------------------------------------------------------------------------------- /lib/blocs/search/search_state.dart: -------------------------------------------------------------------------------- 1 | part of 'search_bloc.dart'; 2 | 3 | class SearchState extends Equatable { 4 | final bool displayManualMarker; 5 | final List history; 6 | final List ubicacion; 7 | final bool isActivePolyline; 8 | final bool updateTypeMap; 9 | final bool isActiveNotification; 10 | 11 | const SearchState( 12 | {this.displayManualMarker = false, 13 | this.updateTypeMap = false, 14 | this.history = const [], 15 | this.isActiveNotification = false, 16 | this.isActivePolyline = false, 17 | this.ubicacion = const []}); 18 | 19 | SearchState copyWith( 20 | {bool? displayManualMarker, 21 | List? history, 22 | isActivePolyline, 23 | isActiveNotification, 24 | updateTypeMap, 25 | List? ubicacion, 26 | List? places}) => 27 | SearchState( 28 | displayManualMarker: displayManualMarker ?? this.displayManualMarker, 29 | history: history ?? this.history, 30 | updateTypeMap: updateTypeMap ?? this.updateTypeMap, 31 | isActiveNotification: 32 | isActiveNotification ?? this.isActiveNotification, 33 | isActivePolyline: isActivePolyline ?? this.isActivePolyline, 34 | ubicacion: ubicacion ?? this.ubicacion); 35 | 36 | @override 37 | List get props => [ 38 | displayManualMarker, 39 | history, 40 | ubicacion, 41 | isActiveNotification, 42 | isActivePolyline, 43 | updateTypeMap 44 | ]; 45 | } 46 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/models/mensajes_response.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | MensajesResponse mensajesResponseFromJson(String str) => 4 | MensajesResponse.fromJson(json.decode(str)); 5 | 6 | String mensajesResponseToJson(MensajesResponse data) => 7 | json.encode(data.toJson()); 8 | 9 | class MensajesResponse { 10 | MensajesResponse({ 11 | required this.ok, 12 | required this.mensajes, 13 | }); 14 | 15 | bool ok; 16 | List mensajes; 17 | 18 | factory MensajesResponse.fromJson(Map json) => 19 | MensajesResponse( 20 | ok: json["ok"], 21 | mensajes: List.from( 22 | json["mensajes"].map((x) => Mensaje.fromJson(x))), 23 | ); 24 | 25 | Map toJson() => { 26 | "ok": ok, 27 | "mensajes": List.from(mensajes.map((x) => x.toJson())), 28 | }; 29 | } 30 | 31 | class Mensaje { 32 | Mensaje({ 33 | required this.de, 34 | required this.para, 35 | required this.mensaje, 36 | required this.createdAt, 37 | required this.updatedAt, 38 | }); 39 | 40 | String de; 41 | String para; 42 | String mensaje; 43 | DateTime createdAt; 44 | DateTime updatedAt; 45 | 46 | factory Mensaje.fromJson(Map json) => Mensaje( 47 | de: json["de"], 48 | para: json["para"], 49 | mensaje: json["mensaje"], 50 | createdAt: DateTime.parse(json["createdAt"]), 51 | updatedAt: DateTime.parse(json["updatedAt"]), 52 | ); 53 | 54 | Map toJson() => { 55 | "de": de, 56 | "para": para, 57 | "mensaje": mensaje, 58 | "createdAt": createdAt.toIso8601String(), 59 | "updatedAt": updatedAt.toIso8601String(), 60 | }; 61 | } 62 | -------------------------------------------------------------------------------- /lib/screens/code_add_sreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_maps_adv/widgets/group_contenido.dart'; 3 | 4 | class CodigoAddGrupoScreen extends StatelessWidget { 5 | static const String codigoAddGruporoute = 'codigoGrupoAdd'; 6 | 7 | final TextEditingController nomController = TextEditingController(); 8 | 9 | CodigoAddGrupoScreen({super.key}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | centerTitle: false, 16 | //color de la flecha de regreso 17 | iconTheme: const IconThemeData(color: Colors.black87), 18 | elevation: 0.5, 19 | title: const Text('Únete a un grupo', 20 | //alinea a la izquierda 21 | style: TextStyle(color: Colors.black87, fontSize: 20)), 22 | ), 23 | body: Column( 24 | children: [ 25 | Expanded( 26 | child: Container( 27 | color: Colors.white, 28 | child: SingleChildScrollView( 29 | child: Container( 30 | color: Colors.white, 31 | margin: const EdgeInsets.only(left: 10, top: 10, right: 10), 32 | //alineacion de los elementos a la izquierda 33 | child: const GroupContenido( 34 | textoHint: '000-000', 35 | textoButton: 'Únete a un grupo', 36 | textoTitulo: 'Código', 37 | textoInfo: 38 | 'Ingresa el código del grupo que te compartieron para unirte al grupo que fuiste invitado.'), 39 | ), 40 | ), 41 | ), 42 | ) 43 | ], 44 | ), 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/screens/screens.dart: -------------------------------------------------------------------------------- 1 | export 'package:flutter_maps_adv/screens/alert_screen.dart'; 2 | export 'package:flutter_maps_adv/screens/alerts_screen.dart'; 3 | export 'package:flutter_maps_adv/screens/chatsales_config_screen.dart'; 4 | export 'package:flutter_maps_adv/screens/chatsales_miembros.dart'; 5 | export 'package:flutter_maps_adv/screens/chatsales_screen.dart'; 6 | export 'package:flutter_maps_adv/screens/code_add_sreen.dart'; 7 | export 'package:flutter_maps_adv/screens/code_create_sreen.dart'; 8 | export 'package:flutter_maps_adv/screens/config_screen.dart'; 9 | export 'package:flutter_maps_adv/screens/gps_access_screen.dart'; 10 | export 'package:flutter_maps_adv/screens/home_screen.dart'; 11 | export 'package:flutter_maps_adv/screens/information_family_screen.dart'; 12 | export 'package:flutter_maps_adv/screens/information_screen.dart'; 13 | export 'package:flutter_maps_adv/screens/loading_login_screen.dart'; 14 | export 'package:flutter_maps_adv/screens/loading_map_screen.dart'; 15 | export 'package:flutter_maps_adv/screens/login_screen.dart'; 16 | export 'package:flutter_maps_adv/screens/map_screen.dart'; 17 | export 'package:flutter_maps_adv/screens/news_detalle.dart'; 18 | export 'package:flutter_maps_adv/screens/news_screen.dart'; 19 | export 'package:flutter_maps_adv/screens/perfil/edit_perfil_screen.dart'; 20 | export 'package:flutter_maps_adv/screens/perfil/perfil_detalle_screen.dart'; 21 | export 'package:flutter_maps_adv/screens/perfil/perfil_screen.dart'; 22 | export 'package:flutter_maps_adv/screens/place_details_screen.dart'; 23 | export 'package:flutter_maps_adv/screens/register_screen.dart'; 24 | export 'package:flutter_maps_adv/screens/rooms_screen.dart'; 25 | export 'package:flutter_maps_adv/screens/sos_screen.dart'; 26 | export 'package:flutter_maps_adv/widgets/modal_add_group.dart'; 27 | -------------------------------------------------------------------------------- /lib/blocs/notification/notification_event.dart: -------------------------------------------------------------------------------- 1 | part of 'notification_bloc.dart'; 2 | 3 | abstract class NotificationEvent extends Equatable { 4 | const NotificationEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | class LoadNotificationEvent extends NotificationEvent { 11 | final List notificaciones; 12 | 13 | const LoadNotificationEvent(this.notificaciones); 14 | 15 | @override 16 | List get props => [notificaciones]; 17 | } 18 | 19 | class UpdateNotificationEvent extends NotificationEvent { 20 | final bool isActive; 21 | 22 | const UpdateNotificationEvent(this.isActive); 23 | 24 | @override 25 | List get props => [isActive]; 26 | } 27 | 28 | // marcarNotificacionComoLeida 29 | class MarcarNotificacionComoLeidaEvent extends NotificationEvent { 30 | final String id; 31 | 32 | const MarcarNotificacionComoLeidaEvent(this.id); 33 | 34 | @override 35 | List get props => [id]; 36 | } 37 | 38 | class CurrentTextReportEvent extends NotificationEvent { 39 | final String currentText; 40 | 41 | const CurrentTextReportEvent(this.currentText); 42 | 43 | @override 44 | List get props => [currentText]; 45 | } 46 | 47 | class DeleteAllNotificationsEvent extends NotificationEvent { 48 | const DeleteAllNotificationsEvent(); 49 | 50 | @override 51 | List get props => []; 52 | } 53 | 54 | //deleteNotificationById 55 | class DeleteNotificationByIdEvent extends NotificationEvent { 56 | final String id; 57 | 58 | const DeleteNotificationByIdEvent(this.id); 59 | 60 | @override 61 | List get props => [id]; 62 | } 63 | 64 | class LoadingNotificationEvent extends NotificationEvent { 65 | const LoadingNotificationEvent(); 66 | 67 | @override 68 | List get props => []; 69 | } 70 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 17 | base_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 18 | - platform: android 19 | create_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 20 | base_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 21 | - platform: ios 22 | create_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 23 | base_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 24 | - platform: linux 25 | create_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 26 | base_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 27 | - platform: macos 28 | create_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 29 | base_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 30 | - platform: web 31 | create_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 32 | base_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 33 | - platform: windows 34 | create_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 35 | base_revision: 2ad6cd72c040113b47ee9055e722606a490ef0da 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /lib/blocs/search/search_event.dart: -------------------------------------------------------------------------------- 1 | part of 'search_bloc.dart'; 2 | 3 | abstract class SearchEvent extends Equatable { 4 | const SearchEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | class OnActivateManualMarkerEvent extends SearchEvent {} 11 | 12 | class OnDeactivateManualMarkerEvent extends SearchEvent {} 13 | 14 | class OnNewUbicacionFoundEvent extends SearchEvent { 15 | final List ubicacion; 16 | const OnNewUbicacionFoundEvent(this.ubicacion); 17 | } 18 | 19 | class AddToHistoryEvent extends SearchEvent { 20 | final Ubicacion history; 21 | const AddToHistoryEvent(this.history); 22 | 23 | @override 24 | List get props => [history]; 25 | } 26 | 27 | class OnSelectUbicacionEvent extends SearchEvent { 28 | final Ubicacion selectedUbicacion; 29 | const OnSelectUbicacionEvent(this.selectedUbicacion); 30 | 31 | @override 32 | List get props => [selectedUbicacion]; 33 | } 34 | 35 | class AddUbicacionByUserEvent extends SearchEvent { 36 | final String id; 37 | const AddUbicacionByUserEvent(this.id); 38 | 39 | @override 40 | List get props => [id]; 41 | } 42 | 43 | class DeleteUbicacionByUserEvent extends SearchEvent { 44 | final String id; 45 | const DeleteUbicacionByUserEvent(this.id); 46 | 47 | @override 48 | List get props => [id]; 49 | } 50 | 51 | class IsActiveNotification extends SearchEvent { 52 | final bool isActive; 53 | 54 | const IsActiveNotification(this.isActive); 55 | @override 56 | List get props => [ 57 | isActive, 58 | ]; 59 | } 60 | 61 | class IsTogglePolylineEvent extends SearchEvent { 62 | const IsTogglePolylineEvent(); 63 | @override 64 | List get props => []; 65 | } 66 | 67 | class ToggloUpdateTypeMapEvent extends SearchEvent { 68 | const ToggloUpdateTypeMapEvent(); 69 | @override 70 | List get props => []; 71 | } 72 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr); 51 | std::string utf8_string; 52 | if (target_length == 0 || target_length > utf8_string.max_size()) { 53 | return utf8_string; 54 | } 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | flutter_maps_adv 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /lib/screens/image_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:card_swiper/card_swiper.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:flutter_maps_adv/blocs/blocs.dart'; 5 | import 'package:flutter_maps_adv/global/environment.dart'; 6 | 7 | class ImageScreen extends StatelessWidget { 8 | static const routeName = 'image-screen'; 9 | const ImageScreen({Key? key}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | final publicactionBloc = BlocProvider.of(context); 14 | return Scaffold( 15 | backgroundColor: const Color.fromARGB(255, 29, 47, 58), 16 | appBar: AppBar( 17 | centerTitle: false, 18 | iconTheme: const IconThemeData(color: Colors.white), 19 | backgroundColor: const Color(0xFF111b21), 20 | ), 21 | body: Swiper( 22 | pagination: const SwiperPagination(), 23 | itemCount: publicactionBloc.state.currentPublicacion!.imagenes!.length, 24 | itemBuilder: (BuildContext context, int index) { 25 | return _ImageItem( 26 | index: index, 27 | ); 28 | }, 29 | ), 30 | ); 31 | } 32 | } 33 | 34 | class _ImageItem extends StatelessWidget { 35 | final int index; 36 | const _ImageItem({Key? key, required this.index}) : super(key: key); 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | final publicactionBloc = BlocProvider.of(context); 41 | return GestureDetector( 42 | onTap: () { 43 | // Navigator.of(context).pop(); 44 | }, 45 | child: Container( 46 | margin: const EdgeInsets.symmetric(vertical: 30), 47 | child: ClipRRect( 48 | borderRadius: BorderRadius.circular(20), 49 | child: Image.network( 50 | "${Environment.apiUrl}/uploads/publicaciones/${publicactionBloc.state.currentPublicacion!.uid!}?imagenIndex=${publicactionBloc.state.currentPublicacion!.imagenes![index]}", 51 | fit: BoxFit.cover, 52 | ), 53 | ), 54 | ), 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | return true; 35 | } 36 | 37 | void FlutterWindow::OnDestroy() { 38 | if (flutter_controller_) { 39 | flutter_controller_ = nullptr; 40 | } 41 | 42 | Win32Window::OnDestroy(); 43 | } 44 | 45 | LRESULT 46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 47 | WPARAM const wparam, 48 | LPARAM const lparam) noexcept { 49 | // Give Flutter, including plugins, an opportunity to handle window messages. 50 | if (flutter_controller_) { 51 | std::optional result = 52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 53 | lparam); 54 | if (result) { 55 | return *result; 56 | } 57 | } 58 | 59 | switch (message) { 60 | case WM_FONTCHANGE: 61 | flutter_controller_->engine()->ReloadSystemFonts(); 62 | break; 63 | } 64 | 65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 66 | } 67 | -------------------------------------------------------------------------------- /assets/alertas/disturbios.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/widgets/custom_input.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CustonInput extends StatelessWidget { 4 | final IconData icon; 5 | final String placeholder; 6 | final TextEditingController textController; 7 | final TextInputType keyboardType; 8 | final bool isPassword; 9 | 10 | const CustonInput({ 11 | Key? key, 12 | required this.icon, 13 | required this.placeholder, 14 | required this.textController, 15 | this.keyboardType = TextInputType.text, 16 | this.isPassword = false, 17 | }) : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Column(children: [ 22 | Container( 23 | margin: const EdgeInsets.only(bottom: 15), 24 | decoration: BoxDecoration( 25 | color: Colors.white, 26 | borderRadius: BorderRadius.circular(30), 27 | boxShadow: const [ 28 | BoxShadow( 29 | color: Colors.black12, 30 | //offset: para mover la sobra 31 | offset: Offset(0, 5), 32 | blurRadius: 5) 33 | ]), 34 | child: TextField( 35 | // textCapitalization: TextCapitalization.sentences, 36 | controller: textController, 37 | autocorrect: false, 38 | maxLength: 50, 39 | obscureText: isPassword, 40 | keyboardType: keyboardType, 41 | decoration: InputDecoration( 42 | prefixIcon: Icon(icon, color: const Color(0xFF7ab466)), 43 | focusedBorder: const OutlineInputBorder( 44 | borderRadius: BorderRadius.all(Radius.circular(30)), 45 | borderSide: BorderSide(color: Color(0xFF7ab466)), 46 | ), 47 | enabledBorder: const OutlineInputBorder( 48 | borderRadius: BorderRadius.all(Radius.circular(30)), 49 | borderSide: BorderSide(color: Color(0xFF7ab466)), 50 | ), 51 | hintText: placeholder, 52 | counterText: 53 | '', // Establecer el contador de caracteres como una cadena vacía 54 | ), 55 | ), 56 | ), 57 | ]); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/models/comentarioPerson.dart: -------------------------------------------------------------------------------- 1 | // To parse this JSON data, do 2 | // 3 | // final comentarioResponse = comentarioResponseFromJson(jsonString); 4 | 5 | import 'dart:convert'; 6 | 7 | ComentarioPersonResponse comentarioResponseFromJson(String str) => 8 | ComentarioPersonResponse.fromJson(json.decode(str)); 9 | 10 | String comentarioResponseToJson(ComentarioPersonResponse data) => 11 | json.encode(data.toJson()); 12 | 13 | class ComentarioPersonResponse { 14 | ComentarioPerson comentario; 15 | 16 | ComentarioPersonResponse({ 17 | required this.comentario, 18 | }); 19 | 20 | factory ComentarioPersonResponse.fromJson(Map json) => 21 | ComentarioPersonResponse( 22 | comentario: ComentarioPerson.fromJson(json["comentario"]), 23 | ); 24 | 25 | Map toJson() => { 26 | "comentario": comentario.toJson(), 27 | }; 28 | } 29 | 30 | class ComentarioPerson { 31 | String contenido; 32 | String usuario; 33 | String publicacion; 34 | List likes; 35 | String estado; 36 | String createdAt; 37 | String updatedAt; 38 | String uid; 39 | 40 | ComentarioPerson({ 41 | required this.contenido, 42 | required this.usuario, 43 | required this.publicacion, 44 | required this.likes, 45 | required this.estado, 46 | required this.createdAt, 47 | required this.updatedAt, 48 | required this.uid, 49 | }); 50 | 51 | factory ComentarioPerson.fromJson(Map json) => 52 | ComentarioPerson( 53 | contenido: json["contenido"], 54 | usuario: json["usuario"], 55 | publicacion: json["publicacion"], 56 | likes: List.from(json["likes"].map((x) => x)), 57 | estado: json["estado"], 58 | createdAt: json["createdAt"], 59 | updatedAt: json["updatedAt"], 60 | uid: json["uid"], 61 | ); 62 | 63 | Map toJson() => { 64 | "contenido": contenido, 65 | "usuario": usuario, 66 | "publicacion": publicacion, 67 | "likes": List.from(likes.map((x) => x)), 68 | "estado": estado, 69 | "createdAt": createdAt, 70 | "updatedAt": updatedAt, 71 | "uid": uid, 72 | }; 73 | } 74 | -------------------------------------------------------------------------------- /lib/blocs/members/members_event.dart: -------------------------------------------------------------------------------- 1 | part of 'members_bloc.dart'; 2 | 3 | abstract class MembersEvent extends Equatable { 4 | const MembersEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | class MembersInitEvent extends MembersEvent {} 11 | 12 | //loader 13 | class MembersLoadingEvent extends MembersEvent {} 14 | 15 | class MembersLoadedEvent extends MembersEvent { 16 | final List usuariosAll; 17 | 18 | const MembersLoadedEvent(this.usuariosAll); 19 | 20 | @override 21 | List get props => [usuariosAll]; 22 | } 23 | 24 | //deleteMember 25 | class DeleteMemberEvent extends MembersEvent { 26 | final String uid; 27 | 28 | const DeleteMemberEvent(this.uid); 29 | 30 | @override 31 | List get props => [uid]; 32 | } 33 | 34 | class ChatInitEvent extends MembersEvent {} 35 | 36 | class ChatLoadedEvent extends MembersEvent { 37 | final List mensajes; 38 | 39 | const ChatLoadedEvent(this.mensajes); 40 | 41 | @override 42 | List get props => [mensajes]; 43 | } 44 | 45 | class GetLoadedChatMessage extends MembersEvent { 46 | final List messages; 47 | 48 | const GetLoadedChatMessage(this.messages); 49 | 50 | @override 51 | List get props => [messages]; 52 | } 53 | 54 | class ResetChatEvent extends MembersEvent {} 55 | 56 | class AddMessageEvent extends MembersEvent { 57 | final ChatMessage message; 58 | 59 | const AddMessageEvent(this.message); 60 | 61 | @override 62 | List get props => [message]; 63 | } 64 | 65 | class LimpiarMensajesEvent extends MembersEvent { 66 | const LimpiarMensajesEvent(); 67 | 68 | @override 69 | List get props => []; 70 | } 71 | 72 | class ChatGetMoreEvent extends MembersEvent { 73 | final List mensajes; 74 | 75 | const ChatGetMoreEvent(this.mensajes); 76 | 77 | @override 78 | List get props => [mensajes]; 79 | } 80 | 81 | class DeleteMemberByIdEvent extends MembersEvent { 82 | // ignore: non_constant_identifier_names 83 | final String id_usuario; 84 | // ignore: non_constant_identifier_names 85 | final String id_sala; 86 | 87 | const DeleteMemberByIdEvent(this.id_sala, this.id_usuario); 88 | 89 | @override 90 | List get props => [id_usuario, id_sala]; 91 | } 92 | -------------------------------------------------------------------------------- /lib/models/salas_mensaje_response.dart: -------------------------------------------------------------------------------- 1 | // To parse this JSON data, do 2 | // 3 | // final salasMensajeResponse = salasMensajeResponseFromMap(jsonString); 4 | 5 | import 'dart:convert'; 6 | 7 | SalasMensajeResponse salasMensajeResponseFromMap(String str) => 8 | SalasMensajeResponse.fromMap(json.decode(str)); 9 | 10 | String salasMensajeResponseToMap(SalasMensajeResponse data) => 11 | json.encode(data.toMap()); 12 | 13 | class SalasMensajeResponse { 14 | bool ok; 15 | List mensajesSala; 16 | 17 | SalasMensajeResponse({ 18 | required this.ok, 19 | required this.mensajesSala, 20 | }); 21 | 22 | factory SalasMensajeResponse.fromMap(Map json) => 23 | SalasMensajeResponse( 24 | ok: json["ok"], 25 | mensajesSala: List.from( 26 | json["mensajesSala"].map((x) => MensajesSala.fromMap(x))), 27 | ); 28 | 29 | Map toMap() => { 30 | "ok": ok, 31 | "mensajesSala": List.from(mensajesSala.map((x) => x.toMap())), 32 | }; 33 | } 34 | 35 | class MensajesSala { 36 | String id; 37 | String mensaje; 38 | String usuario; 39 | String createdAt; 40 | String updatedAt; 41 | int v; 42 | String nombre; 43 | bool isGoogle; 44 | String? img; 45 | 46 | MensajesSala({ 47 | required this.id, 48 | required this.mensaje, 49 | required this.usuario, 50 | required this.createdAt, 51 | required this.updatedAt, 52 | required this.isGoogle, 53 | required this.v, 54 | required this.nombre, 55 | this.img, 56 | }); 57 | 58 | factory MensajesSala.fromMap(Map json) => MensajesSala( 59 | id: json["_id"], 60 | mensaje: json["mensaje"], 61 | usuario: json["usuario"], 62 | createdAt: json["createdAt"], 63 | updatedAt: json["updatedAt"], 64 | isGoogle: json["isGoogle"], 65 | v: json["__v"], 66 | nombre: json["nombre"], 67 | img: json["img"], 68 | ); 69 | 70 | Map toMap() => { 71 | "_id": id, 72 | "mensaje": mensaje, 73 | "usuario": usuario, 74 | "createdAt": createdAt, 75 | "updatedAt": updatedAt, 76 | "isGoogle": isGoogle, 77 | "__v": v, 78 | "nombre": nombre, 79 | "img": img, 80 | }; 81 | } 82 | -------------------------------------------------------------------------------- /lib/blocs/publication/publication_state.dart: -------------------------------------------------------------------------------- 1 | part of 'publication_bloc.dart'; 2 | 3 | // ignore: must_be_immutable 4 | class PublicationState extends Equatable { 5 | final List publicaciones; 6 | final List publicacionesUsuario; 7 | List? comentarios; 8 | Publicacion? currentPublicacion; 9 | final List comentariosP; 10 | final bool isLoading; 11 | final bool isError; 12 | final int conuntComentarios; 13 | final bool firstController; 14 | final bool showNewPostsButton; 15 | 16 | PublicationState({ 17 | required this.publicaciones, 18 | this.currentPublicacion, 19 | required this.isLoading, 20 | required this.isError, 21 | this.comentarios, 22 | required this.publicacionesUsuario, 23 | this.comentariosP = const [], 24 | this.conuntComentarios = 0, 25 | this.firstController = false, 26 | this.showNewPostsButton = false, 27 | }); 28 | 29 | PublicationState copyWith({ 30 | List? publicaciones, 31 | Publicacion? currentPublicacion, 32 | bool? isLoading, 33 | bool? isError, 34 | bool? firstController, 35 | bool? showNewPostsButton, 36 | List? comentarios, 37 | List? publicacionesUsuario, 38 | List? comentariosP, 39 | int? conuntComentarios, 40 | }) { 41 | return PublicationState( 42 | publicaciones: publicaciones ?? this.publicaciones, 43 | currentPublicacion: currentPublicacion ?? this.currentPublicacion, 44 | isLoading: isLoading ?? this.isLoading, 45 | firstController: firstController ?? this.firstController, 46 | isError: isError ?? this.isError, 47 | showNewPostsButton: showNewPostsButton ?? this.showNewPostsButton, 48 | comentarios: comentarios ?? this.comentarios, 49 | comentariosP: comentariosP ?? this.comentariosP, 50 | publicacionesUsuario: publicacionesUsuario ?? this.publicacionesUsuario, 51 | conuntComentarios: conuntComentarios ?? this.conuntComentarios, 52 | ); 53 | } 54 | 55 | @override 56 | List get props => [ 57 | publicaciones, 58 | currentPublicacion, 59 | isLoading, 60 | isError, 61 | comentarios, 62 | publicacionesUsuario, 63 | conuntComentarios, 64 | comentariosP, 65 | firstController, 66 | showNewPostsButton, 67 | ]; 68 | } 69 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/blocs/notification/notification_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | import 'package:equatable/equatable.dart'; 3 | import 'package:flutter_maps_adv/models/notification.dart'; 4 | import 'package:flutter_maps_adv/resources/services/noification.dart'; 5 | 6 | part 'notification_event.dart'; 7 | part 'notification_state.dart'; 8 | 9 | class NotificationBloc extends Bloc { 10 | final NotificationService _notificationService = NotificationService(); 11 | 12 | NotificationBloc() : super(const NotificationState()) { 13 | on((event, emit) async { 14 | emit( 15 | state.copyWith(notificaciones: event.notificaciones, loading: false)); 16 | print('notificaciones22222222222'); 17 | }); 18 | 19 | on((event, emit) async { 20 | final updatedNotificaciones = state.notificaciones.map((notificacion) { 21 | if (notificacion.uid == event.id) { 22 | return notificacion.copyWith(isLeida: true); 23 | } else { 24 | return notificacion; 25 | } 26 | }).toList(); // Cast the List to List 27 | 28 | // await loadNotification(); 29 | emit(state.copyWith( 30 | notificaciones: updatedNotificaciones.cast())); 31 | 32 | await _notificationService.marcarNotificacionComoLeida(event.id); 33 | }); 34 | 35 | on((event, emit) async { 36 | await _notificationService.deleteAllNotifications(); 37 | emit(state.copyWith(notificaciones: [])); 38 | }); 39 | 40 | on((event, emit) async { 41 | emit(state.copyWith(currentText: event.currentText)); 42 | }); 43 | 44 | on((event, emit) async { 45 | final updatedNotificaciones = state.notificaciones 46 | .where((notificacion) => notificacion.uid != event.id) 47 | .toList(); 48 | 49 | emit(state.copyWith(notificaciones: updatedNotificaciones)); 50 | 51 | await _notificationService.deleteNotificationById(event.id); 52 | }); 53 | 54 | on((event, emit) async { 55 | emit(state.copyWith(loading: true)); 56 | }); 57 | } 58 | 59 | loadNotification() async { 60 | add(const LoadingNotificationEvent()); 61 | final List notificaciones = 62 | await _notificationService.getNotificaciones(); 63 | add(LoadNotificationEvent(notificaciones)); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/blocs/room/room_event.dart: -------------------------------------------------------------------------------- 1 | part of 'room_bloc.dart'; 2 | 3 | abstract class RoomEvent extends Equatable { 4 | const RoomEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | class SalasInitEvent extends RoomEvent { 11 | final List salas; 12 | 13 | const SalasInitEvent(this.salas); 14 | 15 | @override 16 | List get props => [salas]; 17 | } 18 | 19 | class ChatLoadedEvent extends RoomEvent { 20 | final List mensajes; 21 | 22 | const ChatLoadedEvent(this.mensajes); 23 | 24 | @override 25 | List get props => [mensajes]; 26 | } 27 | 28 | class SalaCreateEvent extends RoomEvent { 29 | final String nombre; 30 | 31 | const SalaCreateEvent(this.nombre); 32 | 33 | @override 34 | List get props => [nombre]; 35 | } 36 | 37 | class SalaJoinEvent extends RoomEvent { 38 | final List salas; 39 | 40 | const SalaJoinEvent(this.salas); 41 | 42 | @override 43 | List get props => [salas]; 44 | } 45 | 46 | class ChatCreate extends RoomEvent { 47 | final MensajesSala mensaje; 48 | 49 | const ChatCreate(this.mensaje); 50 | 51 | @override 52 | List get props => [mensaje]; 53 | } 54 | 55 | class SalaSelectEvent extends RoomEvent { 56 | final Sala salaSeleccionada; 57 | 58 | const SalaSelectEvent(this.salaSeleccionada); 59 | 60 | @override 61 | List get props => [salaSeleccionada]; 62 | } 63 | 64 | class ObtenerUsuariosSalaEvent extends RoomEvent { 65 | final List usuarioAll; 66 | 67 | const ObtenerUsuariosSalaEvent(this.usuarioAll); 68 | 69 | @override 70 | List get props => [usuarioAll]; 71 | } 72 | 73 | class CargandoEvent extends RoomEvent {} 74 | 75 | class CargandoEventFalse extends RoomEvent {} 76 | 77 | class DeleteSalaEvent extends RoomEvent { 78 | final String uid; 79 | 80 | const DeleteSalaEvent(this.uid); 81 | 82 | @override 83 | List get props => [uid]; 84 | } 85 | 86 | class RoomLoadingEvent extends RoomEvent {} 87 | 88 | class RoomLoadingEvent2 extends RoomEvent {} 89 | 90 | class AbandonarSalaEvent extends RoomEvent { 91 | final String uid; 92 | 93 | const AbandonarSalaEvent(this.uid); 94 | 95 | @override 96 | List get props => [uid]; 97 | } 98 | 99 | class ResetTotalMensajesNoLeidosEvent extends RoomEvent { 100 | final String uid; 101 | const ResetTotalMensajesNoLeidosEvent(this.uid); 102 | @override 103 | List get props => [uid]; 104 | } 105 | -------------------------------------------------------------------------------- /lib/resources/services/noification.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | 4 | import 'package:flutter_maps_adv/global/environment.dart'; 5 | import 'package:flutter_maps_adv/models/notification.dart'; 6 | import 'package:flutter_maps_adv/resources/services/auth_provider.dart'; 7 | import 'package:http/http.dart' as http; 8 | 9 | class NotificationService { 10 | Future> getNotificaciones() async { 11 | try { 12 | final uri = Uri.parse('${Environment.apiUrl}/notificacion'); 13 | final resp = await http.get( 14 | uri, 15 | headers: { 16 | 'Content-Type': 'application/json', 17 | 'x-token': await AuthService.getToken() as String, 18 | }, 19 | ); 20 | final decodedData = json.decode(resp.body); 21 | final notificacionResp = NotificacionReponse.fromJson(decodedData); 22 | return notificacionResp.notificaciones; 23 | } catch (e) { 24 | print('Error: $e'); 25 | return []; 26 | } 27 | } 28 | 29 | Future marcarNotificacionComoLeida(String id) async { 30 | try { 31 | print('id: $id'); 32 | final uri = Uri.parse('${Environment.apiUrl}/notificacion/$id'); 33 | 34 | final resp = await http.put( 35 | uri, 36 | headers: { 37 | 'Content-Type': 'application/json', 38 | 'x-token': await AuthService.getToken() as String, 39 | }, 40 | ); 41 | return true; 42 | } catch (e) { 43 | print('Error: $e'); 44 | return false; 45 | } 46 | } 47 | 48 | //deleteAllNotifications 49 | Future deleteAllNotifications() async { 50 | try { 51 | final uri = Uri.parse('${Environment.apiUrl}/notificacion'); 52 | 53 | final resp = await http.delete( 54 | uri, 55 | headers: { 56 | 'Content-Type': 'application/json', 57 | 'x-token': await AuthService.getToken() as String, 58 | }, 59 | ); 60 | return true; 61 | } catch (e) { 62 | print('Error: $e'); 63 | return false; 64 | } 65 | } 66 | 67 | Future deleteNotificationById(String id) async { 68 | try { 69 | final uri = Uri.parse('${Environment.apiUrl}/notificacion/$id'); 70 | 71 | final resp = await http.delete( 72 | uri, 73 | headers: { 74 | 'Content-Type': 'application/json', 75 | 'x-token': await AuthService.getToken() as String, 76 | }, 77 | ); 78 | return true; 79 | } catch (e) { 80 | print('Error: $e'); 81 | return false; 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply plugin: 'com.google.gms.google-services' 27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 28 | 29 | 30 | android { 31 | compileSdkVersion 33 32 | ndkVersion flutter.ndkVersion 33 | 34 | compileOptions { 35 | sourceCompatibility JavaVersion.VERSION_1_8 36 | targetCompatibility JavaVersion.VERSION_1_8 37 | } 38 | 39 | kotlinOptions { 40 | jvmTarget = '1.8' 41 | } 42 | 43 | sourceSets { 44 | main.java.srcDirs += 'src/main/kotlin' 45 | } 46 | 47 | defaultConfig { 48 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 49 | applicationId "com.vinicioborja.flutter_maps_adv" 50 | // You can update the following values to match your application needs. 51 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 52 | minSdkVersion 21 53 | targetSdkVersion flutter.targetSdkVersion 54 | versionCode flutterVersionCode.toInteger() 55 | versionName flutterVersionName 56 | } 57 | 58 | buildTypes { 59 | release { 60 | // TODO: Add your own signing config for the release build. 61 | // Signing with the debug keys for now, so `flutter run --release` works. 62 | signingConfig signingConfigs.debug 63 | } 64 | } 65 | } 66 | 67 | flutter { 68 | source '../..' 69 | } 70 | 71 | dependencies { 72 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 73 | implementation platform('com.google.firebase:firebase-bom:32.1.0') 74 | implementation 'com.google.firebase:firebase-analytics-ktx' 75 | } -------------------------------------------------------------------------------- /assets/iconvinculacion/maltrato3.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/vinculacionalertas/maltrato3.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/models/institucionmodel.dart: -------------------------------------------------------------------------------- 1 | // To parse this JSON data, do 2 | // 3 | // final institucionReponse = institucionReponseFromJson(jsonString); 4 | 5 | import 'dart:convert'; 6 | 7 | InstitucionReponse institucionReponseFromJson(String str) => 8 | InstitucionReponse.fromJson(json.decode(str)); 9 | 10 | String institucionReponseToJson(InstitucionReponse data) => 11 | json.encode(data.toJson()); 12 | 13 | class InstitucionReponse { 14 | bool ok; 15 | String msg; 16 | List instituciones; 17 | 18 | InstitucionReponse({ 19 | required this.ok, 20 | required this.msg, 21 | required this.instituciones, 22 | }); 23 | 24 | factory InstitucionReponse.fromJson(Map json) => 25 | InstitucionReponse( 26 | ok: json["ok"], 27 | msg: json["msg"], 28 | instituciones: List.from( 29 | json["instituciones"].map((x) => Institucione.fromJson(x))), 30 | ); 31 | 32 | Map toJson() => { 33 | "ok": ok, 34 | "msg": msg, 35 | "instituciones": 36 | List.from(instituciones.map((x) => x.toJson())), 37 | }; 38 | } 39 | 40 | class Institucione { 41 | String id; 42 | String nombre; 43 | String direccion; 44 | String tipo; 45 | String? descripcion; 46 | int v; 47 | 48 | Institucione({ 49 | required this.id, 50 | required this.nombre, 51 | required this.direccion, 52 | required this.tipo, 53 | this.descripcion, 54 | required this.v, 55 | }); 56 | 57 | factory Institucione.fromJson(Map json) { 58 | try { 59 | return Institucione( 60 | id: json["_id"], 61 | nombre: json["nombre"], 62 | direccion: json["direccion"], 63 | tipo: json["tipo"], 64 | descripcion: json["descripcion"], 65 | v: json["__v"], 66 | ); 67 | } catch (e) { 68 | // Manejar errores aquí 69 | print("Error al analizar el JSON en Institucione.fromJson: $e"); 70 | 71 | // Identificar el campo problemático 72 | if (e is FormatException) { 73 | final fieldWithError = e.source; 74 | print("Campo problemático: $fieldWithError"); 75 | } 76 | 77 | return Institucione( 78 | id: "", 79 | nombre: "", 80 | direccion: "", 81 | tipo: "", 82 | v: 1); // Devolver un objeto vacío o null en caso de error, o lanzar una excepción si es necesario. 83 | } 84 | } 85 | 86 | Map toJson() => { 87 | "_id": id, 88 | "nombre": nombre, 89 | "direccion": direccion, 90 | "tipo": tipo, 91 | "descripcion": descripcion, 92 | "__v": v, 93 | }; 94 | } 95 | -------------------------------------------------------------------------------- /lib/widgets/home/searchbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:animate_do/animate_do.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:flutter_maps_adv/blocs/search/search_bloc.dart'; 5 | import 'package:flutter_maps_adv/delegates/search_destination_delegate.dart'; 6 | import 'package:flutter_maps_adv/models/search_result.dart'; 7 | 8 | class SearchBar extends StatelessWidget { 9 | const SearchBar({Key? key}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return BlocBuilder( 14 | builder: (context, state) { 15 | return state.displayManualMarker 16 | ? const SizedBox() 17 | : FadeInDown( 18 | duration: const Duration(milliseconds: 300), 19 | child: const _SearchBarBody()); 20 | }, 21 | ); 22 | } 23 | } 24 | 25 | class _SearchBarBody extends StatelessWidget { 26 | const _SearchBarBody({Key? key}) : super(key: key); 27 | 28 | void onSearchResults(BuildContext context, SearchResult result) { 29 | final searchBloc = BlocProvider.of(context); 30 | 31 | if (result.manual == true) { 32 | searchBloc.add(OnActivateManualMarkerEvent()); 33 | return; 34 | } 35 | } 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | return SafeArea( 40 | child: Container( 41 | margin: const EdgeInsets.only(top: 10), 42 | padding: const EdgeInsets.symmetric(horizontal: 30), 43 | width: double.infinity, 44 | child: GestureDetector( 45 | onTap: () async { 46 | //Si no se encuentra el archivo, se debe importar el archivo search_destination_delegate.dart 47 | final result = await showSearch( 48 | context: context, delegate: SearchDestinationDelegate()); 49 | if (result == null) return; 50 | // ignore: use_build_context_synchronously 51 | onSearchResults(context, result); 52 | }, 53 | child: Container( 54 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 13), 55 | decoration: BoxDecoration( 56 | color: Colors.white, 57 | borderRadius: BorderRadius.circular(100), 58 | boxShadow: const [ 59 | BoxShadow( 60 | color: Colors.black12, 61 | blurRadius: 5, 62 | offset: Offset(0, 5)) 63 | ]), 64 | child: const Text('¿Dónde quieres ir?', 65 | style: TextStyle(color: Colors.black87)), 66 | )), 67 | ), 68 | ); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /lib/screens/home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_maps_adv/blocs/blocs.dart'; 4 | import 'package:flutter_maps_adv/screens/screens.dart'; 5 | import 'package:flutter_maps_adv/widgets/custom_bottom_navigation.dart'; 6 | 7 | import 'package:fluttertoast/fluttertoast.dart'; // Asegúrate de importar los paquetes necesarios 8 | 9 | class HomeScreen extends StatefulWidget { 10 | static const String homeroute = 'home'; 11 | 12 | const HomeScreen({Key? key}) : super(key: key); 13 | 14 | @override 15 | State createState() => _HomeScreenState(); 16 | } 17 | 18 | class _HomeScreenState extends State { 19 | DateTime currentBackPressTime = DateTime.now(); 20 | 21 | // Método para manejar la lógica de doble presión 22 | Future onWillPop() { 23 | DateTime now = DateTime.now(); 24 | if (currentBackPressTime == null || 25 | now.difference(currentBackPressTime) > const Duration(seconds: 2)) { 26 | currentBackPressTime = now; 27 | Fluttertoast.showToast(msg: "Presiona nuevamente para salir"); 28 | return Future.value(false); 29 | } 30 | return Future.value(true); 31 | } 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | final publicationBloc = BlocProvider.of(context); 36 | final counterBlocUser = BlocProvider.of(context); 37 | 38 | return WillPopScope( 39 | onWillPop: 40 | onWillPop, // Llamamos al método onWillPop definido anteriormente 41 | child: Scaffold( 42 | body: Stack( 43 | children: [ 44 | BlocBuilder( 45 | builder: (context, state) { 46 | return IndexedStack( 47 | index: state.index, 48 | children: [ 49 | // Si tu counterBloc está activo, puedes agregar aquí el widget correspondiente 50 | // Center(child: Text("Home")), 51 | const LoadingMapScreen(), 52 | NewsScreen(onNewPublication: () async { 53 | await publicationBloc.getNextPublicaciones(); 54 | }), 55 | 56 | // GruposScreen(), 57 | const RoomsScreen(), 58 | const PerfilScreen(), 59 | // Center( 60 | // child: Column( 61 | // mainAxisAlignment: MainAxisAlignment.center, 62 | // children: [ConfigScreen()])), 63 | ], 64 | ); 65 | }, 66 | ) 67 | ], 68 | ), 69 | bottomNavigationBar: const CustomBottomNavigation(), 70 | ), 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 27 | 28 | 30 | 31 | 39 | 43 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 56 | 59 | 60 | -------------------------------------------------------------------------------- /lib/screens/perfil/edit_nombre.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_maps_adv/blocs/auth/auth_bloc.dart'; 4 | 5 | class EditNombreScreen extends StatefulWidget { 6 | static const String editNombreroute = 'editNombre'; 7 | const EditNombreScreen({Key? key}) : super(key: key); 8 | 9 | @override 10 | State createState() => _EditNombreScreenState(); 11 | } 12 | 13 | class _EditNombreScreenState extends State { 14 | AuthBloc authBloc = AuthBloc(); 15 | bool _isEmpty = true; // Variable para controlar si el TextField está vacío 16 | 17 | @override 18 | void initState() { 19 | authBloc = BlocProvider.of(context); 20 | super.initState(); 21 | _textController.text = authBloc.state.usuario!.nombre; 22 | 23 | _textController.addListener(() { 24 | setState(() { 25 | _isEmpty = _textController.text.isEmpty; 26 | }); 27 | }); 28 | } 29 | 30 | final _textController = TextEditingController(); 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | return Scaffold( 35 | backgroundColor: Colors.white, 36 | appBar: AppBar( 37 | iconTheme: const IconThemeData(color: Colors.black87), 38 | centerTitle: false, 39 | title: const Text( 40 | 'Cambiar Nombre', 41 | style: TextStyle(color: Colors.black87), 42 | ), 43 | actions: [ 44 | IconButton( 45 | onPressed: () { 46 | if (_isEmpty) return; 47 | authBloc.updateUsuario( 48 | _textController.text, authBloc.state.usuario!.telefono ?? ''); 49 | Navigator.pop(context); 50 | }, 51 | //icono de un visto 52 | icon: const Icon( 53 | Icons.check, 54 | color: Colors.black87, 55 | ), 56 | ), 57 | ], 58 | ), 59 | body: Column( 60 | children: [ 61 | Padding( 62 | padding: const EdgeInsets.all(20), 63 | child: TextField( 64 | textCapitalization: TextCapitalization.sentences, 65 | controller: _textController, 66 | maxLength: 50, 67 | onChanged: (value) { 68 | setState(() { 69 | _isEmpty = value.isEmpty; 70 | }); 71 | }, 72 | decoration: InputDecoration( 73 | labelText: 'Nombres', 74 | labelStyle: const TextStyle( 75 | color: Color(0xFF7ab466), 76 | ), 77 | focusedBorder: UnderlineInputBorder( 78 | borderSide: BorderSide( 79 | color: _isEmpty ? Colors.red : const Color(0xFF7ab466), 80 | ), 81 | ), 82 | ), 83 | ), 84 | ), 85 | ], 86 | ), 87 | ); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /lib/screens/report_finish_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class ReportFinishScreen extends StatelessWidget { 6 | static const String routeName = 'report_finish'; 7 | 8 | const ReportFinishScreen({Key? key}) : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | body: Center( 14 | child: Padding( 15 | padding: const EdgeInsets.all(30.0), 16 | child: Column( 17 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 18 | children: [ 19 | Column( 20 | mainAxisAlignment: MainAxisAlignment.center, 21 | crossAxisAlignment: CrossAxisAlignment.center, 22 | children: const [ 23 | Icon( 24 | Icons.check_circle, 25 | color: Color(0xFF08df9a), 26 | size: 100, 27 | ), 28 | SizedBox(height: 20), 29 | Text( 30 | 'Gracias por denunciar', 31 | style: TextStyle( 32 | fontSize: 24, 33 | fontWeight: FontWeight.bold, 34 | ), 35 | ), 36 | SizedBox(height: 20), 37 | Text( 38 | 'Revisaremos tu denuncia y tomaremos las medidas necesarias si existiese una infracción de las Normas de la comunidad.', 39 | textAlign: TextAlign.center, 40 | ), 41 | ], 42 | ), 43 | const _BtnReport(), 44 | ], 45 | ), 46 | ), 47 | ), 48 | ); 49 | } 50 | } 51 | 52 | class _BtnReport extends StatelessWidget { 53 | const _BtnReport({Key? key}) : super(key: key); 54 | 55 | @override 56 | Widget build(BuildContext context) { 57 | double width = MediaQuery.of(context).size.width; 58 | return Center( 59 | child: Column( 60 | mainAxisAlignment: MainAxisAlignment.end, 61 | children: [ 62 | const SizedBox(height: 20), 63 | Container( 64 | margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 18), 65 | width: width * 0.95, 66 | height: 40, 67 | child: MaterialButton( 68 | shape: RoundedRectangleBorder( 69 | borderRadius: BorderRadius.circular(10)), 70 | color: const Color(0xFF7ab466), 71 | onPressed: () { 72 | Navigator.pop(context); 73 | Navigator.pop(context); 74 | Navigator.pop(context); 75 | }, 76 | //icono de aleta de emergencia 77 | child: const Text( 78 | 'Listo', 79 | style: TextStyle(fontSize: 16, color: Colors.white), 80 | ), 81 | ), 82 | ), 83 | ], 84 | ), 85 | ); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /lib/screens/report_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_maps_adv/blocs/notification/notification_bloc.dart'; 4 | import 'package:flutter_maps_adv/helpers/page_route.dart'; 5 | 6 | import 'package:flutter_maps_adv/screens/report_detalle_screen.dart'; 7 | 8 | class ReportScreen extends StatelessWidget { 9 | static const String reportRoute = 'denunciar'; 10 | 11 | static const List reportTitles = [ 12 | 'Violencia, abuso y explotación criminal', 13 | 'Odio y acoso', 14 | 'Suicidio y autolesión', 15 | 'Trastornos alimentarios e imagen corporal', 16 | 'Actividades y retos peligrosos', 17 | 'Desnudez o contenido sexual', 18 | 'Contenido impactante y explícito', 19 | 'Información falsa', 20 | 'Comportamiento engañoso y spam', 21 | 'Actividades y mercancías reguladas', 22 | 'Fraudes y estafas', 23 | 'Divulgación de datos personales', 24 | 'Falsificaciones y propiedad intelectual', 25 | 'Otro', 26 | ]; 27 | 28 | const ReportScreen({Key? key}) : super(key: key); 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return Scaffold( 33 | backgroundColor: Colors.white, 34 | appBar: AppBar( 35 | iconTheme: const IconThemeData(color: Colors.black87), 36 | centerTitle: false, 37 | title: const Text( 38 | 'Seleccionar motivo de la denuncia', 39 | style: TextStyle(color: Colors.black87), 40 | ), 41 | ), 42 | body: ListView( 43 | physics: const BouncingScrollPhysics(), 44 | children: List.generate(reportTitles.length, (index) { 45 | return _CardReport( 46 | title: reportTitles[index], 47 | subtitle: '', // Puedes dejar el subtítulo en blanco aquí 48 | icon: Icons.report, 49 | ); 50 | }), 51 | ), 52 | ); 53 | } 54 | } 55 | 56 | class _CardReport extends StatelessWidget { 57 | final String title; 58 | final String subtitle; 59 | final IconData icon; 60 | 61 | const _CardReport({ 62 | Key? key, 63 | required this.title, 64 | required this.subtitle, 65 | required this.icon, 66 | }) : super(key: key); 67 | 68 | @override 69 | Widget build(BuildContext context) { 70 | final notificationBloc = BlocProvider.of(context); 71 | return Card( 72 | elevation: 0, 73 | margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 5), 74 | child: ListTile( 75 | title: Text( 76 | title, 77 | style: const TextStyle(fontWeight: FontWeight.bold), 78 | ), 79 | trailing: const Icon(Icons.chevron_right, color: Colors.black87), 80 | onTap: () { 81 | notificationBloc.add( 82 | CurrentTextReportEvent(title), 83 | ); 84 | _navigateToReport(context, title); 85 | }, 86 | ), 87 | ); 88 | } 89 | 90 | void _navigateToReport(BuildContext context, String title) { 91 | Navigator.of(context) 92 | .push(CreateRoute.createRoute(const ReportDetalleScreen())); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/models/comentarios.dart: -------------------------------------------------------------------------------- 1 | // To parse this JSON data, do 2 | // 3 | // final comentarioResponse = comentarioResponseFromJson(jsonString); 4 | 5 | import 'dart:convert'; 6 | 7 | ComentarioResponse comentarioResponseFromJson(String str) => 8 | ComentarioResponse.fromJson(json.decode(str)); 9 | 10 | String comentarioResponseToJson(ComentarioResponse data) => 11 | json.encode(data.toJson()); 12 | 13 | class ComentarioResponse { 14 | bool ok; 15 | List comentarios; 16 | 17 | ComentarioResponse({ 18 | required this.ok, 19 | required this.comentarios, 20 | }); 21 | 22 | factory ComentarioResponse.fromJson(Map json) => 23 | ComentarioResponse( 24 | ok: json["ok"], 25 | comentarios: List.from( 26 | json["comentarios"].map((x) => Comentario.fromJson(x))), 27 | ); 28 | 29 | Map toJson() => { 30 | "ok": ok, 31 | "comentarios": List.from(comentarios.map((x) => x.toJson())), 32 | }; 33 | } 34 | 35 | class Comentario { 36 | String contenido; 37 | Usuario usuario; 38 | String publicacion; 39 | String estado; 40 | String createdAt; 41 | String updatedAt; 42 | String uid; 43 | List? likes; 44 | 45 | Comentario({ 46 | required this.contenido, 47 | required this.usuario, 48 | required this.publicacion, 49 | required this.estado, 50 | required this.createdAt, 51 | required this.updatedAt, 52 | required this.uid, 53 | this.likes, 54 | }); 55 | 56 | factory Comentario.fromJson(Map json) => Comentario( 57 | contenido: json["contenido"], 58 | usuario: Usuario.fromJson(json["usuario"]), 59 | publicacion: json["publicacion"], 60 | estado: json["estado"], 61 | createdAt: json["createdAt"], 62 | updatedAt: json["updatedAt"], 63 | uid: json["uid"], 64 | likes: json["likes"] == null 65 | ? [] 66 | : List.from(json["likes"]!.map((x) => x)), 67 | ); 68 | 69 | Map toJson() => { 70 | "contenido": contenido, 71 | "usuario": usuario.toJson(), 72 | "publicacion": publicacion, 73 | "estado": estado, 74 | "createdAt": createdAt, 75 | "updatedAt": updatedAt, 76 | "uid": uid, 77 | "likes": likes == null ? [] : List.from(likes!.map((x) => x)), 78 | }; 79 | } 80 | 81 | class Usuario { 82 | String id; 83 | String nombre; 84 | String? img; 85 | bool google; 86 | Usuario({ 87 | required this.id, 88 | required this.nombre, 89 | this.img, 90 | this.google = false, 91 | }); 92 | 93 | factory Usuario.fromJson(Map json) => Usuario( 94 | id: json["_id"], 95 | nombre: json["nombre"], 96 | img: json["img"], 97 | google: json["google"], 98 | ); 99 | 100 | Map toJson() => { 101 | "_id": id, 102 | "nombre": nombre, 103 | "img": img, 104 | "google": google, 105 | }; 106 | } 107 | -------------------------------------------------------------------------------- /lib/views/map_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_maps_adv/blocs/blocs.dart'; 4 | import 'package:flutter_maps_adv/blocs/search/search_bloc.dart'; 5 | import 'package:google_maps_flutter/google_maps_flutter.dart'; 6 | 7 | class MapView extends StatefulWidget { 8 | final LatLng initialLocation; 9 | final Set polylines; 10 | final Set markers; 11 | 12 | const MapView( 13 | {Key? key, 14 | required this.initialLocation, 15 | required this.polylines, 16 | required this.markers}) 17 | : super(key: key); 18 | 19 | @override 20 | _MapViewState createState() => _MapViewState(); 21 | } 22 | 23 | class _MapViewState extends State { 24 | late final mapBloc = BlocProvider.of(context); 25 | late final GoogleMapController mapController; 26 | 27 | @override 28 | void dispose() { 29 | mapController.dispose(); 30 | super.dispose(); 31 | } 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | final CameraPosition initialCameraPosition = 36 | CameraPosition(target: widget.initialLocation, zoom: 15); 37 | final size = MediaQuery.of(context).size; 38 | final searchBloc = BlocProvider.of(context); 39 | 40 | return BlocBuilder( 41 | builder: (context, state) { 42 | return SizedBox( 43 | width: size.width, 44 | height: size.height, 45 | child: Listener( 46 | onPointerMove: (pointerMoveEvent) => 47 | mapBloc.add(OnStopFollowingUserEvent()), 48 | child: GoogleMap( 49 | initialCameraPosition: initialCameraPosition, 50 | compassEnabled: false, 51 | mapType: state.updateTypeMap ? MapType.satellite : MapType.normal, 52 | myLocationEnabled: true, 53 | zoomControlsEnabled: false, 54 | myLocationButtonEnabled: false, 55 | /* 56 | on((event, emit) => emit(state.copyWith( 57 | showRoutePreview: !state.showRoutePreview, 58 | activePolylineUser: !state.activePolylineUser))); 59 | */ 60 | polylines: state.displayManualMarker 61 | ? widget.polylines.map((polyline) { 62 | return polyline.copyWith( 63 | colorParam: const Color.fromARGB(255, 64, 70, 250)); 64 | }).toSet() 65 | : state.isActivePolyline 66 | ? widget.polylines 67 | : {}, 68 | markers: state.displayManualMarker ? widget.markers : {}, 69 | onCameraMove: (position) => mapBloc.mapCenter = position.target, 70 | onMapCreated: (controller) { 71 | mapController = controller; 72 | 73 | searchBloc.add(const IsTogglePolylineEvent()); 74 | mapBloc.add(OnMapInitialzedEvent(controller)); 75 | }, 76 | ), 77 | ), 78 | ); 79 | }, 80 | ); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | --------------------------------------------------------------------------------