FlutterFire Documentation

repository·main·Indexed 27 days ago

https://github.com/firebase/flutterfire

Official Firebase plugins for Flutter, providing integration for services such as Authentication, Cloud Firestore, Cloud Functions, Firebase Analytics, App Check, AI Logic, and Firebase Installations across multiple platforms.

Tokens
77K
Snippets
243
Records
412
Agent score
93%

What's inside FlutterFire

  1. Overview of FlutterFire

    main
    FlutterFire is a collection of Flutter plugins that allow Flutter applications to integrate with various Firebase services. It enables developers to use Firebase features across mobile (Android, iOS), web, and desktop (macOS, Windows) platforms from a single Flutter codebase.
  2. Understand device states for receiving FCM messages

    main

    Incoming Firebase Cloud Messaging (FCM) payloads are handled differently depending on the application's state. Understanding these states is critical for implementing correct message handling logic:

    StateDescription
    ForegroundThe application is open, in view, and actively in use.
    BackgroundThe application is open but minimized (e.g., user pressed 'home', switched apps, or changed tabs on web).
    TerminatedThe device is locked or the application is not running.

    Preconditions for receiving messages:

    • Initial Launch: The application must have been opened at least once to allow registration with FCM.
    • iOS: If the user swipes the app away from the app switcher, it must be manually reopened for background messages to work.
    • Android: If the user force-quits the app via device settings, it must be manually reopened for messages to work.
    • Web: You must have requested a token using getToken() with your web push certificate.
  3. Understand documentation file types: Standalone files vs. Page fragments

    main

    The documentation consists of two types of Markdown files:

    1. Standalone files: These map one-to-one to a published URL on firebase.google.com. Filenames do not begin with an underscore (_).
    2. Page fragments: These are used to include common text or organize large pages and are included in other pages. Filenames almost always begin with an underscore (_).
  4. Use the ML Model Downloader preview plugin

    main

    The firebase_ml_model_downloader plugin is currently in preview. It allows you to download custom ML models for use with Firebase ML.

    Platform Support:

    • Android: Supported
    • iOS: Supported
    • MacOS: Beta support
    • Web: Not available

    Package: firebase_ml_model_downloader on pub.dev.