<p dir="auto">Standard behavior (at least on iOS) is to move the cursor when tapping, holding down your finger and dragging it. This makes it possible to fine-tune the position of the cursor in the text field. When doing this in Flutter, instead the text field starts to select the text.</p>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel master, v0.5.9-pre.60, on Mac OS X 10.13.5 17F77, locale en-US)
    • Flutter version 0.5.9-pre.60 at /Users/vik/Projects/flutter
    • Framework revision 26ba937846 (3 hours ago), 2018-08-16 13:59:27 +0200
    • Engine revision e3687f70c7
    • Dart version 2.1.0-dev.0.0.flutter-be6309690f

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/vik/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.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-915-b08)
    ✗ Android license status unknown.

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

[✓] Android Studio (version 3.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    • Dart plugin version 171.4424
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] Android Studio (version 2.3)
    • Android Studio at /Applications/Android Studio - old.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Community Edition (version 2017.2.5)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 21.2.2
    • Dart plugin version 172.4343.25

[✓] Connected devices (1 available)
    • iPhone SE • 8D312AD9-51E0-4381-A2AF-FC2E997E5EBD • ios • iOS 11.4 (simulator)

! Doctor found issues in 1 category."><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel master, v0.5.9-pre.60, on Mac OS X 10.13.5 17F77, locale en-US)
    • Flutter version 0.5.9-pre.60 at /Users/vik/Projects/flutter
    • Framework revision 26ba937846 (3 hours ago), 2018-08-16 13:59:27 +0200
    • Engine revision e3687f70c7
    • Dart version 2.1.0-dev.0.0.flutter-be6309690f

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/vik/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.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-915-b08)
    ✗ Android license status unknown.

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

[✓] Android Studio (version 3.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    • Dart plugin version 171.4424
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] Android Studio (version 2.3)
    • Android Studio at /Applications/Android Studio - old.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Community Edition (version 2017.2.5)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 21.2.2
    • Dart plugin version 172.4343.25

[✓] Connected devices (1 available)
    • iPhone SE • 8D312AD9-51E0-4381-A2AF-FC2E997E5EBD • ios • iOS 11.4 (simulator)

! Doctor found issues in 1 category.
</code></pre></div>
<h2 dir="auto">Steps to Reproduce</h2>

<ol dir="auto">
<li>Clone <a href="https://gitlab.com/etiennedm/flutter-test-issue.git" rel="nofollow">https://gitlab.com/etiennedm/flutter-test-issue.git</a></li>
<li>Run app, tap button, it will show "Screen size is XxY"</li>
<li>Run test with <code class="notranslate">flutter run test/widget_test.dart</code>, it will output the same screen size. Moreover now the bottom squares are not showing.</li>
</ol>
<p dir="auto">So the issue is that when running a test with <code class="notranslate">flutter run</code> it seems like a <code class="notranslate">MediaQuery.of(context).size</code> is returning the actual size as seen by the test environment and not by the running widget. Is that the expected behavior?</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8871009/45423950-417ea000-b695-11e8-8d80-9d5fb3c9020b.png"><img src="https://user-images.githubusercontent.com/8871009/45423950-417ea000-b695-11e8-8d80-9d5fb3c9020b.png" alt="screenshot_1536753923" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/8871009/45423956-43486380-b695-11e8-8a8a-b9f68979cfc7.png"><img src="https://user-images.githubusercontent.com/8871009/45423956-43486380-b695-11e8-8a8a-b9f68979cfc7.png" alt="screenshot_1536754018" style="max-width: 100%;"></a></p>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel dev, v0.8.1, on Linux, locale en_US.UTF-8)
    • Flutter version 0.8.1 at /home/edemaricourt/dev/perso/flutter/flutter
    • Framework revision 0235ec59d1 (5 days ago), 2018-09-06 20:23:13 -0700
    • Engine revision 9b297b3b51
    • Dart version 2.1.0-dev.3.1.flutter-760a9690c2

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
    • Android SDK at /home/edemaricourt/Android/Sdk
    • Android NDK at /home/edemaricourt/Android/Sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.1
    • ANDROID_HOME = /home/edemaricourt/Android/Sdk
    • Java binary at: /home/edemaricourt/software/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.1)
    • Android Studio at /home/edemaricourt/software/android-studio
    • Flutter plugin version 26.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] VS Code (version 1.27.1)
    • VS Code at /usr/share/code
    • Flutter extension version 2.18.0

[✓] Connected devices (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)

• No issues found!"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel dev, v0.8.1, on Linux, locale en_US.UTF-8)
    • Flutter version 0.8.1 at /home/edemaricourt/dev/perso/flutter/flutter
    • Framework revision 0235ec59d1 (5 days ago), 2018-09-06 20:23:13 -0700
    • Engine revision 9b297b3b51
    • Dart version 2.1.0-dev.3.1.flutter-760a9690c2

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
    • Android SDK at /home/edemaricourt/Android/Sdk
    • Android NDK at /home/edemaricourt/Android/Sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.1
    • ANDROID_HOME = /home/edemaricourt/Android/Sdk
    • Java binary at: /home/edemaricourt/software/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] Android Studio (version 3.1)
    • Android Studio at /home/edemaricourt/software/android-studio
    • Flutter plugin version 26.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] VS Code (version 1.27.1)
    • VS Code at /usr/share/code
    • Flutter extension version 2.18.0

[✓] Connected devices (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)

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