<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/9283414/43892355-5c48103c-9bd4-11e8-95e5-76717a690708.gif"><img src="https://user-images.githubusercontent.com/9283414/43892355-5c48103c-9bd4-11e8-95e5-76717a690708.gif" alt="text_field_error" data-animated-image="" style="max-width: 100%;"></a><br>
I'm using a Stack to cover the main page and require the user to enter a password. But the keyboard doesn't open.</p>
<p dir="auto">Here is a mcv example: <a href="https://gist.github.com/long1eu/0cac0f67eeb3115941cb0366929cc946">https://gist.github.com/long1eu/0cac0f67eeb3115941cb0366929cc946</a></p>
<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">I'm building a bottom navigation where every tab has its own navigation. I need to include a MaterialApp for each tab. I wrap each one inside an Offstage and all the offstages inside a Stack.</p>
<p dir="auto">Everything is working except the Textfield, they never show the keyboard. They receive the tap but they won't show any keyboard (the physical keyboard of my mac won't work either).<br>
The last child off the stack seems to be the problem.</p>
<p dir="auto">This is what happens when i tap on the Textfields:<br>
<a href="url">http://www.giphy.com/gifs/69oi3ZjKDYidS2vQmz</a></p>
<p dir="auto">I simplified the code to reproduce the problem:</p>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="void main() =&gt; runApp(new MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    Stack stack = new Stack(
      children: &lt;Widget&gt;[
        _getStackPage(false),
        _getStackPage(true), // set offstageFlag to false to show keyboard
      ],
    );

    MaterialApp mainMaterialApp= new MaterialApp(
      home: new Scaffold(
        body: stack,
      ),
    );

    return mainMaterialApp;
  }

  Widget _getStackPage(bool offstageFlag) {
    Offstage offstage = new Offstage(
      offstage: offstageFlag,
      child: new MaterialApp(
        home: new Scaffold(
          body: new Center(
            child: new TextField(),
          ),
        ),
      ),
    );

    return offstage;
  }
}"><pre class="notranslate"><span class="pl-k">void</span> <span class="pl-en">main</span>() <span class="pl-k">=&gt;</span> <span class="pl-en">runApp</span>(<span class="pl-k">new</span> <span class="pl-c1">MyApp</span>());

<span class="pl-k">class</span> <span class="pl-c1">MyApp</span> <span class="pl-k">extends</span> <span class="pl-c1">StatelessWidget</span> {
  <span class="pl-c">// This widget is the root of your application.</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-c1">Stack</span> stack <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">Stack</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-en">_getStackPage</span>(<span class="pl-c1">false</span>),
        <span class="pl-en">_getStackPage</span>(<span class="pl-c1">true</span>), <span class="pl-c">// set offstageFlag to false to show keyboard</span>
      ],
    );

    <span class="pl-c1">MaterialApp</span> mainMaterialApp<span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">MaterialApp</span>(
      home<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Scaffold</span>(
        body<span class="pl-k">:</span> stack,
      ),
    );

    <span class="pl-k">return</span> mainMaterialApp;
  }

  <span class="pl-c1">Widget</span> <span class="pl-en">_getStackPage</span>(<span class="pl-c1">bool</span> offstageFlag) {
    <span class="pl-c1">Offstage</span> offstage <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">Offstage</span>(
      offstage<span class="pl-k">:</span> offstageFlag,
      child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">MaterialApp</span>(
        home<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Scaffold</span>(
          body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Center</span>(
            child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TextField</span>(),
          ),
        ),
      ),
    );

    <span class="pl-k">return</span> offstage;
  }
}</pre></div>
<h2 dir="auto">Logs</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Launching lib/main.dart on iPhone 6 in debug mode...
Running Xcode clean...                                       0.9s
Starting Xcode build...                                          
 ├─Assembling Flutter resources...                    3.4s
 └─Compiling, linking and signing...                  2.0s
Xcode build done                                             6.5s
    CADisplay.name = LCD;
    CADisplay.deviceName = PurpleMain;
    CADisplay.seed = 1;
    tags = 0;
    currentMode = &lt;FBSDisplayMode: 0x604000099960; 375x667@2x (750x1334/2) 60Hz sRGB SDR&gt;;
    safeOverscanRatio = {0.89999997615814209, 0.89999997615814209};
    nativeCenter = {375, 667};
    pixelSize = {750, 1334};
    bounds = {{0, 0}, {375, 667}};
    CADisplay = &lt;CADisplay:LCD PurpleMain&gt;;
}
Syncing files to device iPhone 6...                          1.9s

🔥  To hot reload your app on the fly, press &quot;r&quot;. To restart the app entirely, press &quot;R&quot;.
An Observatory debugger and profiler on iPhone 6 is available at: http://127.0.0.1:8100/
For a more detailed help message, press &quot;h&quot;. To quit, press &quot;q&quot;."><pre class="notranslate"><code class="notranslate">Launching lib/main.dart on iPhone 6 in debug mode...
Running Xcode clean...                                       0.9s
Starting Xcode build...                                          
 ├─Assembling Flutter resources...                    3.4s
 └─Compiling, linking and signing...                  2.0s
Xcode build done                                             6.5s
    CADisplay.name = LCD;
    CADisplay.deviceName = PurpleMain;
    CADisplay.seed = 1;
    tags = 0;
    currentMode = &lt;FBSDisplayMode: 0x604000099960; 375x667@2x (750x1334/2) 60Hz sRGB SDR&gt;;
    safeOverscanRatio = {0.89999997615814209, 0.89999997615814209};
    nativeCenter = {375, 667};
    pixelSize = {750, 1334};
    bounds = {{0, 0}, {375, 667}};
    CADisplay = &lt;CADisplay:LCD PurpleMain&gt;;
}
Syncing files to device iPhone 6...                          1.9s

🔥  To hot reload your app on the fly, press "r". To restart the app entirely, press "R".
An Observatory debugger and profiler on iPhone 6 is available at: http://127.0.0.1:8100/
For a more detailed help message, press "h". To quit, press "q".
</code></pre></div>
<h2 dir="auto">Flutter Doctor</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel beta, v0.2.8, on Mac OS X 10.13.4 17E199, locale en-IT)
    • Flutter version 0.2.8 at /Users/enrico/Projects/Frameworks/flutter
    • Framework revision b397406561 (4 weeks ago), 2018-04-02 13:53:20 -0700
    • Engine revision c903c217a1
    • Dart version 2.0.0-dev.43.0.flutter-52afcba357

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/enrico/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = /Users/enrico/Library/Android/sdk
    • 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.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.3, Build version 9E145
    • ios-deploy 1.9.2
    • CocoaPods version 1.4.0

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

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

[✓] Connected devices (1 available)
    • iPhone 6 • 1CB3B003-E6C2-41AA-BFB9-C6D3BBC565BA • ios • iOS 11.3 (simulator)

• No issues found!"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel beta, v0.2.8, on Mac OS X 10.13.4 17E199, locale en-IT)
    • Flutter version 0.2.8 at /Users/enrico/Projects/Frameworks/flutter
    • Framework revision b397406561 (4 weeks ago), 2018-04-02 13:53:20 -0700
    • Engine revision c903c217a1
    • Dart version 2.0.0-dev.43.0.flutter-52afcba357

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/enrico/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = /Users/enrico/Library/Android/sdk
    • 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.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.3, Build version 9E145
    • ios-deploy 1.9.2
    • CocoaPods version 1.4.0

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

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

[✓] Connected devices (1 available)
    • iPhone 6 • 1CB3B003-E6C2-41AA-BFB9-C6D3BBC565BA • ios • iOS 11.3 (simulator)

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