This error is in web flutter project.
I have set initApp in main as instructed:
void initBackend() async{
Backendless.setUrl(Constants.SERVER_URL);
await Backendless.initApp(
applicationId: Constants.APPLICATION_ID,
jsApiKey: Constants.JVScript);
}
and add the line to the head of index.html.
but I got this error:
2021-10-30 14:33:00.031 10096-10172/com.example.foroodja_web E/flutter:
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Null check operator used on a null value
#0 Backendless.initApp (package:backendless_sdk/src/backendless.dart:36:29)
#1 _MyAppState.initBackend (package:foroodja_web/main.dart:35:23)
#2 _MyAppState.initState (package:foroodja_web/main.dart:30:5)
#3 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4726:57)
#4 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4559:5)
#5 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3631:14)
#6 Element.updateChild (package:flutter/src/widgets/framework.dart:3383:18)
#7 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1198:16)
#8 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:1167:5)
#9 RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:1112:18)
#10 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2531:19)
#11 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:1111:13)
#12 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:944:7)
#13 WidgetsBinding.scheduleAttachRootWidget.<anonymous closure> (package:flutter/src/widgets/binding.dart:924:7)
#14 _rootRun (dart:async/zone.dart:1420:47)
#15 _CustomZone.run (dart:async/zone.dart:1328:19)
#16 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
#17 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1276:23)
#18 _rootRun (dart:async/zone.dart:1428:13)
#19 _CustomZone.run (dart:async/zone.dart:1328:19)
#20 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1260:23)
#21 Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
#22 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:395:19)
#23 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:426:5)
#24 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)