title: Flutter: how to remove the white background behind the keyboard when keyboard got activated
body: <p>I have a flutter app and I do experience a strange behaviour when the keyboard get activated in my iPhone. As you can see from the picture below there is a white background which appears under the keyboard while it is popping up...
  Does anyone know how to set that background color???</p>
  
  <p><a href="https://i.stack.imgur.com/lKnAp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lKnAp.jpg" alt="enter image description here"></a></p>
  
  <p><strong>EDIT</strong>:
  Thanks for the suggestion to use <code>resizeToAvoidBottomPadding</code>. That command is deprecated and I have replaced with <code>resizeToAvoidBottomInset: false</code>. This has resolved the issue (yup!) and there is no more white background under the keyboard BUT it has created another strange effect. There is now a dark-blue bar above the keyboard. Check the next image... I have set an orange background color so you can see it better. You can also see that the floating button is shifted up which means the dark-blu bar is now between the keyboard and the scaffold. Do you know how I can get rid of that bar? this seems to be worst Thant the white background since it is taking precious screen space..</p>
  
  <p>For reference the scaffold is nested in a CupertinoTabScaffold
  <a href="https://i.stack.imgur.com/pF3JI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pF3JI.jpg" alt="enter image description here"></a>  </p>
  
  <p>Here is the most relevant part of my code</p>
  
  <pre><code>void main() async {
    Crashlytics.instance.enableInDevMode = true;
  
    FlutterError.onError = Crashlytics.instance.recordFlutterError;
  
    runApp(ChangeNotifierProvider&lt;Data&gt;(
      builder: (context) =&gt; Data(),
      child: new CupertinoApp(
  
        theme: CupertinoThemeData(
          barBackgroundColor: kColorPrimary,
  
          primaryColor:
              kColorText,
          textTheme: CupertinoTextThemeData(
            primaryColor:
                kColorText,
            navLargeTitleTextStyle: TextStyle(
                fontWeight: FontWeight.bold, fontSize: 70.0, color: kColorText),
          ),
        ),
  
        home: new CheckIfFirstTime(),
      ),
    ));
  }
  
  class CheckIfFirstTime extends StatefulWidget {
    @override
    _CheckIfFirstTimeState createState() =&gt; _CheckIfFirstTimeState();
  }
  
  class _CheckIfFirstTimeState extends State&lt;CheckIfFirstTime&gt; {
    Future checkFirstSeen() async {
      SharedPreferences prefs = await SharedPreferences.getInstance();
      bool _seen = (prefs.getBool('seen') ?? false);
  
      if (_seen) {
        Navigator.of(context).pushReplacement(
            new MaterialPageRoute(builder: (context) =&gt; new HomeScreen()));
      } 
    }
  
    @override
    void initState() {
      super.initState();
      checkFirstSeen();
    }
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        backgroundColor: kColorPrimary,
        body: Text(
          'loading...',
          style: kSendButtonTextStyle,
        ),
      );
    }
  }
  
  
  
  class HomeScreen extends StatefulWidget {
    static const String id = 'home';
  
    @override
    _HomeScreenState createState() =&gt; _HomeScreenState();
  }
  
  class _HomeScreenState extends State&lt;HomeScreen&gt; {
    int currentIndex = 0;
  
    void confirmPlatform() {
      if (Platform.isIOS)
        appData.isIOS = true;
      else
        appData.isIOS = false;
    }
  
    @override
    void initState() {
      // TODO: implement initState
      super.initState();
      confirmPlatform();
  
    }
  
  
    @override
    Widget build(BuildContext context) {
      return CupertinoTabScaffold(
        resizeToAvoidBottomInset: false,
        tabBar: CupertinoTabBar(
          backgroundColor: kColorPrimaryLight,
          items: [
            BottomNavigationBarItem(
              icon: Icon(Icons.search),
              title: Text('Discover', style: TextStyle(fontFamily: kFontFamily)),
            ),
  
            BottomNavigationBarItem(
              icon: Badge(
                  showBadge: Provider.of&lt;Data&gt;(context).filterCounter == 0
                      ? false
                      : true,
                  badgeContent: Text(
                    Provider.of&lt;Data&gt;(context).filterCounter.toString(),
                    style: TextStyle(color: kColorText),
                  ),
                  child: Icon(Icons.filter_list)),
              title: Text('Filters', style: TextStyle(fontFamily: kFontFamily)),
            ),
  
            BottomNavigationBarItem(
              icon: Icon(Icons.account_circle),
              title: Text('Me', style: TextStyle(fontFamily: kFontFamily)),
            ),
            BottomNavigationBarItem(
              icon: Icon(Icons.assignment),
              title: Text('Stories', style: TextStyle(fontFamily: kFontFamily)),
            ),
  //with badge
            BottomNavigationBarItem(
              icon: Badge(
                  showBadge: Provider.of&lt;Data&gt;(context).basketCounter == '0'
                      ? false
                      : true,
                  badgeContent: Text(
                    Provider.of&lt;Data&gt;(context).basketCounter,
                    style: TextStyle(color: kColorText),
                  ),
                  child: Icon(Icons.shopping_cart)),
              title: Text('Basket', style: TextStyle(fontFamily: kFontFamily)),
            ), 
          ],
                ),
        tabBuilder: (context, index) {
          if (index == 0) {
            return CupertinoTabView(
              navigatorKey: firstTabNavKey,
              builder: (BuildContext context) =&gt; DiscoverScreenFinal(),
            );
  
          } else if (index == 1) {
            return CupertinoTabView(
              navigatorKey: secondTabNavKey,
              builder: (BuildContext context) =&gt; FilterScreen(),
            );
          } else if (index == 2) {
            return CupertinoTabView(
              navigatorKey: thirdTabNavKey,
              builder: (BuildContext context) =&gt; WelcomeScreen(),
            );
          } else if (index == 3) {
            return CupertinoTabView(
              navigatorKey: forthTabNavKey,
              builder: (BuildContext context) =&gt; Stories(),
            );
          }
          {
            return CupertinoTabView(
              navigatorKey: fifthTabNavKey,
              builder: (BuildContext context) =&gt; Basket(),
            );
          }
        },
      );
    }
  }
  
  
  class DiscoverScreenFinal extends StatefulWidget {
    @override
    _DiscoverScreenFinalState createState() =&gt; _DiscoverScreenFinalState();
  }
  
  class _DiscoverScreenFinalState extends State&lt;DiscoverScreenFinal&gt; {
  
    @override
    Widget build(BuildContext context) {
      return TopBarAgnostic(
        text: 'Discover',
        style: kSendButtonTextStyle,
        firstIcon: Icon(Icons.blur_on),
        firstIconDestination: CameraApp(),
        scannerOn: true,
        secondtIcon: Icon(Icons.location_on),
        secondIconDestination: MapPage(),
        uniqueHeroTag: 'discover001a',
        child: Scaffold(
          resizeToAvoidBottomInset: false,
          backgroundColor: kColorPrimary,
          floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
          floatingActionButton: FloatingActionButton.extended(
            backgroundColor: kColorAccent,
            onPressed: () {
              //…
            },
            label: Text(
              'To Favorites',
              style: kDescriptionTextStyle.copyWith(
                  fontSize: kFontSizeSmall, fontWeight: FontWeight.bold),
            ),
            icon: Icon(Icons.favorite),
          ),
          body: Container()
        ),
      );
    }
  }
  </code></pre>