Co-authored-by: Azareth-Tr <Azareth-Tr@users.noreply.github.com> Co-authored-by: eddgranados12 <eddgranados12@users.noreply.github.com> vistas de mockup actualizaco
25 lines
755 B
Dart
25 lines
755 B
Dart
// lib/main.dart
|
|
// Punto de entrada. Inicializa Firebase, FCM, y monta el árbol Riverpod.
|
|
|
|
import 'package:firebase_core/firebase_core.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'features/notifications/notification_service.dart';
|
|
import 'app.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
// Inicializar Firebase (requiere google-services.json en android/app/)
|
|
await Firebase.initializeApp();
|
|
|
|
// Inicializar FCM: permisos, canal Android, handlers foreground/background
|
|
await NotificationService.initialize();
|
|
|
|
runApp(
|
|
// ProviderScope es el contenedor global de Riverpod
|
|
const ProviderScope(
|
|
child: RecolectaApp(),
|
|
),
|
|
);
|
|
} |