<p dir="auto">I'm trying to implement signup/login form.<br>
In the signup page, if user succeeded signing up, Navigator.push method called and login page is pushed.<br>
But it disables focus on TextFormField of login page. What is problem?<br>
Below code is authentication code, just ignore korean words.</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';

import 'dart:async';

import 'package:flutter_try/login_page.dart';

final FirebaseAuth _auth = FirebaseAuth.instance;
Future&lt;FirebaseUser&gt; _user;
String email, password;

void login(BuildContext context) {
	_auth.signInWithEmailAndPassword(
		email: email,
		password: email
	).then((_){
		showDialog(
			context: context,
			builder: (_) =&gt; AlertDialog(
				title: Text(&quot;로그인에 성공했습니다!&quot;),
				content: Text(&quot;환영합니다!&quot;),
			)
		);
	}).catchError((e){
		showDialog(
			context: context,
			builder: (_) =&gt; AlertDialog(
				title: Text(&quot;로그인에 실패했습니다ㅠㅠ&quot;),
				content: Text(&quot;이메일이 존재하지 않거나 비밀번호가 틀립니다!&quot;),
			)
		);
	});
}

void makeUser(BuildContext context) {
	_user = _auth.createUserWithEmailAndPassword(
		email: email,
		password: password
	).then((_) async{
		showDialog(
			context: context,
			builder: (_) =&gt; AlertDialog(
				title: Text(&quot;회원가입에 성공하셨습니다!&quot;),
				content: Text(&quot;로그인 페이지로 이동합니다...&quot;),
			)
		);
		// 회원가입 성공한 뒤 딜레이
		await Future.delayed(Duration(milliseconds: 1000));
		Navigator.push(context, MaterialPageRoute(builder: (context) =&gt; LoginPage()));
	}).catchError((e) {
		showDialog(
			context: context,
			builder: (_) =&gt; AlertDialog(
				title: Text(&quot;회원가입에 실패했습니다.!&quot;),
				content: Text(&quot;이메일이 중복이거나 비밀번호가 6자리 미만입니다!&quot;),
			)
		);
	});
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s">'package:firebase_auth/firebase_auth.dart'</span>;
<span class="pl-k">import</span> <span class="pl-s">'package:flutter/material.dart'</span>;

<span class="pl-k">import</span> <span class="pl-s">'dart:async'</span>;

<span class="pl-k">import</span> <span class="pl-s">'package:flutter_try/login_page.dart'</span>;

<span class="pl-k">final</span> <span class="pl-c1">FirebaseAuth</span> _auth <span class="pl-k">=</span> <span class="pl-c1">FirebaseAuth</span>.instance;
<span class="pl-c1">Future</span>&lt;<span class="pl-c1">FirebaseUser</span>&gt; _user;
<span class="pl-c1">String</span> email, password;

<span class="pl-k">void</span> <span class="pl-en">login</span>(<span class="pl-c1">BuildContext</span> context) {
	_auth.<span class="pl-en">signInWithEmailAndPassword</span>(
		email<span class="pl-k">:</span> email,
		password<span class="pl-k">:</span> email
	).<span class="pl-en">then</span>((_){
		<span class="pl-en">showDialog</span>(
			context<span class="pl-k">:</span> context,
			builder<span class="pl-k">:</span> (_) <span class="pl-k">=&gt;</span> <span class="pl-c1">AlertDialog</span>(
				title<span class="pl-k">:</span> <span class="pl-c1">Text</span>(<span class="pl-s">"로그인에 성공했습니다!"</span>),
				content<span class="pl-k">:</span> <span class="pl-c1">Text</span>(<span class="pl-s">"환영합니다!"</span>),
			)
		);
	}).<span class="pl-en">catchError</span>((e){
		<span class="pl-en">showDialog</span>(
			context<span class="pl-k">:</span> context,
			builder<span class="pl-k">:</span> (_) <span class="pl-k">=&gt;</span> <span class="pl-c1">AlertDialog</span>(
				title<span class="pl-k">:</span> <span class="pl-c1">Text</span>(<span class="pl-s">"로그인에 실패했습니다ㅠㅠ"</span>),
				content<span class="pl-k">:</span> <span class="pl-c1">Text</span>(<span class="pl-s">"이메일이 존재하지 않거나 비밀번호가 틀립니다!"</span>),
			)
		);
	});
}

<span class="pl-k">void</span> <span class="pl-en">makeUser</span>(<span class="pl-c1">BuildContext</span> context) {
	_user <span class="pl-k">=</span> _auth.<span class="pl-en">createUserWithEmailAndPassword</span>(
		email<span class="pl-k">:</span> email,
		password<span class="pl-k">:</span> password
	).<span class="pl-en">then</span>((_) <span class="pl-k">async</span>{
		<span class="pl-en">showDialog</span>(
			context<span class="pl-k">:</span> context,
			builder<span class="pl-k">:</span> (_) <span class="pl-k">=&gt;</span> <span class="pl-c1">AlertDialog</span>(
				title<span class="pl-k">:</span> <span class="pl-c1">Text</span>(<span class="pl-s">"회원가입에 성공하셨습니다!"</span>),
				content<span class="pl-k">:</span> <span class="pl-c1">Text</span>(<span class="pl-s">"로그인 페이지로 이동합니다..."</span>),
			)
		);
		<span class="pl-c">// 회원가입 성공한 뒤 딜레이</span>
		<span class="pl-k">await</span> <span class="pl-c1">Future</span>.<span class="pl-en">delayed</span>(<span class="pl-c1">Duration</span>(milliseconds<span class="pl-k">:</span> <span class="pl-c1">1000</span>));
		<span class="pl-c1">Navigator</span>.<span class="pl-en">push</span>(context, <span class="pl-c1">MaterialPageRoute</span>(builder<span class="pl-k">:</span> (context) <span class="pl-k">=&gt;</span> <span class="pl-c1">LoginPage</span>()));
	}).<span class="pl-en">catchError</span>((e) {
		<span class="pl-en">showDialog</span>(
			context<span class="pl-k">:</span> context,
			builder<span class="pl-k">:</span> (_) <span class="pl-k">=&gt;</span> <span class="pl-c1">AlertDialog</span>(
				title<span class="pl-k">:</span> <span class="pl-c1">Text</span>(<span class="pl-s">"회원가입에 실패했습니다.!"</span>),
				content<span class="pl-k">:</span> <span class="pl-c1">Text</span>(<span class="pl-s">"이메일이 중복이거나 비밀번호가 6자리 미만입니다!"</span>),
			)
		);
	});
}</pre></div>
<p dir="auto">And below is login page code</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import 'package:flutter/material.dart';
import 'package:flutter_try/resources.dart';
import 'package:flutter_try/signup_page.dart';
import 'package:flutter_try/firebase_authentication.dart';

class LoginPage extends StatelessWidget {

	// TextFormField 값을 받아오기 위한 key 설정
	GlobalKey&lt;FormState&gt; _formKey = GlobalKey&lt;FormState&gt;();

	// 이메일 폼
	final _email = TextFormField(
		initialValue: &quot;&quot;,
		keyboardType: TextInputType.emailAddress,
		decoration: InputDecoration(
			contentPadding: const EdgeInsets.symmetric(vertical: login_padding_vertical, horizontal: login_padding_vertical),
			labelText: &quot;이메일을 입력하세요.&quot;,
			border: OutlineInputBorder(borderRadius: BorderRadius.circular(20.0))
		),
		validator: (value) =&gt; value.isEmpty ? &quot;이메일을 입력하지 않았습니다!&quot; : null,
		onSaved: (value) {email = value;},
	);

	// 비밀번호 폼
	final _password = TextFormField(
		initialValue: &quot;&quot;,
		obscureText: true,
		decoration: InputDecoration(
			contentPadding: const EdgeInsets.symmetric(vertical: login_padding_vertical, horizontal: login_padding_vertical),
			labelText: &quot;비밀번호를 입력하세요.&quot;,
			border: OutlineInputBorder(borderRadius: BorderRadius.circular(20.0))
		),
		validator: (value) =&gt; value.isEmpty ? &quot;비밀번호를 입력하지 않았습니다!&quot; : null,
		onSaved: (value) {password = value;},
	);

	// 로그인 버튼
	Widget _login(BuildContext context) {
		return RaisedButton(
			color: loginButtonColor,
			textColor: loginTextColor,
			child: Text(&quot;로그인&quot;),
			onPressed: (){
				final FormState form = _formKey.currentState;
				if(form.validate()){
					form.save();
					form.reset();
					login(context);
				}
			}
		);
	}

	// 회원가입 버튼
	Widget _signUp(BuildContext context) {
		return RaisedButton(
			color: signUpButtonColor,
			textColor: signUpTextColor,
			child: Text(&quot;회원가입&quot;),
			onPressed: () {
				Navigator.push(context, MaterialPageRoute(builder: (context) =&gt; SignUp()));
			}
		);
	}


	@override
	Widget build(BuildContext context) {
		return Scaffold(
			backgroundColor: Colors.white,
			body: Center(
				child: ListView(
					padding: const EdgeInsets.symmetric(horizontal: 20.0),
					shrinkWrap: true,
					children: &lt;Widget&gt;[
						Form(
						  key: _formKey,
						  child: Column(
						    children: &lt;Widget&gt;[
						      _email,
						      SizedBox(height: 20.0),
						      _password,
						      SizedBox(height: 20.0),
						    ],
						  ),
						),
						Row(
							mainAxisAlignment: MainAxisAlignment.center,
							children: &lt;Widget&gt;[
								_login(context),
								SizedBox(width: 20.0),
								_signUp(context)
							],
						)
					],
				),
			),
		);
	}
}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s">'package:flutter/material.dart'</span>;
<span class="pl-k">import</span> <span class="pl-s">'package:flutter_try/resources.dart'</span>;
<span class="pl-k">import</span> <span class="pl-s">'package:flutter_try/signup_page.dart'</span>;
<span class="pl-k">import</span> <span class="pl-s">'package:flutter_try/firebase_authentication.dart'</span>;

<span class="pl-k">class</span> <span class="pl-c1">LoginPage</span> <span class="pl-k">extends</span> <span class="pl-c1">StatelessWidget</span> {

	<span class="pl-c">// TextFormField 값을 받아오기 위한 key 설정</span>
	<span class="pl-c1">GlobalKey</span>&lt;<span class="pl-c1">FormState</span>&gt; _formKey <span class="pl-k">=</span> <span class="pl-c1">GlobalKey</span>&lt;<span class="pl-c1">FormState</span>&gt;();

	<span class="pl-c">// 이메일 폼</span>
	<span class="pl-k">final</span> _email <span class="pl-k">=</span> <span class="pl-c1">TextFormField</span>(
		initialValue<span class="pl-k">:</span> <span class="pl-s">""</span>,
		keyboardType<span class="pl-k">:</span> <span class="pl-c1">TextInputType</span>.emailAddress,
		decoration<span class="pl-k">:</span> <span class="pl-c1">InputDecoration</span>(
			contentPadding<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">EdgeInsets</span>.<span class="pl-en">symmetric</span>(vertical<span class="pl-k">:</span> login_padding_vertical, horizontal<span class="pl-k">:</span> login_padding_vertical),
			labelText<span class="pl-k">:</span> <span class="pl-s">"이메일을 입력하세요."</span>,
			border<span class="pl-k">:</span> <span class="pl-c1">OutlineInputBorder</span>(borderRadius<span class="pl-k">:</span> <span class="pl-c1">BorderRadius</span>.<span class="pl-en">circular</span>(<span class="pl-c1">20.0</span>))
		),
		validator<span class="pl-k">:</span> (value) <span class="pl-k">=&gt;</span> value.isEmpty <span class="pl-k">?</span> <span class="pl-s">"이메일을 입력하지 않았습니다!"</span> <span class="pl-k">:</span> <span class="pl-c1">null</span>,
		onSaved<span class="pl-k">:</span> (value) {email <span class="pl-k">=</span> value;},
	);

	<span class="pl-c">// 비밀번호 폼</span>
	<span class="pl-k">final</span> _password <span class="pl-k">=</span> <span class="pl-c1">TextFormField</span>(
		initialValue<span class="pl-k">:</span> <span class="pl-s">""</span>,
		obscureText<span class="pl-k">:</span> <span class="pl-c1">true</span>,
		decoration<span class="pl-k">:</span> <span class="pl-c1">InputDecoration</span>(
			contentPadding<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">EdgeInsets</span>.<span class="pl-en">symmetric</span>(vertical<span class="pl-k">:</span> login_padding_vertical, horizontal<span class="pl-k">:</span> login_padding_vertical),
			labelText<span class="pl-k">:</span> <span class="pl-s">"비밀번호를 입력하세요."</span>,
			border<span class="pl-k">:</span> <span class="pl-c1">OutlineInputBorder</span>(borderRadius<span class="pl-k">:</span> <span class="pl-c1">BorderRadius</span>.<span class="pl-en">circular</span>(<span class="pl-c1">20.0</span>))
		),
		validator<span class="pl-k">:</span> (value) <span class="pl-k">=&gt;</span> value.isEmpty <span class="pl-k">?</span> <span class="pl-s">"비밀번호를 입력하지 않았습니다!"</span> <span class="pl-k">:</span> <span class="pl-c1">null</span>,
		onSaved<span class="pl-k">:</span> (value) {password <span class="pl-k">=</span> value;},
	);

	<span class="pl-c">// 로그인 버튼</span>
	<span class="pl-c1">Widget</span> <span class="pl-en">_login</span>(<span class="pl-c1">BuildContext</span> context) {
		<span class="pl-k">return</span> <span class="pl-c1">RaisedButton</span>(
			color<span class="pl-k">:</span> loginButtonColor,
			textColor<span class="pl-k">:</span> loginTextColor,
			child<span class="pl-k">:</span> <span class="pl-c1">Text</span>(<span class="pl-s">"로그인"</span>),
			onPressed<span class="pl-k">:</span> (){
				<span class="pl-k">final</span> <span class="pl-c1">FormState</span> form <span class="pl-k">=</span> _formKey.currentState;
				<span class="pl-k">if</span>(form.<span class="pl-en">validate</span>()){
					form.<span class="pl-en">save</span>();
					form.<span class="pl-en">reset</span>();
					<span class="pl-en">login</span>(context);
				}
			}
		);
	}

	<span class="pl-c">// 회원가입 버튼</span>
	<span class="pl-c1">Widget</span> <span class="pl-en">_signUp</span>(<span class="pl-c1">BuildContext</span> context) {
		<span class="pl-k">return</span> <span class="pl-c1">RaisedButton</span>(
			color<span class="pl-k">:</span> signUpButtonColor,
			textColor<span class="pl-k">:</span> signUpTextColor,
			child<span class="pl-k">:</span> <span class="pl-c1">Text</span>(<span class="pl-s">"회원가입"</span>),
			onPressed<span class="pl-k">:</span> () {
				<span class="pl-c1">Navigator</span>.<span class="pl-en">push</span>(context, <span class="pl-c1">MaterialPageRoute</span>(builder<span class="pl-k">:</span> (context) <span class="pl-k">=&gt;</span> <span class="pl-c1">SignUp</span>()));
			}
		);
	}


	<span class="pl-k">@override</span>
	<span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) {
		<span class="pl-k">return</span> <span class="pl-c1">Scaffold</span>(
			backgroundColor<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.white,
			body<span class="pl-k">:</span> <span class="pl-c1">Center</span>(
				child<span class="pl-k">:</span> <span class="pl-c1">ListView</span>(
					padding<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">EdgeInsets</span>.<span class="pl-en">symmetric</span>(horizontal<span class="pl-k">:</span> <span class="pl-c1">20.0</span>),
					shrinkWrap<span class="pl-k">:</span> <span class="pl-c1">true</span>,
					children<span class="pl-k">:</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[
						<span class="pl-c1">Form</span>(
						  key<span class="pl-k">:</span> _formKey,
						  child<span class="pl-k">:</span> <span class="pl-c1">Column</span>(
						    children<span class="pl-k">:</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[
						      _email,
						      <span class="pl-c1">SizedBox</span>(height<span class="pl-k">:</span> <span class="pl-c1">20.0</span>),
						      _password,
						      <span class="pl-c1">SizedBox</span>(height<span class="pl-k">:</span> <span class="pl-c1">20.0</span>),
						    ],
						  ),
						),
						<span class="pl-c1">Row</span>(
							mainAxisAlignment<span class="pl-k">:</span> <span class="pl-c1">MainAxisAlignment</span>.center,
							children<span class="pl-k">:</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[
								<span class="pl-en">_login</span>(context),
								<span class="pl-c1">SizedBox</span>(width<span class="pl-k">:</span> <span class="pl-c1">20.0</span>),
								<span class="pl-en">_signUp</span>(context)
							],
						)
					],
				),
			),
		);
	}
}</pre></div>
<p dir="auto">And lastly, error gif is this.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/35518072/43187987-02eb25d0-902e-11e8-81f7-bf326b59faf3.gif"><img src="https://user-images.githubusercontent.com/35518072/43187987-02eb25d0-902e-11e8-81f7-bf326b59faf3.gif" width="400px" data-animated-image="" style="max-width: 100%;"></a></p>
<h2 dir="auto">Steps to Reproduce</h2>

<ol dir="auto">
<li>Navigate to search screen.</li>
<li>Enter search term and tap on a result.</li>
<li>Navigate away from search screen.</li>
<li>Return to search screen using the back button.</li>
<li>Search text field becomes unresponsive.</li>
</ol>
<p dir="auto">Reproduced here: <a href="https://gist.github.com/JordanADavies/c7b630681aa81940d254876078a2f7a0">https://gist.github.com/JordanADavies/c7b630681aa81940d254876078a2f7a0</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="flutter doctor -v
[✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.14.1 18B75, locale en-GB)
    • Flutter version 0.9.4 at /Users/jordandavies/Documents/development/flutter
    • Framework revision f37c235c32 (5 weeks ago), 2018-09-25 17:45:40 -0400
    • Engine revision 74625aed32
    • Dart version 2.1.0-dev.5.0.flutter-a2eb050044

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /Users/jordandavies/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • 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-1136-b06)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 2.0.0
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 29.1.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] Connected devices (1 available)
    • iPhone XR • 4018CC7F-D913-4181-8CF3-C29A87529EA2 • ios • iOS 12.1 (simulator)

• No issues found!"><pre class="notranslate"><code class="notranslate">flutter doctor -v
[✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.14.1 18B75, locale en-GB)
    • Flutter version 0.9.4 at /Users/jordandavies/Documents/development/flutter
    • Framework revision f37c235c32 (5 weeks ago), 2018-09-25 17:45:40 -0400
    • Engine revision 74625aed32
    • Dart version 2.1.0-dev.5.0.flutter-a2eb050044

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /Users/jordandavies/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • 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-1136-b06)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 2.0.0
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 29.1.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] Connected devices (1 available)
    • iPhone XR • 4018CC7F-D913-4181-8CF3-C29A87529EA2 • ios • iOS 12.1 (simulator)

• No issues found!
</code></pre></div>