Cmabios
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
|
id("com.google.gms.google-services")
|
||||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||||
id("dev.flutter.flutter-gradle-plugin")
|
id("dev.flutter.flutter-gradle-plugin")
|
||||||
}
|
}
|
||||||
|
|||||||
29
aplicacion_hack/android/app/google-services.json
Normal file
29
aplicacion_hack/android/app/google-services.json
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "338042609701",
|
||||||
|
"project_id": "hackon-58b23",
|
||||||
|
"storage_bucket": "hackon-58b23.firebasestorage.app"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:338042609701:android:0f0f92d7f895794f371fcc",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.example.aplicacion_hack"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyBuT70SbADLeg92ll8keCySI8I4eYyqyLw"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
@@ -1,3 +1,14 @@
|
|||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
// Añadimos la herramienta de Google Services para que Android la pueda usar
|
||||||
|
classpath("com.google.gms:google-services:4.4.1")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
|||||||
BIN
aplicacion_hack/firebase.exe
Normal file
BIN
aplicacion_hack/firebase.exe
Normal file
Binary file not shown.
@@ -44,18 +44,18 @@ void main() async {
|
|||||||
// binding entre Flutter y el sistema operativo.
|
// binding entre Flutter y el sistema operativo.
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
// Inicializar Firebase — REQUIERE que hayas corrido:
|
try {
|
||||||
// > flutterfire configure
|
// CAMBIAMOS EL BLOQUE COMENTADO POR ESTO:
|
||||||
// Ese comando genera lib/firebase_options.dart automáticamente.
|
// Al no pasarle opciones, lee el google-services.json automáticamente en Android.
|
||||||
//
|
await Firebase.initializeApp();
|
||||||
// ATAJO: Si aún no tienes Firebase configurado, comenta las
|
|
||||||
// siguientes 3 líneas y la app correrá sin notificaciones.
|
// Vinculamos el handler de notificaciones en segundo plano
|
||||||
// -------------------------------------------------------
|
FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
|
||||||
// await Firebase.initializeApp(
|
|
||||||
// options: DefaultFirebaseOptions.currentPlatform,
|
debugPrint('🔥 Firebase inicializado con éxito en modo nativo.');
|
||||||
// );
|
} catch (e) {
|
||||||
// FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler);
|
debugPrint('❌ Error al inicializar Firebase: $e');
|
||||||
// -------------------------------------------------------
|
}
|
||||||
|
|
||||||
runApp(const ResiduosApp());
|
runApp(const ResiduosApp());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class ApiService {
|
|||||||
//
|
//
|
||||||
// ATAJO: Cambia solo esta constante para apuntar a staging/prod.
|
// ATAJO: Cambia solo esta constante para apuntar a staging/prod.
|
||||||
// ============================================================
|
// ============================================================
|
||||||
static const String _baseUrl = 'http://10.0.2.2:8000';
|
static const String _baseUrl = 'http://192.168.192.116:8000';
|
||||||
// static const String _baseUrl = 'http://127.0.0.1:8000'; // iOS Simulator
|
// static const String _baseUrl = 'http://127.0.0.1:8000'; // iOS Simulator
|
||||||
// static const String _baseUrl = 'http://192.168.1.XX:8000'; // Dispositivo físico
|
// static const String _baseUrl = 'http://192.168.1.XX:8000'; // Dispositivo físico
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: residuos_notif
|
name: hack_on_linces_app
|
||||||
description: "Sistema de Notificación Privada de Recolección de Residuos - MVP Hackathon"
|
description: "Sistema de Notificación Privada de Recolección de Residuos - MVP Hackathon"
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 1.0.0+1
|
version: 1.0.0+1
|
||||||
@@ -22,7 +22,7 @@ dependencies:
|
|||||||
# REQUERIDO antes de cualquier otro plugin de Firebase.
|
# REQUERIDO antes de cualquier otro plugin de Firebase.
|
||||||
# Configura con: flutterfire configure (requiere Firebase CLI)
|
# Configura con: flutterfire configure (requiere Firebase CLI)
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
firebase_core: ^3.0.0
|
firebase_core: ^3.15.2
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# firebase_messaging: Recepción de notificaciones push (FCM).
|
# firebase_messaging: Recepción de notificaciones push (FCM).
|
||||||
@@ -39,6 +39,7 @@ dependencies:
|
|||||||
shared_preferences: ^2.2.0
|
shared_preferences: ^2.2.0
|
||||||
|
|
||||||
cupertino_icons: ^1.0.6
|
cupertino_icons: ^1.0.6
|
||||||
|
firebase_auth: ^5.7.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
// This is a basic Flutter widget test.
|
|
||||||
//
|
|
||||||
// To perform an interaction with a widget in your test, use the WidgetTester
|
|
||||||
// utility in the flutter_test package. For example, you can send tap and scroll
|
|
||||||
// gestures. You can also use WidgetTester to find child widgets in the widget
|
|
||||||
// tree, read text, and verify that the values of widget properties are correct.
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
|
||||||
|
|
||||||
import 'package:aplicacion_hack/main.dart';
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
|
||||||
// Build our app and trigger a frame.
|
|
||||||
await tester.pumpWidget(const MyApp());
|
|
||||||
|
|
||||||
// Verify that our counter starts at 0.
|
|
||||||
expect(find.text('0'), findsOneWidget);
|
|
||||||
expect(find.text('1'), findsNothing);
|
|
||||||
|
|
||||||
// Tap the '+' icon and trigger a frame.
|
|
||||||
await tester.tap(find.byIcon(Icons.add));
|
|
||||||
await tester.pump();
|
|
||||||
|
|
||||||
// Verify that our counter has incremented.
|
|
||||||
expect(find.text('0'), findsNothing);
|
|
||||||
expect(find.text('1'), findsOneWidget);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
BIN
backend/hackathon.db
Normal file
BIN
backend/hackathon.db
Normal file
Binary file not shown.
BIN
hackathon.db
Normal file
BIN
hackathon.db
Normal file
Binary file not shown.
Reference in New Issue
Block a user