Unknown empty space between Column widgets - Flutter - flutter

I'm trying to make it so that the body fades behind the TextField, so I decided to add a gradient on top of it, but there seems to be an empty space between the gradient and the card, and it's ruining the effect. I can't figure out where it's coming from or how to handle it.
return Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
height: 15,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: <Color>[
Colors.white.withOpacity(0),
Theme.of(context).scaffoldBackgroundColor,
]),
),
),
Row(
children: [
Flexible(
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20)),
child: Row(
children: [
Flexible(
child: TextField(
onTap: () => myFocusNode.requestFocus(),
decoration: InputDecoration(
hintText: 'Enter task',
contentPadding: EdgeInsets.all(15),
border: InputBorder.none,
floatingLabelBehavior: FloatingLabelBehavior.never,
),
controller: textController,
focusNode: myFocusNode,
onSubmitted: (_) {
submit();
myFocusNode.requestFocus();
textController.clear();
},
),
),
if (!isEpoch(_selectedDate.toString()))
SizedBox(
height: 20,
child: FittedBox(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Text(
DateFormat('dd/MM').format(_selectedDate),
),
Text(timeOfDayAsHhMm(_selectedTime)),
],
),
),
),
SizedBox(
width: 10,
),
IconButton(
splashRadius: 20,
padding: EdgeInsets.zero,
constraints: BoxConstraints(),
onPressed: _dateAndTimePicker,
icon: const Icon(Icons.calendar_month),
),
SizedBox(
width: 10,
),
IconButton(
splashRadius: 20,
padding: EdgeInsets.zero,
constraints: BoxConstraints(),
onPressed: () => null,
icon: const Icon(Icons.image),
),
SizedBox(
width: 10,
)
],
),
),
),
CircleAvatar(
child: TextButton(
onPressed: () {
submit();
myFocusNode.requestFocus();
textController.clear();
setState(() {
_selectedDate = null;
_selectedTime = null;
});
},
child: const FittedBox(
child: Text(
'Add',
style: TextStyle(
color: Colors.white,
),
),
),
),
),
SizedBox(
width: 5,
)
],
),
],
);
Is there some automatic padding coming from somewhere? I did use a lot of Flexibles and Boxes.

To the card add margin with zero insets
Card(
margin: EdgeInsets.zero,
)

Related

showModalBottomSheet bottom overflow

i got overflow when textformfield opens in showModalBottomSheet, i tried to wrap my first column widget with SingleChildScrollView but it gives me a hidden modalBottomSheet same as ListView i tried to wrap it but all the data disappeared (empty white sheet)
showModalBottomSheet(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
context: context,
builder: (context) {
return Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
children: [
Expanded(
child: Column(
children: [
Row(
children: [
CircleAvatar(
radius: 22,
backgroundImage: NetworkImage(
'${SocialCubit.get(context).userModel!.image}'),
),
SizedBox(
width: 15,
),
Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(10),
color: Colors.grey[350],
),
child: Padding(
padding:
const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
'${SocialCubit.get(context).userModel!.name}',
style: TextStyle(
fontSize: 15,
fontWeight:
FontWeight
.bold),
),
SizedBox(
width: 7,
),
Text(
'2 minutes ago',
style: TextStyle(
fontSize: 11),
),
],
),
SizedBox(
height: 5,
),
Text(
'whats up broo i need to ask you something'),
],
),
),
),
],
),
if (model.postImage != '')
Padding(
padding: const EdgeInsetsDirectional.only(top: 15,start: 67),
child: Container(
height: 140,
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
image: DecorationImage(
image: NetworkImage('${model.postImage}'),
fit: BoxFit.cover,
),
)),
),
],
),
),
Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context)
.viewInsets
.bottom),
child: Row(
children: [
CircleAvatar(
radius: 18,
backgroundImage: NetworkImage(
'${SocialCubit.get(context).userModel!.image}'),
),
SizedBox(
width: 15,
),
Expanded(
child: Container(
decoration: BoxDecoration(
borderRadius:
BorderRadius.circular(30),
color: Colors.grey[300],
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: TextFormField(
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'Write your comment ...'
),
),
),
),
),
IconButton(
onPressed: () {},
icon: Icon(IconBroken.Send)),
],
),
),
],
),
);
});
my problem (overflow)
i tried to wrap the column with ListView but i got no data as shown
this one with SingleChildScrollView,
If you like to use SingleChildScrollView, remove Expanded from Column widget, You can think like, SingleChildScrollVew provides infinite height and Exapanded widget is trying to get infinite and this cause issue.
You can follow this way
showModalBottomSheet(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
context: context,
builder: (context) {
return SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
children: [
Column(
children: [
Row(
children: [
// CircleAvatar(
// radius: 22,
// backgroundImage: NetworkImage(
// '${SocialCubit.get(context).userModel!.image}'),
// ),
SizedBox(
width: 15,
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.grey[350],
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
children: [
// Text(
// '${SocialCubit.get(context).userModel!.name}',
// style: TextStyle(
// fontSize: 15,
// fontWeight:
// FontWeight
// .bold),
// ),
SizedBox(
width: 7,
),
Text(
'2 minutes ago',
style: TextStyle(fontSize: 11),
),
],
),
SizedBox(
height: 5,
),
Text(
'whats up broo i need to ask you something'),
],
),
),
),
],
),
],
),
Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom),
child: Row(
children: [
SizedBox(
width: 15,
),
Expanded(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30),
color: Colors.grey[300],
),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 20),
child: TextFormField(
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'Write your comment ...'),
),
),
),
),
],
),
),
],
),
),
);
});
Also there is DraggableScrollableSheet you may like it.
you can directly install pub library to use modal
https://pub.dev/packages/modal_bottom_sheet/install

Flutter Layout Overflowing with Keyboard is active

I am trying to make a login page that looks like the below which is fine I have got the code to achieve this look, but the issue is when a field is active and the keyboard is present the overflow is shown
#override
Widget build(BuildContext context) {
return Scaffold(
body: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Expanded(
flex: 1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
alignment: Alignment.center,
child: Image.asset(
'assets/images/logo.png',
alignment: Alignment.center,
height: 110,
width: 150,
),
),
)),
Expanded(
flex: 2,
child: Form(
key: _formKey,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
children: [
TextFormField(
decoration: const InputDecoration(
hintText: 'Email',
prefixIcon: Icon(Icons.email_outlined)),
onSaved: (input) => _email = input,
),
const SizedBox(height: 20),
TextFormField(
decoration: const InputDecoration(
hintText: 'Password',
prefixIcon: Icon(Icons.lock_outlined)),
onSaved: (input) => _password = input,
obscureText: true,
),
const SizedBox(height: 20),
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Colors.lime,
minimumSize: const Size.fromHeight(50), // NEW
),
onPressed: _submit,
child: const Text(
'Sign In',
),
),
],
),
),
Column(
children: [
Text('Sign in with',
style: Theme.of(context)
.textTheme
.bodyMedium
.copyWith(fontWeight: FontWeight.bold)),
const SizedBox(
height: 12,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Container(
width: 50,
height: 50,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(
width: 2, color: Colors.grey[350]),
),
child: Image.asset(
'assets/images/social/google.png',
height: 25)),
Container(
width: 50,
height: 50,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(
width: 2, color: Colors.grey[350]),
),
child: Image.asset(
'assets/images/social/facebook.png',
height: 25)),
Container(
width: 50,
height: 50,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(
width: 2, color: Colors.grey[350]),
),
child: Image.asset(
'assets/images/social/apple.png',
height: 25)),
]),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('Create a New Account?'),
TextButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(builder: (_) => const SignupScreen()),
),
child: const Text(
'Go to Sign Up',
),
),
],
)
],
),
),
),
]),
);
}
}
Try to add your 2nd Column inside SingleChildScrollView hope its help to you.
Expanded(
flex: 2,
child: Form(
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
//put your widget here
],
),
),
),
),
wrap your column with singlechildscrollview
body:singleChildScrollview(Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Expanded(
flex: 1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
alignment: Alignment.center,
child: Image.asset(
'assets/images/logo.png',
alignment: Alignment.center,
height: 110,
width: 150,
),
),
)),
Expanded(
flex: 2,
child: Form(
key: _formKey,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
children: [
TextFormField(
decoration: const InputDecoration(
hintText: 'Email',
prefixIcon: Icon(Icons.email_outlined)),
onSaved: (input) => _email = input,
),
const SizedBox(height: 20),
TextFormField(
decoration: const InputDecoration(
hintText: 'Password',
prefixIcon: Icon(Icons.lock_outlined)),
onSaved: (input) => _password = input,
obscureText: true,
),
const SizedBox(height: 20),
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Colors.lime,
minimumSize: const Size.fromHeight(50), // NEW
),
onPressed: _submit,
child: const Text(
'Sign In',
),
),
],
),
),
Column(
children: [
Text('Sign in with',
style: Theme.of(context)
.textTheme
.bodyMedium
.copyWith(fontWeight: FontWeight.bold)),
const SizedBox(
height: 12,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Container(
width: 50,
height: 50,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(
width: 2, color: Colors.grey[350]),
),
child: Image.asset(
'assets/images/social/google.png',
height: 25)),
Container(
width: 50,
height: 50,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(
width: 2, color: Colors.grey[350]),
),
child: Image.asset(
'assets/images/social/facebook.png',
height: 25)),
Container(
width: 50,
height: 50,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(
width: 2, color: Colors.grey[350]),
),
child: Image.asset(
'assets/images/social/apple.png',
height: 25)),
]),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('Create a New Account?'),
TextButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(builder: (_) => const SignupScreen()),
),
child: const Text(
'Go to Sign Up',
),
),
],
)
],
),
),
),
]),)
Try using padding this way. hope this helps
Padding(
padding: MediaQuery.of(context).viewInsets,
child: Column(
children: <Widget>[
// your entire form widgets here
]
)
)

How to center a showmodalbottomservice

Im trying to center an showmodalbottomService because when im typing, you can't see the textfield... means you can't see what you are typing.
I've tried it with SingleChildScrollView, Center or with the mainAxisAlignment... but it's just not working. Please help me!
Can anyone tell me what's the problem?
Here is my code:
showModalBottomSheet(
context: context,
builder: (BuildContext context) => Center(
child: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
padding: const EdgeInsets.all(10.0),
height: 250,
color: Colors.green,
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Task hinzufügen',
style: TextStyle(
fontSize: 20.0,
),
),
GestureDetector(
onTap: () => Navigator.of(context).pop(),
child: Icon(Icons.close),
),
],
),
Divider(thickness: 1.8),
SizedBox(height: 20.0),
TextField(
controller: _taskController,
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0),
borderSide: BorderSide(color: Colors.blue),
),
filled: true,
hintText: 'Task hinzufügen',
),
),
SizedBox(height: 20.0),
Container(
padding:
const EdgeInsets.symmetric(horizontal: 5.0),
width: MediaQuery.of(context).size.width,
// height: 200.0,
child: Row(
children: [
Container(
width:
(MediaQuery.of(context).size.width / 2) -
20,
child: RaisedButton(
color: Colors.red,
child: Text(
'RESET',
),
onPressed: () => _taskController.text = '',
),
),
Container(
width:
(MediaQuery.of(context).size.width / 2) -
20,
child: RaisedButton(
color: Colors.blue,
child: Text(
'Hinzufügen',
),
onPressed: () => saveData(),
),
),
],
),
),
],
),
),
],
),
),
),
),
),
You can add isScrollControlled: true to showModalBottomSheet function.
Then you have to:
remove the Center as a parent.
remove first Column (optional step, as it is useless here).
remove the height from Container.
add a bottom margin of the keyboard height (This is MediaQuery.of(context).viewInsets.bottom here).
Your code will become like this:
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (BuildContext context) => SingleChildScrollView(
child: Container(
padding: const EdgeInsets.all(10.0),
margin: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom,
),
color: Colors.green,
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Task hinzufügen',
style: TextStyle(
fontSize: 20.0,
),
),
GestureDetector(
onTap: () => Navigator.of(context).pop(),
child: Icon(Icons.close),
),
],
),
Divider(thickness: 1.8),
SizedBox(height: 20.0),
TextField(
controller: _taskController,
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0),
borderSide: BorderSide(color: Colors.blue),
),
filled: true,
hintText: 'Task hinzufügen',
),
),
SizedBox(height: 20.0),
Container(
padding: const EdgeInsets.symmetric(horizontal: 5.0),
width: MediaQuery.of(context).size.width,
// height: 200.0,
child: Row(
children: [
Container(
width: (MediaQuery.of(context).size.width / 2) - 20,
child: RaisedButton(
color: Colors.red,
child: Text(
'RESET',
),
onPressed: () => _taskController.text = '',
),
),
Container(
width: (MediaQuery.of(context).size.width / 2) - 20,
child: RaisedButton(
color: Colors.blue,
child: Text(
'Hinzufügen',
),
onPressed: () => saveData(),
),
),
],
),
),
],
),
),
),
),

Keyboard hides TextField - Flutter

I've made a chat page that contains the header, a MessagesStream and a Row that includes the TextField and RaisedButton. I've checked every single page there is about this issue, both in GitHub and StackOverflow, but I wasn't able to find any solution. The row does not go up when the keyboard is launched, instead it goes over the bottom part of the screen, hiding everything.
Could anyone please help me figure this out? I've literally tried everything.
This is my Scaffold:
Widget build(BuildContext context) {
return GestureDetector(
onTap: (){
FocusScope.of(context).requestFocus(new FocusNode());
},
child: Scaffold(
resizeToAvoidBottomInset: true,
backgroundColor: Colors.lightGreenAccent,
appBar: new AppBar(
backgroundColor: Colors.lightGreenAccent,
elevation: 0,
leading: IconButton(
icon: Icon(Icons.arrow_back_ios, color: Colors.white),
onPressed: () => Navigator.of(context).pop(),
),
centerTitle: true,
title: Image(
image: iconApp,
height: 50,
width: 50,
),
),
body: SafeArea(
child: Column(
children: <Widget>[
SizedBox(height: 10),
Expanded(
child: Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(topLeft: Radius.circular(30.0),
topRight: Radius.circular(30.0)),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Material(
borderRadius: BorderRadius.only(topLeft: Radius.circular(30.0),
topRight: Radius.circular(30.0)),
color: grayWhite,
elevation: 2,
child: Padding(
padding: const EdgeInsets.only(bottom:10),
child: Row(
children: <Widget>[
Padding(
padding: const EdgeInsets.only(top: 10.0, left: 15),
child: CircleAvatar(
child: Image.network(
),
),
),
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(top: 10, left: 15),
child: Text(
"Test",
style: TextStyle(
color: Colors.black54,
fontSize: 20
),
),
),
Padding(
padding: const EdgeInsets.only(top: 3, left: 15),
child: Text(
"Test2",
style: TextStyle(
color: Colors.black54,
fontSize: 15
),
),
),
Container(
height: 1,
color: Colors.white70,
)
],
),
)
],
),
),
),
MensagensStream(),
Row(
children: <Widget>[
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: TextField(
controller: textEditingController,
autofocus: true,
autocorrect: true,
onChanged: (value) {
mensagem = value;
},
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(30.0),
),
hintText: "Digite a sua mensagem..."
),
),
),
),
ButtonTheme(
height: 55,
minWidth: 10,
child: RaisedButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
100,
)
),
color: Colors.lightGreenAccent,
child: Icon(Icons.send, color: Colors.white),
onPressed: () => {
textEditingController.clear(),
firestore.collection('mensagens').add({
'Mensagem': mensagem,
'Remetente': googleEmail,
'Destinatario': "patio#teste.com",
'DataHorario': FieldValue.serverTimestamp(),
})
},
),
),
],
)
],
),
),
)
],
),
),
),
);
}
}```
Wrap either one of you Columns (probably the outer one) with a SingleChildScrollView. The issue is that simply popping up the keyboard doesn't suddenly tell the layout that it needs to be able to scroll. You have explicitly say you want it to be able to scroll.
See this for more information on the SingleChildScrollView.
You can use a Scaffold and place the text field as bottomSheet

how can i use SingleChildScrollView in my code flutter?

hello My code for a page is like this. i need to scroll part below appbar.
_sheetController =
_scaffoldKey.currentState.showBottomSheet<void>((BuildContext context) {
return
DecoratedBox(
decoration: BoxDecoration(color: Theme.of(context).canvasColor),
child: ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(40.0), topRight: Radius.circular(40.0)),
child:
Container(
child:
ListView(
children: <Widget>[
Container(
child: Stack(
children: <Widget>[
Positioned(
left: 10,
top: 10,
child: IconButton(
onPressed: () {
_loading = false;
Navigator.of(context).pop();
},
icon: Icon(
Icons.close,
size: 30.0,
color: Theme.of(context).primaryColor,
),
),
)
],
),
height: 50,
width: 50,
),
Form(
key: _formKey,
autovalidate: _autoValidate,
child:SingleChildScrollView(child:
Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width,
height: 140,
child: Stack(
children: <Widget>[
Positioned(
child: Align(
child: Container(
width: 130,
height: 130,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context).primaryColor),
),
alignment: Alignment.center,
),
),
Positioned(
child: Container(
child: AutoSizeText(
"LOGIN",
maxLines: 1,
minFontSize:
MediaQuery.of(context).size.width/10.0,
maxFontSize:
MediaQuery.of(context).size.width/5.0,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
alignment: Alignment.center,
),
),
],
),
),
Padding(
padding: EdgeInsets.only(bottom: 20, top: 60),
child: CustomTextField(
onSaved: (input) {
_Email = input;
},
keyboardType: TextInputType.emailAddress,
validator: emailValidator,
icon: Icon(Icons.email),
hint: "EMAIL",
)),
CustomTextField(
icon: Icon(Icons.lock),
obsecure: true,
onSaved: (input) => _Password = input,
validator: (input) =>
input.isEmpty ? "*Required" : null,
hint: "PASSWORD",
),
Padding(
padding: EdgeInsets.only(right:
MediaQuery.of(context).size.width/1.96),
child: Container(
width: MediaQuery.of(context).size.width/2.310160428,
height: 40.0,
child:
FlatButton(
onPressed: resetSheet,
child: AutoSizeText("FORGOT PASWORD !" ,maxFontSize:
20.0,minFontSize: 10.0,maxLines: 1,),
),
)
),
SizedBox(
height: 10,
),
Padding(
padding: EdgeInsets.only(
left: 20,
right: 20,
bottom: MediaQuery.of(context).viewInsets.bottom),
child: _loading == true
? CircularProgressIndicator(
valueColor: new AlwaysStoppedAnimation<Color>(
Theme.of(context).primaryColor),
)
: Container(
child: filledButton(
"LOGIN",
Colors.white,
Theme.of(context).primaryColor,
Theme.of(context).primaryColor,
Colors.white,
_validateLoginInput),
height: 50,
width: MediaQuery.of(context).size.width,
),
),
SizedBox(
height: 20,
),
],
),
),
),
],
),
height: MediaQuery.of(context).size.height / 1.1,
width: MediaQuery.of(context).size.width,
color: Colors.white,
),
),
);
});
My code for a page is like this. i need to scroll part below appbar.
#override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(... ),
body: new Stack(
children: <Widget>[
new Container(
decoration: BoxDecoration(
image: DecorationImage(...),
new Column(children: [
new Container(...),
new Container(...... ),
new Padding(
child: SizedBox(
child: RaisedButton(..),
),
new Divider(),
new Column(
children: <Widget>[
new Container(
child: new Row(
children: <Widget>[
new Expanded(
child: new Text( ),
),
new IconButton(
icon: IconButton(..),
onPressed: () {
_changed(true, "type");
},
),
],
),
),
visibilityPropertyType
? new Container(
margin: EdgeInsets.all(24.0),
child: new Column(
children: <Widget>[
new Row(
children: <Widget>[
new Expanded(... ),
new RaisedButton(..)
],
),
new Padding(
padding: const EdgeInsets.only(top: 10.0),
child: new Row(
mainAxisAlignment:
MainAxisAlignment.spaceEvenly,
children: <Widget>[
new Column(
children: <Widget>[
new Row(
children: <Widget>[.. ]),
new Row(
children: <Widget>[]),
new Row(
children: <Widget>[]),
new Row(
children: <Widget>[],
),
new Column(
children: <Widget>[
new Row(
children: <Widget>[],
),
],
),
],
),
),
],
))
: new Container(),
],
),
new Divider(
color: Colors.white,
)
])
],
),
);
}
I need to make body part scrollable. How can i implement that scroll.
I think the SingleChildScrollView must work here but doesn't may i have issues in my code i try for alot times to find error but don't any help ?