1

I already build a flutter android app, and it works with the Cloud_FireStore database. Now I want a connect my Cloud_FireStore database to my flutter Windows app, but I can't find any resources for Cloud_FireStore plugging for flutter Windows or how to connect Cloud_FireStore to Windows app.

my flutter doctor,

Doctor summary (to see all details, run flutter doctor -v):

[√] Flutter (Channel master, 1.19.0-2.0.pre.131, on Microsoft Windows [Version 10.0.18363.836], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.6.0)
[√] Android Studio (version 3.6)
[√] VS Code (version 1.45.1)
[√] Connected device (4 available)

I use Flutter Master channel mode to build Windows apps and no errors.

pubspec.yaml

dependencies:
  cloud_firestore:
  firebase_core:

these dependencies use to connect my Cloud_FireStore but it does not work with windows app.

Please help me!, Thank you.

Geethma
  • 25
  • 2
  • 5

2 Answers2

2

Unfortunately as of today, the packages for Firebase only support MacOS, not Windows.

Source

Jackson Lee
  • 1,198
  • 4
  • 12
1

Did you try firedart - https://pub.dev/packages/firedart? It supports Windows and the documentation says it all.

In pubspec.yaml file add-

dependencies:
  firedart: ^0.9.0+1

Then in main.dart -

import 'package:firedart/firedart.dart';
...
    void main()  {
       
        const projectId = 'c**d-p**s-3**7';
              
        Firestore.initialize(projectId);
        ...
    }
  

How to get your projectId- Go to your cloud firestore project from https://console.firebase.google.com and look for

your project -> project settings -> general -> Project ID

This will connect your Flutter Windows desktop application with cloud firestore database.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
  • Sadikul Haque Sadi, a link to a solution is welcome, but please ensure your answer is useful without it: [add context around the link](//meta.stackexchange.com/a/8259) so your fellow users will have some idea what it is and why it is there, then quote the most relevant part of the page you are linking to in case the target page is unavailable. [Answers that are little more than a link may be deleted.](/help/deleted-answers) – Luca Kiebel Jan 31 '22 at 13:24