I am a newbie to Flutter and I am happy to try this great technology. And I am going to try to follow this example https://medium.com/flutterpub/flutter-auth-with-google-f3c3aa0d0ccc to do a Google Sign in
Personally, I like to separate the chains of function call line by line instead of one line. It is like below:
_googleSignIn
.signInSilently()
.whenComplete(() => {
print("Login complete");
});
However, when I do the auto format in Android Studio for these dart code, it give me the result in the picture below.
It give me not only an ugly code formatting, but also a wrong feeling of the scope of function.
Is there any way can help me to solve this issue?
I think yours is an issue of trailing comma.
dartfmt
actually uses trailing commas to determine when to go to the next line, and yours is missing one at the end of your code. Try reading this to understand why this is an issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With