// 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(),
    ),
  );
}