Skip to content

bottom overflow issue, when using textfields inside tabbarview #20295

@ghost

Description

Steps to Reproduce

For my App i using the TabbarView(). On the Profile Page i get bottom overflow issue, when the keyboard open...

textfield_issue_tabbarview

Tabbar Controller Page

@override
  Widget build(BuildContext context) {
    return new Scaffold(
      body: new TabBarView(
        controller: _tabController,
        children: <Widget>[
          new Home(),
          new CreateEvent(),
          new Profile(
            auth: widget.auth,
              onSignedOut: widget.onSignedOut,
          ),
        ],
      ),
      bottomNavigationBar: Container(
          decoration: BoxDecoration(
            color: Colors.white,
            boxShadow: <BoxShadow>[
              new BoxShadow(
                color: const Color.fromARGB(255, 173, 183, 189),
                offset: new Offset(0.0, 0.0),
                blurRadius: 5.0,
              ),
            ],
          ),
          child: TabBar(
            controller: _tabController,
            indicatorColor: Colors.white,
            unselectedLabelColor: Colors.grey,
            labelColor: Theme.of(context).primaryColor,
            tabs: <Widget>[
              Tab(
                icon: Icon(Icons.home),
              ),
              Tab(
                icon: Icon(
                  Icons.add_box,
                ),
              ),
              Tab(
                icon: Icon(Icons.account_box),
              )
            ],
          ),
        ),
    );
  }
}

Profile Page

@override
  Widget build(BuildContext context) {
    print(auth.getCurrentUserEmail());
    return Scaffold(
      appBar: AppBar(
        title: Text('Profile'),
      ),
      body: Container(
        color: Color.fromARGB(255, 220, 220, 220),
        child: Form(
          child: Column(
            children: <Widget>[
              Container(
                margin: EdgeInsets.only(top: 20.0),
                decoration: BoxDecoration(
                  color: Colors.white,    
                ),
                child: buildEmailTextField(),
              ),
              Container(
                margin: EdgeInsets.only(top: 20.0),
                decoration: BoxDecoration(
                  color: Colors.white,    
                ),
                child: buildUsernameTextField(),
              ),
              Container(
                margin: EdgeInsets.only(top: 20.0,),
                child: RaisedButton(
                  textColor: Colors.white,
                  color: Color.fromARGB(255, 120, 27, 35),
                  child: Text('LOGOUT'),
                  onPressed: _signOut,
                ),
              )
            ],
          ),
        ),
      ),
    );
  }
}

Logs

flutter run --verbose

[  +35 ms] [/Volumes/DEV/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +43 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/dev
[        ] [/Volumes/DEV/flutter/] git rev-parse --abbrev-ref HEAD
[  +13 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] dev
[        ] [/Volumes/DEV/flutter/] git ls-remote --get-url origin
[  +12 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[        ] [/Volumes/DEV/flutter/] git log -n 1 --pretty=format:%H
[  +27 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[        ] 66091f969653fd3535b265ddcd87436901858a1d
[   +1 ms] [/Volumes/DEV/flutter/] git log -n 1 --pretty=format:%ar
[  +13 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[        ] 4 weeks ago
[   +1 ms] [/Volumes/DEV/flutter/] git describe --match v*.*.* --first-parent --long --tags
[  +24 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v0.5.7-0-g66091f969
[ +159 ms] /usr/bin/defaults read /Applications/Android Studio.app/Contents/Info CFBundleShortVersionString
[  +56 ms] Exit code 0 from: /usr/bin/defaults read /Applications/Android Studio.app/Contents/Info CFBundleShortVersionString
[        ] 3.1
[ +236 ms] /Volumes/DEV/Android/sdk/platform-tools/adb devices -l
[   +9 ms] Exit code 0 from: /Volumes/DEV/Android/sdk/platform-tools/adb devices -l
[        ] List of devices attached
           emulator-5554          device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:2
[  +10 ms] idevice_id -h
[  +75 ms] which ideviceinstaller
[   +5 ms] Exit code 0 from: which ideviceinstaller
[        ] /usr/local/bin/ideviceinstaller
[        ] which iproxy
[   +5 ms] Exit code 0 from: which iproxy
[        ] /usr/local/bin/iproxy
[  +30 ms] which ideviceinstaller
[   +6 ms] Exit code 0 from: which ideviceinstaller
[        ] /usr/local/bin/ideviceinstaller
[        ] which iproxy
[   +4 ms] Exit code 0 from: which iproxy
[        ] /usr/local/bin/iproxy
[+1808 ms] /usr/bin/xcrun simctl list --json devices
[ +135 ms] More than one device connected; please specify a device with the '-d <deviceId>' flag, or use '-d all' to act on all devices.
[   +4 ms] /Volumes/DEV/Android/sdk/platform-tools/adb -s emulator-5554 shell getprop
[ +109 ms] ro.hardware = ranchu
[   +4 ms] Android SDK built for x86 • emulator-5554                            • android-x86 • Android 8.0.0 (API 26) (emulator)
[        ] Niklas iPhone             • b47a5be21426ba0ed7c4976ce2bfaedbf44acf4a • ios         • iOS 11.4
[        ] iPhone 6                  • C3477E4C-BEA7-4532-BEBC-28120BC4F22D     • ios         • iOS 11.4 (simulator)
[  +11 ms] "flutter run" took 2.608ms.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:26)
#1      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:255)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:326)
<asynchronous suspension>
#3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:282)
<asynchronous suspension>
#4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#5      _rootRun (dart:async/zone.dart:1126)
#6      _CustomZone.run (dart:async/zone.dart:1023)
#7      _runZoned (dart:async/zone.dart:1518)
#8      runZoned (dart:async/zone.dart:1465)
#9      AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#10     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:273)
#11     CommandRunner.runCommand (package:args/command_runner.dart:194)
<asynchronous suspension>
#12     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:322)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#14     _rootRun (dart:async/zone.dart:1126)
#15     _CustomZone.run (dart:async/zone.dart:1023)
#16     _runZoned (dart:async/zone.dart:1518)
#17     runZoned (dart:async/zone.dart:1465)
#18     AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#19     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:278)
<asynchronous suspension>
#20     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:109)
#21     new Future.sync (dart:async/future.dart:222)
#22     CommandRunner.run (package:args/command_runner.dart:109)
#23     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:187)
#24     run.<anonymous closure> (package:flutter_tools/runner.dart:59)
<asynchronous suspension>
#25     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
<asynchronous suspension>
#26     _rootRun (dart:async/zone.dart:1126)
#27     _CustomZone.run (dart:async/zone.dart:1023)
#28     _runZoned (dart:async/zone.dart:1518)
#29     runZoned (dart:async/zone.dart:1465)
#30     AppContext.run (package:flutter_tools/src/base/context.dart:141)
<asynchronous suspension>
#31     runInContext (package:flutter_tools/src/context_runner.dart:42)
<asynchronous suspension>
#32     run (package:flutter_tools/runner.dart:50)
#33     main (package:flutter_tools/executable.dart:50)
<asynchronous suspension>
#34     main (file:///Volumes/DEV/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
#35     _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#36     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)

flutter analyze

Analyzing events...                                              

warning • This function declares a return type of 'Widget', but doesn't end with a return statement • lib/root_page.dart:51:3

1 issue found. (ran in 3.5s)

flutter doctor -v

[✓] Flutter (Channel dev, v0.5.7, on Mac OS X 10.13.2 17C88, locale de-DE)
    • Flutter version 0.5.7 at /Volumes/DEV/flutter
    • Framework revision 66091f9696 (4 weeks ago), 2018-07-09 12:52:41 -0700
    • Engine revision 6fe748490d
    • Dart version 2.0.0-dev.63.0.flutter-4c9689c1d2

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
    • Android SDK at /Volumes/DEV/Android/sdk/
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.1
    • ANDROID_HOME = /Volumes/DEV/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.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.1)
    • Android Studio at /Applications/Android Studio.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_152-release-1024-b01)

[✓] VS Code (version 1.25.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.16.0

[✓] Connected devices (3 available)
    • Android SDK built for x86 • emulator-5554                            • android-x86 • Android 8.0.0 (API 26) (emulator)
    • Niklas iPhone             • b47a5be21426ba0ed7c4976ce2bfaedbf44acf4a • ios         • iOS 11.4
    • iPhone 6                  • C3477E4C-BEA7-4532-BEBC-28120BC4F22D     • ios         • iOS 11.4 (simulator)

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions