DEV Community

Discussion on: Flutter - Firebase Google Sign-in Auth + SplashScreen using updated API

Collapse
 
laersel2 profile image
laersel2

Invalid argument(s)

The relevant error-causing widget was
HomeScreen
lib\screens\authscreen.dart:79
When the exception was thrown, this was the stack

0 _StringBase.+ (dart:core-patch/string_patch.dart:262:57)

1 _HomeScreenState.build

package:firebase_gsignin/screens/homescreen.dart:17

2 StatefulElement.build

package:flutter/…/widgets/framework.dart:4619

3 ComponentElement.performRebuild

package:flutter/…/widgets/framework.dart:4502

4 StatefulElement.performRebuild

Collapse
 
mikulina profile image
Miku

Were you able to find a solution to this? I'm having the same problem right now. :/

Collapse
 
sai7xp profile image
Sumanth

Actually, that was because the null value is passed to the homescreen from the splashscreen(username). Fixed ✅✅ the error now. You can update the code as i updated the article.
Or else simply store the user details in localstorage using the SharedPreferences. It enables you to access the details even in offline mode.
I have commited the new changes to github. If you stuck anywhere look over github repo.

Collapse
 
laersel2 profile image
laersel2

Sir kindly help

Collapse
 
sai7xp profile image
Sumanth

Check the updated code and article