when i try another url worked and get json
like: http://api.mp3quran.net/api/surah?surah=1&language=en
but this link not work
link:http://qualityproject-001-site1.ctempurl.com/api/v1/Policy
note: this api built by asp.core
import 'package:http/http.dart';
fetchPost() async {
//http://api.mp3quran.net/api/surah?surah=1&language=en (this work with flutter & flutter_web)
//http://qualityproject-001-site1.ctempurl.com/api/v1/Policy (but this not work with flutter_web and work with flutter)
Response response =
await get('http://qualityproject-001-site1.ctempurl.com/api/v1/Policy');
print(response.body);
}
Flutter crash report; please file at https://github.com/flutter/flutter/issues.
command
flutter run --machine --target lib\main.dart -d chrome --track-widget-creation --start-paused
exception
NoSuchMethodError: NoSuchMethodError: The method 'toJson' was called on null.
Receiver: null
Tried calling: toJson()
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 SourceLocation.toJson (package:vm_service/vm_service.dart:5024:24)
#2 Frame.toJson (package:vm_service/vm_service.dart:3296:47)
#3 Event.toJson (package:vm_service/vm_service.dart:3022:47)
#4 VmServerConnection._delegateRequest.<anonymous closure> (package:vm_service/vm_service.dart:1141:28)
#5 _rootRunUnary (dart:async/zone.dart:1132:38)
#6 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#7 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
#8 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)
#9 _DelayedData.perform (dart:async/stream_impl.dart:591:14)
#10 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:707:11)
#11 _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:667:7)
#12 _rootRun (dart:async/zone.dart:1120:38)
#13 _CustomZone.run (dart:async/zone.dart:1021:19)
#14 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#15 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#16 _rootRun (dart:async/zone.dart:1124:13)
#17 _CustomZone.run (dart:async/zone.dart:1021:19)
#18 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#19 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#20 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#21 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#22 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
#23 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)
flutter doctor
[✓] Flutter (Channel unknown, v1.10.2-pre.40, on Microsoft Windows [Version 10.0.17134.1006], locale en-US)
• Flutter version 1.10.2-pre.40 at C:\flutter\flutter
• Framework revision b4ab5cfe79 (29 hours ago), 2019-09-16 20:34:25 -0700
• Engine revision 7ea9884ab0
• Dart version 2.5.0 (build 2.5.0-dev.4.0 be66176534)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\flutter\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = C:\flutter\sdk
• Java binary at: C:\flutter\android-studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b01)
✗ Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.
[✓] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[✓] Android Studio (version 3.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 34.0.1
• Dart plugin version 182.5215
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
[✓] Android Studio (version 3.5)
• Android Studio at C:\flutter\android-studio
• Flutter plugin version 34.0.4
• Dart plugin version 191.6183.88
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b01)
[✓] VS Code (version 1.38.1)
• VS Code at C:\Users\Mahmoud salah eldin\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.4.1
[✓] Connected device (2 available)
• Chrome • chrome • web-javascript • Google Chrome 76.0.3809.132
• Server • web • web-javascript • Flutter Tools
! Doctor found issues in 1 category.
Do the import this way..
import 'package:http/http.dart' as http;
Then
var a = http.get(xyz);
Related
We have a strange error that occurs intermittently in our Flutter Web app. When I say intermittent, I mean when you run the app through "flutter run -d chrome" 50% of the time it will work, and 50% of the time the app will halt with this error:
"The following JSNoSuchMethodError was thrown building _ScaffoldMessengerScope:
TypeError: Cannot read properties of undefined (reading 'AnimationController')"
I bolded the "AnimationController" here because it is not always the same object. The object that errors out varies from run to run. And it's usually not the same object.
The other strange thing is that if I build the project and then deploy the build/web folder to a web server, and load the app from there, the error does not occur. This is a problem that happens strictly when executing "flutter run -d chrome". It happens on every engineer's machine too. Some of us run Macs and some are on Windows. Everyone has the same issue, although not everyone has it at the same frequency. Some see it happen once or twice an hour, and others see it almost every run.
Doing a "flutter clean" does not solve the problem.
We thought the issue could be related to our use of firebase through the Flutterfire package because we saw there were some related issues posted by other users on Stackoverflow. But so far updating the package, re-installing the package, and commenting out the firebase script inclusions in the index.html do not seem to solve the issue.
Flutter doctor output seems nominal as well:
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-arm, locale en-US)
• Flutter version 2.8.1 at /Users/hreddy/Code/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (5 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/hreddy/Library/Android/sdk
• Platform android-31, build-tools 30.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[✓] VS Code (version 1.63.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.32.0
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 97.0.4692.99
• No issues found!
The full output when the error occurs is as follows (you can see in this run it again occurred for a different random object):
TypeError: Cannot read properties of undefined (reading 'FirebaseFirestoreWeb')
at Object.registerPlugins (http://localhost:4999/packages/wiijii_visuals/generated_plugin_registrant.dart.lib.js:27:25)
at main (http://localhost:4999/web_entrypoint.dart.lib.js:31:35)
at main.next (<anonymous>)
at runBody (http://localhost:4999/dart_sdk.js:40211:34)
at Object._async [as async] (http://localhost:4999/dart_sdk.js:40242:7)
at main$ (http://localhost:4999/web_entrypoint.dart.lib.js:30:18)
at http://localhost:4999/main_module.bootstrap.js:19:10
at Array.forEach (<anonymous>)
at window.$dartRunMain (http://localhost:4999/main_module.bootstrap.js:18:32)
at <anonymous>:1:8
at Object.runMain (http://localhost:4999/dwds/src/injected/client.js:8709:21)
at http://localhost:4999/dwds/src/injected/client.js:23792:19
at _wrapJsFunctionForAsync_closure.$protected (http://localhost:4999/dwds/src/injected/client.js:3511:15)
at _wrapJsFunctionForAsync_closure.call$2 (http://localhost:4999/dwds/src/injected/client.js:11510:12)
at Object._asyncStartSync (http://localhost:4999/dwds/src/injected/client.js:3475:20)
at main__closure3.$call$body$main__closure (http://localhost:4999/dwds/src/injected/client.js:23804:16)
at main__closure3.call$1 (http://localhost:4999/dwds/src/injected/client.js:23731:19)
at StaticClosure._rootRunUnary (http://localhost:4999/dwds/src/injected/client.js:3873:18)
at _CustomZone.runUnary$2$2 (http://localhost:4999/dwds/src/injected/client.js:12858:39)
at _CustomZone.runUnaryGuarded$1$2 (http://localhost:4999/dwds/src/injected/client.js:12805:14)
at _ForwardingStreamSubscription._sendData$1 (http://localhost:4999/dwds/src/injected/client.js:12395:19)
at _ForwardingStreamSubscription._add$1 (http://localhost:4999/dwds/src/injected/client.js:12341:15)
at _ForwardingStreamSubscription._add$1 (http://localhost:4999/dwds/src/injected/client.js:12674:12)
at _MapStream._handleData$2 (http://localhost:4999/dwds/src/injected/client.js:12735:12)
at _ForwardingStreamSubscription._handleData$1 (http://localhost:4999/dwds/src/injected/client.js:12700:20)
at BoundClosure.eval (eval at Closure_forwardCallTo (http://localhost:4999/dwds/src/injected/client.js:1439:14), <anonymous>:3:44)
at StaticClosure._rootRunUnary (http://localhost:4999/dwds/src/injected/client.js:3873:18)
at _CustomZone.runUnary$2$2 (http://localhost:4999/dwds/src/injected/client.js:12858:39)
at _CustomZone.runUnaryGuarded$1$2 (http://localhost:4999/dwds/src/injected/client.js:12805:14)
at _ControllerSubscription._sendData$1 (http://localhost:4999/dwds/src/injected/client.js:12395:19)
at _ControllerSubscription._add$1 (http://localhost:4999/dwds/src/injected/client.js:12341:15)
at _SyncStreamController._sendData$1 (http://localhost:4999/dwds/src/injected/client.js:12189:32)
at _SyncStreamController.add$1 (http://localhost:4999/dwds/src/injected/client.js:12070:15)
at BoundClosure.eval (eval at Closure_forwardInterceptedCallTo (http://localhost:4999/dwds/src/injected/client.js:1519:14), <anonymous>:3:45)
at StaticClosure._rootRunUnary (http://localhost:4999/dwds/src/injected/client.js:3873:18)
at _CustomZone.runUnary$2$2 (http://localhost:4999/dwds/src/injected/client.js:12858:39)
at _CustomZone.runUnaryGuarded$1$2 (http://localhost:4999/dwds/src/injected/client.js:12805:14)
at _ControllerSubscription._sendData$1 (http://localhost:4999/dwds/src/injected/client.js:12395:19)
at _ControllerSubscription._add$1 (http://localhost:4999/dwds/src/injected/client.js:12341:15)
at _SyncStreamController._sendData$1 (http://localhost:4999/dwds/src/injected/client.js:12189:32)
at _SyncStreamController.add$1 (http://localhost:4999/dwds/src/injected/client.js:12070:15)
at _GuaranteeSink.add$1 (http://localhost:4999/dwds/src/injected/client.js:23287:25)
at HtmlWebSocketChannel_closure1.call$1 (http://localhost:4999/dwds/src/injected/client.js:23556:149)
at _EventStreamSubscription_closure.call$1 (http://localhost:4999/dwds/src/injected/client.js:17826:26)
at StaticClosure._rootRunUnary (http://localhost:4999/dwds/src/injected/client.js:3879:16)
at _CustomZone.runUnary$2$2 (http://localhost:4999/dwds/src/injected/client.js:12858:39)
at _CustomZone.runUnaryGuarded$1$2 (http://localhost:4999/dwds/src/injected/client.js:12805:14)
at _CustomZone_bindUnaryCallbackGuarded_closure.call$1 (http://localhost:4999/dwds/src/injected/client.js:12995:25)
at invokeClosure (http://localhost:4999/dwds/src/injected/client.js:1262:26)
at WebSocket.<anonymous> (http://localhost:4999/dwds/src/injected/client.js:1281:18)
Any idea what direction we should investigate further?
The solution for me is when I first run the flutter app on my IDE, I hit the refresh button on the browser where the app runs and won't encounter it again until I close my IDE.
I am getting this E/flutter (25055) error when I am running my App (Flutter, fireBase
I tried Updating my flutter but still, I am getting the same logs
and these logs are making my App unstable and the App is crashing a lot
E/flutter (25055): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Bad state: field does not exist within the DocumentSnapshotPlatform
E/flutter (25055): #0 DocumentSnapshotPlatform.get._findKeyValueInMap (package:cloud_firestore_platform_interface/src/platform_interface/platform_interface_document_snapshot.dart:86:7)
E/flutter (25055): #1 DocumentSnapshotPlatform.get._findComponent (package:cloud_firestore_platform_interface/src/platform_interface/platform_interface_document_snapshot.dart:104:41)
E/flutter (25055): #2 DocumentSnapshotPlatform.get (package:cloud_firestore_platform_interface/src/platform_interface/platform_interface_document_snapshot.dart:120:26)
E/flutter (25055): #3 _JsonDocumentSnapshot.get (package:cloud_firestore/src/document_snapshot.dart:92:48)
E/flutter (25055): #4 _JsonDocumentSnapshot.[] (package:cloud_firestore/src/document_snapshot.dart:96:40)
E/flutter (25055): #5 _MyHomePageState.getLists (package:form_app/pages/home.dart:518:30)
E/flutter (25055): <asynchronous suspension>
E/flutter (25055): #6 _MyHomePageState._getUnitNamesData (package:form_app/pages/home.dart:495:33)
E/flutter (25055): <asynchronous suspension>
E/flutter (25055):
my Flutter doctor
C:\src\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19041.450], locale en-US)
• Flutter version 2.2.3 at C:\src\flutter
• Framework revision f4abaa0735 (7 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:/Users/afran/AppData/Local/Android/Sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = C:/Users/afran/AppData/Local/Android/Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
[√] IntelliJ IDEA Ultimate Edition (version 2020.2)
• IntelliJ at F:\IntelliJ IDEA 2020.2.3
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
[√] VS Code (version 1.55.2)
• VS Code at C:\Users\afran\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.21.0
[√] Connected device (2 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.131
• No issues found!
My App dependencies
dependencies:
flutter:
sdk: flutter
flutter_spinkit: ^5.0.0
geolocator: ^7.0.1
#geolocation: ^1.1.2
cloud_firestore: ^2.4.0
firebase_storage: ^10.0.1
permission_handler: ^8.1.4+2
firebase_core: ^1.0.1
url_launcher: ^6.0.2
firebase_auth: ^3.0.1
provider: ^5.0.0
google_fonts: ^2.0.0
shared_preferences: ^2.0.4
connectivity: ^3.0.2
mailer: ^5.0.1
firebase_messaging: ^10.0.4
flutter_local_notifications: ^5.0.0+1
The exception says the problem:
Unhandled Exception: Bad state: field does not exist within the DocumentSnapshotPlatform
Also you have the call methods:
E/flutter (25055): #0 DocumentSnapshotPlatform.get._findKeyValueInMap (package:cloud_firestore_platform_interface/src/platform_interface/platform_interface_document_snapshot.dart:86:7)
E/flutter (25055): #1 DocumentSnapshotPlatform.get._findComponent (package:cloud_firestore_platform_interface/src/platform_interface/platform_interface_document_snapshot.dart:104:41)
E/flutter (25055): #2 DocumentSnapshotPlatform.get (package:cloud_firestore_platform_interface/src/platform_interface/platform_interface_document_snapshot.dart:120:26)
E/flutter (25055): #3 _JsonDocumentSnapshot.get (package:cloud_firestore/src/document_snapshot.dart:92:48)
E/flutter (25055): #4 _JsonDocumentSnapshot.[] (package:cloud_firestore/src/document_snapshot.dart:96:40)
E/flutter (25055): #5 _MyHomePageState.getLists (package:form_app/pages/home.dart:518:30)
E/flutter (25055): <asynchronous suspension>
E/flutter (25055): #6 _MyHomePageState._getUnitNamesData (package:form_app/pages/home.dart:495:33)
E/flutter (25055): <asynchronous suspension>
E/flutter (25055):
You have to check at these rows what happens. We can't debug this because we don't have the code. You ask for a field that is not existing so it throws this exception.
converting with milliseconds differs from the original after conversion.
Microsecond conversion works fine.
Testcode:
print("---Milliseconds:");
DateTime dateTimeStart = DateTime.now();
print("Datetime: $dateTimeStart");
int milliseconds = dateTimeStart.millisecondsSinceEpoch;
print("Milliseconds: $milliseconds");
DateTime dateTimeEnd = DateTime.fromMillisecondsSinceEpoch(milliseconds);
print("DateTimeEnd: $dateTimeEnd");
print("---Microseconds:");
print("Datetime: $dateTimeStart");
int microseconds = dateTimeStart.microsecondsSinceEpoch;
print("Microseconds: $microseconds");
DateTime dateTimeEnd2 = DateTime.fromMicrosecondsSinceEpoch(microseconds);
print("DateTimeEnd2: $dateTimeEnd2");
Output:
I/flutter (26574): ---Milliseconds:
I/flutter (26574): Datetime: 2020-05-13 18:40:12.675351 <----- not equal among each other !!!
I/flutter (26574): Milliseconds: 1589388012675
I/flutter (26574): DateTimeEnd: 2020-05-13 18:40:12.675 <----- not equal among each other !!!
I/flutter (26574): ---Microseconds:
I/flutter (26574): Datetime: 2020-05-13 18:40:12.675351 <----- equal
I/flutter (26574): Microseconds: 1589388012675351
I/flutter (26574): DateTimeEnd2: 2020-05-13 18:40:12.675351 <----- equal
Or do I have a bug somewhere?
flutter doctor -v
[√] Flutter (Channel stable, v1.17.0, on Microsoft Windows [Version 10.0.18362.836], locale de-DE)
• Flutter version 1.17.0 at C:\AndroidStudio\FlutterSDK\flutter
• Framework revision e6b34c2b5c (11 days ago), 2020-05-02 11:39:18 -0700
• Engine revision 540786dd51
• Dart version 2.8.1
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Users\richa\AppData\Local\Android\sdk
• Platform android-29, build-tools 28.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
• All Android licenses accepted.
[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 44.0.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[√] VS Code (version 1.45.0)
• VS Code at C:\Users\richa\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.10.1
[√] Connected device (1 available)
• SM J510UN • a29a4ea7 • android-arm • Android 6.0.1 (API 23)
• No issues found!
This is not a bug. When you do millisecond conversion you are losing the greater precision that using microseconds provides. You're dropping all of the additional microseconds that the DateTime contains when you use milliseconds.
Here is where the exception is happening:
#override
Future<FirebaseUser> getCurrentUser() async {
FirebaseUser user = await _firebaseAuth.currentUser();
return user;
}
The exact error is:
Exception has occurred.
PlatformException (PlatformException(error, FirebaseApp with name [DEFAULT] doesn't exist. , null))
My Flutter Doctor Output:
[flutter] flutter doctor -v
[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.17763.914], locale en-US)
• Flutter version 1.12.13+hotfix.5 at D:\src\flutter
• Framework revision 27321ebbad (7 days ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\jcdos\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: D:\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Android Studio (version 3.5)
• Android Studio at D:\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
exit code 0
Here is my debug console:
E/flutter ( 6562): #40 SingleChildRenderObjectElement.mount
package:flutter/…/widgets/framework.dart:5445
E/flutter ( 6562): #41 Element.inflateWidget
package:flutter/…/widgets/framework.dart:3194
E/flutter ( 6562): #42 Element.updateChild
package:flutter/…/widgets/framework.dart:2988
E/flutter ( 6562): #43 ComponentElement.performRebuild
package:flutter/…/widgets/framework.dart:4243
E/flutter ( 6562): #44 Element.rebuild
package:flutter/…/widgets/framework.dart:3947
E/flutter ( 6562): #
√ Built build\app\outputs\apk\debug\app-debug.apk.
I've tried finding other sources to fix the error, but nothing works. I removed apply plugin: 'com.google.gms.google-services' from the app gradle as that was causing me other issues. And removing this fixed it, as the source I found said it gets called already somewhere else.
And if I keep the com.google.gms.google-services then I get this error which prevents the app from running in the emulator all together:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'com.example.testapp
Add below line into your android/app/build.gradle file:
apply plugin: 'com.google.gms.google-services'
Run the application in Android studio it should show some of the errors or files that need to be updated like in the build.gradle files. Also, you need the com.google.gms.google-services for firebase.
I am new to flutter, while running the app using flutter run command, it gives me this error.
The following StoreProviderError was thrown building StoreConnector<dynamic, dynamic>(dirty):
I/flutter ( 2958): Error: No StoreProvider<dynamic> found. To fix, please try:
I/flutter ( 2958):
I/flutter ( 2958): * Using Dart 2 (required) by using the --preview-dart-2 flag
I/flutter ( 2958): * Wrapping your MaterialApp with the StoreProvider<State>,
I/flutter ( 2958): rather than an individual Route
I/flutter ( 2958): * Providing full type information to your Store<State>,
I/flutter ( 2958): StoreProvider<State> and StoreConnector<State, ViewModel>
I/flutter ( 2958): * Ensure you are using consistent and complete imports.
I/flutter ( 2958): E.g. always use `import 'package:my_app/app_state.dart';
Can someone help me out to solve this issue.
flutter doctor report:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 6.1.7601], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.0)
[√] Android Studio (version 3.1)
[!] VS Code, 64-bit edition (version 1.24.1)
[√] Connected devices (1 available)