无法设置用户属性-在Flutter Web中获取TypeError: Cannot read property 'statusCode' of null
。
尝试进行
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
UserCredential userCredential = await FirebaseAuth.instance.signInAnonymously();
FirebaseAnalytics analytics = FirebaseAnalytics();
analytics.setUserId(userCredential.user.uid);
analytics.setUserProperty(name:"xxxx",value:"xxxxx");