Issue 1:
Steps to Reproduce

Create new Android Studio Flutter project

Run it in simulator to check that it's fine.

Create a duplicate of lib/main.dart. Let's call it lib/main_alternate.dart.

Create a new Run/Debug configuration in IntelliJ

Run main_alternate.dart

You'll see that this confuses Flutter. I've had instances when this worked well, but other instances when main.dart was clearly running instead of main_alternate.dart. For example, breakpoints in main_alternate.dart weren't hit while breakpoints in main.dart were. Despite this, Flutter console said Launching lib/main_alternate.dart.

Flutter Doctor

Paste the output of running flutter doctor -v here.

$ flutter doctor -v
[✓] Flutter (Channel master, v0.3.3-pre.8, on Mac OS X 10.13.3 17D102, locale en-US)
• Flutter version 0.3.3-pre.8 at /Users/filiph/dev/flutter
• Framework revision 36cf1158ec (2 hours ago), 2018-04-20 17:39:32 -0700
• Engine revision 232060828a
• Dart version 2.0.0-dev.48.0.flutter-fe606f890b

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.2)
• Android SDK at /Users/filiph/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.2, Build version 9C40b
• ios-deploy 1.9.2
• CocoaPods version 1.4.0

[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 23.2.2
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Community Edition (version 2017.3.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 20.0.3
• Dart plugin version 173.4127.31

[✓] VS Code (version 1.22.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Dart Code extension version 2.9.2

[✓] Connected devices (1 available)
• iPhone X • 9072CF25-2137-4EB4-984F-EB3DC9A3F418 • ios • iOS 11.2 (simulator)

• No issues found!

Issue 2:
Well, I think that's not my last issue here, but I have one more 😅

The problem is that I can not normally use Firebase Auth. When I touch the button in my ui with event to choose Google account, I get error.

Before All, I have two different methods to sign in with Google. One I got from here firebase_auth at dart site and another from example## My Code:

import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:google_sign_in/google_sign_in.dart';
import 'dart:async';

final FirebaseAuth _auth = FirebaseAuth.instance;
final GoogleSignIn _googleSignIn = new GoogleSignIn();

Future<FirebaseUser> _handleSignIn() async {
GoogleSignInAccount googleUser = await _googleSignIn.signIn();
GoogleSignInAuthentication googleAuth = await googleUser.authentication;
FirebaseUser user = await _auth.signInWithGoogle(
accessToken: googleAuth.accessToken,
idToken: googleAuth.idToken,
);
print("signed in " + user.displayName);
return user;
}

Future<String> _signInWithGoogle() async {
final GoogleSignInAccount googleUser = await _googleSignIn.signIn();
final GoogleSignInAuthentication googleAuth =
await googleUser.authentication;
final FirebaseUser user = await _auth.signInWithGoogle(
accessToken: googleAuth.accessToken,
idToken: googleAuth.idToken,
);
assert(user.email != null);
assert(user.displayName != null);
assert(!user.isAnonymous);
assert(await user.getIdToken() != null);

final FirebaseUser currentUser = await _auth.currentUser();
assert(user.uid == currentUser.uid);

return 'signInWithGoogle succeeded: $user';
}

class _LoginPageState extends State<LoginPage> {
Future<String> _message = new Future<String>.value('');
@override
Widget build(BuildContext context) {
return new Scaffold(
body: RaisedButton(
child: Text('NEXT'),
textColor: Colors.white,
onPressed: () {
setState(() {
_message = _signInWithGoogle();
});
if (_auth.currentUser() != null) { Navigator.pop(context); }
}
)
);
}
}

class LoginPage extends StatefulWidget {
@override
_LoginPageState createState() => new _LoginPageState();
}

Log

[{"event":"app.progress","params":{"appId":"something tells me that i shouldn't paste it here","id":"6","progressId":"hot.restart","message":"Performing hot restart..."}}]Performing hot restart...

E/flutter (28769): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (28769): PlatformException(sign_in_failed, Status{statusCode=DEVELOPER_ERROR, resolution=null}, null)
E/flutter (28769): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:547:7)
E/flutter (28769): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:279:18)
E/flutter (28769): <asynchronous suspension>
E/flutter (28769): #2 GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:185:58)
E/flutter (28769): <asynchronous suspension>
E/flutter (28769): #3 GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:224:20)
E/flutter (28769): #4 GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:295:48)
E/flutter (28769): #5 _handleSignIn (file:///C:/Users/Arsen/AndroidStudioProjects/travel_met/lib/login.dart:15:56)
E/flutter (28769): <asynchronous suspension>
E/flutter (28769): #6 _LoginPageState.build.<anonymous closure> (file:///C:/Users/Arsen/AndroidStudioProjects/travel_met/lib/login.dart:97:21)
E/flutter (28769): #7 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:494:14)
E/flutter (28769): #8 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:549:30)
E/flutter (28769): #9 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:102:24)
E/flutter (28769): #10 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:161:9)
E/flutter (28769): #11 TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:123:7)
E/flutter (28769): #12 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
E/flutter (28769): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:147:20)
E/flutter (28769): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:121:22)
E/flutter (28769): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:101:7)
E/flutter (28769): #16 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:64:7)
E/flutter (28769): #17 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:48:7)
E/flutter (28769): #18 _invoke1 (dart:ui/hooks.dart:134:13)
E/flutter (28769): #19 _dispatchPointerDataPacket (dart:ui/hooks.dart:91:5)
Restarted app in 4 492ms.
D/ViewRootImpl@7dec195[MainActivity](28769): ViewPostIme pointer 0
D/ViewRootImpl@7dec195[MainActivity](28769): ViewPostIme pointer 1
D/ViewRootImpl@7dec195[MainActivity](28769): MSG_WINDOW_FOCUS_CHANGED 0
D/ViewRootImpl@48809d0[SignInHubActivity](28769): setView = DecorView@7c9bdc9[SignInHubActivity] TM=true MM=false
D/ViewRootImpl@48809d0[SignInHubActivity](28769): dispatchAttachedToWindow
V/Surface (28769): sf_framedrop debug : 0x4f4c, game : false, logging : 0
D/ViewRootImpl@48809d0[SignInHubActivity](28769): Relayout returned: old=[0,0][0,0] new=[0,0][1080,1920] result=0x7 surface={valid=true 484893175808} changed=true
D/mali_winsys(28769): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000, [1080x1920]-format:1
D/OpenGLRenderer(28769): eglCreateWindowSurface = 0x70e8d08440
D/ViewRootImpl@48809d0[SignInHubActivity](28769): MSG_RESIZED_REPORT: frame=Rect(0, 0 - 1080, 1920) ci=Rect(0, 72 - 0, 0) vi=Rect(0, 72 - 0, 0) or=1
D/ViewRootImpl@48809d0[SignInHubActivity](28769): MSG_WINDOW_FOCUS_CHANGED 1
V/InputMethodManager(28769): Starting input: tba=android.view.inputmethod.EditorInfo@bc342e8 nm : com.arsnyan.some ic=null
I/InputMethodManager(28769): startInputInner - mService.startInputOrWindowGainedFocus
D/ViewRootImpl@48809d0[SignInHubActivity](28769): MSG_WINDOW_FOCUS_CHANGED 0
D/ViewRootImpl@7dec195[MainActivity](28769): MSG_WINDOW_FOCUS_CHANGED 1
V/InputMethodManager(28769): Starting input: tba=android.view.inputmethod.EditorInfo@7f65d01 nm : com.arsnyan.some ic=null
I/InputMethodManager(28769): startInputInner - mService.startInputOrWindowGainedFocus
I/FlutterActivityDelegate(28769): onResume setting current activity to this
D/OpenGLRenderer(28769): eglDestroySurface = 0x70e8d08440
D/ViewRootImpl@48809d0[SignInHubActivity](28769): Relayout returned: old=[0,0][1080,1920] new=[0,0][1080,1920] result=0x5 surface={valid=false 0} changed=true
D/ViewRootImpl@48809d0[SignInHubActivity](28769): dispatchDetachedFromWindow
D/InputEventReceiver(28769): channel '5d77edb com.arsnyan.some/com.google.android.gms.auth.api.signin.internal.SignInHubActivity (client)' ~ Disposing input event receiver.
D/InputEventReceiver(28769): channel '5d77edb com.arsnyan.some/com.google.android.gms.auth.api.signin.internal.SignInHubActivity (client)' ~NativeInputEventReceiver.

Debugger says:

Picture 1

Picture 2

##Even when I changed something and used another method, I got the same log:

RaisedButton(
child: Text('NEXT'),
textColor: Colors.white,
onPressed: () {
_handleSignIn()
.then((FirebaseUser user) {
if (user.displayName != null) { Navigator.pop(context); }
})
.catchError((e) => print(e));
},
),

Thanks in advance.