Closed ninjaprodev closed 4 years ago
I have tried two approaches.
- Credentials.applicationDefault() --> returns null;
- Credential credentials = FirebaseAdmin.instance.certFromPath("service-account.json"); --> throws FileNotFoundException
Here is an absolute path of my file: E:\Flutter_projects\Personal\authorization\service-account.json (root of the project) In case it tries to look into android app I also put this file here and here: E:\Flutter_projects\Personal\authorization\android\app\service-account.json E:\Flutter_projects\Personal\authorization\android\service-account.json
But it did not help :( What am I doing wrong?
Should have created the file first in the directory getApplicationDocumentsDirectory(), and then can access it also using this path: getApplicationDocumentsDirectory().path + name-of-file.json
getApplicationDirectory() from path_provider package
I have tried two approaches. 1) Credentials.applicationDefault() --> returns null; 2) Credential credentials = FirebaseAdmin.instance.certFromPath("service-account.json"); --> throws FileNotFoundException
Here is an absolute path of my file: E:\Flutter_projects\Personal\authorization\service-account.json (root of the project) In case it tries to look into android app I also put this file here and here: E:\Flutter_projects\Personal\authorization\android\app\service-account.json E:\Flutter_projects\Personal\authorization\android\service-account.json
But it did not help :( What am I doing wrong?