how to yellow and black lines from flutter android emulator - flutter

In the android emulator it appears this yellow and black lines when tipping in the form, someone knows how to fix it?

You can add the resizeToAvoidBottomInset parameter to your scaffold to automatically move your contents up when you open your keyboard to prevent a bottom overflow.
Scaffold(
resizeToAvoidBottomInset: false,
child: ...
);
alternatively you can wrap your from in a SingleChildScrollView widget to make any overflow scrollable.
SingleChildScrollView(
child: Column(...),
);

Related

Bottom App Navigator on FocusScope.of(context).unfocus();

I'm using the persisten_bottom_nav_bar package to handle the bottom navigation in our app. The issue I'm having is that when I call FocusScope.of(context).unfocus(); to get rid of the keyboard, the navigation bar goes dark for a second. Has anyone figure out how to fix this issue?
So I implemented the package incorrectly, I fixed it by changing the parameters to the ones below. The main issue was hideNavigationBarWhenKeyboardShows which was basically rendering the bottomAppBar every-time the keyboard closed.
PersistentTabView(
resizeToAvoidBottomInset: false,
hideNavigationBarWhenKeyboardShows: false
Tip: Add resizeToAvoidBottomInset: false to any screens with textFields to prevent a small white spacing in between the keyboard and the scaffold
Scaffold(
resizeToAvoidBottomInset: false,

Flutter some default styling on new project

i'm starting on flutter, already sorry if it's a noob question
Basically started with a new project and there I am getting an already applied theme
How to remove this?
Thanks
Right now, you have a completely black screen because you don't have a Scaffold widget.
The Scaffold widget is screen that will be displayed on your display.
You can add your Text widget in the body property of your Scaffold
return const MaterialApp(
home: Scaffold(
body: Text("Hello")
)
);

Flutter: Transparent appbar is hiding content

I have a transparent app bar that hides some of my content, because the content starts behind the app bar:
My Scaffold looks like this:
return Scaffold(
extendBody: true,
extendBodyBehindAppBar: true,
appBar: getAppBar(),
body: generateMainBody(context),
);
If I would set extendBodyBehindAppBar to false it would work, however, the appbar would not be transparent anymore (when scrolling the area that is not part of that cool shape would be black and not transparent like in the screenshot).
I thought of adding some top padding to just move the cut content down a little bit but surely there has to be a better solution?
In your generateMainBody function, wrap your current return with padding and change the padding padding: const EdgeInsets.only(top: 8.0),. You can increase or decrease the '8.0' to best suit your app.
Since the only solution seems to be some kind of padding I settled with this:
SizedBox(height: MainAppBar.appBarHeight)
I simply added an empty SizedBox that has the height of the AppBar to the top of my content.

Flutter making box inside box

ss
How can I make a box inside box like in the picture? when I tried make grey box and giving with but It takes all with it can.
return ListView(
physics: const BouncingScrollPhysics(
parent: AlwaysScrollableScrollPhysics()),
Children:[
Container(Here is black box),
Container(Here is Grey box),
Container(Here is badges),
],
);
Use the Stack & Positioned widget that helps to put the widgets where ever you want inside the stack.
Hopefully this can help you.

Bottom owerflow when the keyboard pop up in flutter [duplicate]

This question already has answers here:
Overflow Error in Flutter when keyboard open
(7 answers)
Closed 3 years ago.
Layout is ok when there is no keyboard.
But, when keyboard pop up bottom owerflowed.
How do i fix it?
Your widget gets resized whenever your keyboard gets focused as your widget is not scrollable and has finite height. So, what you can do is wrap your hole widget inside a SingleChildScrollView.
For Ex:
SingleChildScrollView(child:_buildYourWidget());
If your widget consist column as its top most layer then you should provide column an additional property that is mainAxisSize to minimum. So that Column will take the required height and SingleChildScrollView will be able to manage your content properly.
mainAxisSize:MainAxisSize.min
This will definitely solve your issue.
You need a Scroll Widget on top of the others. This is the best way, because the widgets will adjust to the keyboard. However you can also edit your Scaffold with:
resizeToAvoidBottomPadding: false
Or, try this one
Expanded(
child: ListView(
children: <Widget>[
YourWidgets()
]
)
)