Getting rid of extra space above a list in flutter - flutter

Problem: As you can see from the pic at the bottom, there is some extra white space above the grid layout that I don't want. I tried adjusting the alignment inside the container to centerTop but that didn't change anything. I think the problem has to do with Container and Gridview being inside an Expanded widget. Not sure how to go about removing that white space. That orange is from a scroll down event in order to show where the white space is. Any help would be much appreciated! Thank you.
Code:
class MyFavorites extends StatefulWidget {
MyFavorites();
_MyFavorites createState() => _MyFavorites();
}
class _MyFavorites extends State<MyFavorites> {
final FavController fC = Get.put(FavController());
#override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: colorPalette.chooseColor('offWhite'),
body: Column(
children: [
Spacer(flex: 1),
Expanded(
flex: 2,
child: Row(
children: [
Container(
alignment: Alignment.centerLeft,
child: IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: Icon(Icons.chevron_left),
color: colorPalette.chooseColor('darkGrey'),
),
),
Container(
margin: EdgeInsets.only(left: 23),
alignment: Alignment.centerLeft,
child: Text(
'My Favorites',
style: GoogleFonts.ubuntuCondensed(
color: colorPalette.chooseColor('darkGrey'),
fontSize: 32,
fontWeight: FontWeight.bold),
),
),
],
),
),
Expanded(
flex: 12,
child: Container(
child: GridView.count(
crossAxisCount: 2,
children: List.generate(fC.favItemNamesList.length, (index) {
return Container(
child: Card(
child: Column(
children: [
Expanded(
flex: 3,
child: Stack(
fit: StackFit.expand,
children: [
Image.asset(
'assets/images/empty_image.jpg',
fit: BoxFit.fill,
),
],
),
),
Expanded(
flex: 1,
child: Container(
color: colorPalette.chooseColor('offWhite'),
child: Row(
children: [
Expanded(
flex: 1,
child: Container(
alignment: Alignment.center,
child: IconButton(
icon: Icon(
Icons.add,
color: colorPalette
.chooseColor('purple'),
),
onPressed: () {},
)),
),
Expanded(
flex: 1,
child: Container(
alignment: Alignment.center,
child: IconButton(
icon: Icon(
Icons.edit,
color: colorPalette
.chooseColor('green'),
),
onPressed: () {},
)),
),
Expanded(
flex: 1,
child: Container(
alignment: Alignment.center,
child: IconButton(
icon: Icon(
Icons.favorite,
color: Colors.pink,
),
onPressed: () {},
)),
),
],
),
),
),
Expanded(
flex: 1,
child: Container(
color: colorPalette.chooseColor('darkGrey'),
padding: EdgeInsets.only(left: 8),
alignment: Alignment.centerLeft,
child: Obx(
() => Text(fC.favItemNamesList[index],
style: GoogleFonts.ubuntuCondensed(
color: colorPalette
.chooseColor('offWhite'),
fontSize: 13)),
),
),
),
],
),
),
);
}),
),
),
),
],
),
);
}
}
Pic of problem:

Just do it as follows:
remove the first spacer, there is no need for it unless you need the above space. However you can use SafeArea Widget to avoid all the unseen places from the screen automatically if that is what you want.
Remove that container wrapping the grid view
your code should look like:
class MyFavorites extends StatefulWidget {
MyFavorites();
_MyFavorites createState() => _MyFavorites();
}
class _MyFavorites extends State<MyFavorites> {
final FavController fC = Get.put(FavController());
#override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: colorPalette.chooseColor('offWhite'),
body: Column(
children: [
Expanded(
flex: 2,
child: Row(
children: [
Container(
alignment: Alignment.centerLeft,
child: IconButton(
onPressed: () {
Navigator.pop(context);
},
icon: Icon(Icons.chevron_left),
color: colorPalette.chooseColor('darkGrey'),
),
),
Container(
margin: EdgeInsets.only(left: 23),
alignment: Alignment.centerLeft,
child: Text(
'My Favorites',
style: GoogleFonts.ubuntuCondensed(
color: colorPalette.chooseColor('darkGrey'),
fontSize: 32,
fontWeight: FontWeight.bold),
),
),
],
),
),
Expanded(
flex: 12,
child: GridView.count(
crossAxisCount: 2,
children: List.generate(fC.favItemNamesList.length, (index) {
return Container(
child: Card(
child: Column(
children: [
Expanded(
flex: 3,
child: Stack(
fit: StackFit.expand,
children: [
Image.asset(
'assets/images/empty_image.jpg',
fit: BoxFit.fill,
),
],
),
),
Expanded(
flex: 1,
child: Container(
color: colorPalette.chooseColor('offWhite'),
child: Row(
children: [
Expanded(
flex: 1,
child: Container(
alignment: Alignment.center,
child: IconButton(
icon: Icon(
Icons.add,
color: colorPalette
.chooseColor('purple'),
),
onPressed: () {},
)),
),
Expanded(
flex: 1,
child: Container(
alignment: Alignment.center,
child: IconButton(
icon: Icon(
Icons.edit,
color: colorPalette
.chooseColor('green'),
),
onPressed: () {},
)),
),
Expanded(
flex: 1,
child: Container(
alignment: Alignment.center,
child: IconButton(
icon: Icon(
Icons.favorite,
color: Colors.pink,
),
onPressed: () {},
)),
),
],
),
),
),
Expanded(
flex: 1,
child: Container(
color: colorPalette.chooseColor('darkGrey'),
padding: EdgeInsets.only(left: 8),
alignment: Alignment.centerLeft,
child: Obx(
() => Text(fC.favItemNamesList[index],
style: GoogleFonts.ubuntuCondensed(
color: colorPalette
.chooseColor('offWhite'),
fontSize: 13)),
),
),
),
],
),
),
);
}),
),
),
],
),
);
}
}

Related

title widget to be centered and icon widgets at the right side in one row

the question is exactly same as this post
but I did not find an answer from the post.
my goal is to set the title widget in the center
and other two buttons on the right side.
the solutions in the link all put the title widget slightly on the left side.
does anyone know how to do this without using Stack? I'm afraid of the title widget being over the button widgets when the title gets too long.
the code:
SizedBox(
height: 40,
width: MediaQuery.of(context).size.width,
child: Row(
children: [
const SizedBox(width: 17),
Text(
'TITLE',
style: const TextStyle(
color: Colors.white, fontSize: 30, fontWeight: FontWeight.w500),
),
Spacer(),
Row(
children: [
GestureDetector(
onTap: (){null;},
child: SizedBox(
child: Icon(Icons.wallet_membership, color: Colors.white),
),
),
const SizedBox(width: 17),
GestureDetector(
onTap: (){Get.toNamed('/wallet_setting');},
child: const SizedBox(
child: Icon(Icons.settings, color: Colors.white),
),
),
]
)
]
),
)
Try this One
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Container(
child: Center(
child: Text(
'TITLE',
style: const TextStyle(color: Colors.white, fontSize: 30, fontWeight: FontWeight.w500),
),
)
)
),
Align(
alignment: Alignment.centerRight,
child: Row(
children: [
GestureDetector(
onTap: (){null;},
child: SizedBox(
child: Icon(Icons.wallet_membership, color: Colors.white),
),
),
const SizedBox(width: 17),
GestureDetector(
onTap: (){Get.toNamed('/wallet_setting');},
child: const SizedBox(
child: Icon(Icons.settings, color: Colors.white),
),
),
]
)
)
],
)
OutPut:
i think you should wrap it with centre
Try this approach:
first make widget from your right widgets:
Widget _rightIcons() {
return Row(children: [
GestureDetector(
onTap: () {
null;
},
child: SizedBox(
child: Icon(Icons.wallet_membership, color: Colors.white),
),
),
const SizedBox(width: 17),
GestureDetector(
onTap: () {
Get.toNamed('/wallet_setting');
},
child: const SizedBox(
child: Icon(Icons.settings, color: Colors.white),
),
),
]);
}
then build your header like this:
Row(
children: [
_rightIcons(),
Expanded(
child: Center(
child: Text(
'TITLE',
style: const TextStyle(
color: Colors.white,
fontSize: 30,
fontWeight: FontWeight.w500),
),
),
),
Opacity(
opacity: 0,
child: _rightIcons(),
)
],
),
You can use centerTitle:true on Appbar
appBar: AppBar(
centerTitle: true,
title: Text("title"),
actions: [
Another way
Container(
color: Colors.purple,
height: 40 * 2,
width: MediaQuery.of(context).size.width,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
IconButton(onPressed: () {}, icon: Icon(Icons.navigate_before)),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
flex: 1,
child: SizedBox(),
),
Expanded(
flex: 4,
child: Text(
'TITLE',
textAlign: TextAlign.center,
style: const TextStyle(
color: Colors.white,
fontSize: 30,
fontWeight: FontWeight.w500),
),
),
Expanded(
flex: 1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
GestureDetector(
child: Icon(Icons.wallet_membership,
color: Colors.white),
),
const SizedBox(width: 17),
GestureDetector(
onTap: () {},
child: const SizedBox(
child:
Icon(Icons.settings, color: Colors.white),
),
),
]),
),
)
],
),
],
),
)
Preferable solution:
You can implements PreferredSizeWidget to create custom Appbar. Play with color and other decoration.
class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
const MyAppBar({super.key});
#override
Widget build(BuildContext context) {
return Stack(
children: [
Align(
alignment: Alignment.bottomCenter,
child: Text("title"),
),
Align(
alignment: Alignment.bottomRight,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
//you can use callback method to get onpressed
onPressed: () {},
icon: Icon(Icons.settings),
),
IconButton(
onPressed: () {},
icon: Icon(Icons.settings),
),
],
),
)
],
);
}
#override
Size get preferredSize => const Size.fromHeight(kToolbarHeight * 2);
}
And use like appBar: MyAppBar(),

flutter alertdialog with background image

Folloing is my alert dialog box code, i need to set an background image for the alert dialog instead of blue color, need to show a design
AlertDialog(
backgroundColor: Colors.blue,
titlePadding: EdgeInsets.all(0),
contentPadding: EdgeInsets.all(0),
title: Container(
decoration: BoxDecoration(
color: profile_edit_toolbar_color,
borderRadius: BorderRadius.all(Radius.circular(8))),
width: MediaQuery.of(context).size.width * 0.7,
height: MediaQuery.of(context).size.height * 0.5,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsets.all(18),
child: Text(
'Select countries to show',
style: TextStyle(
color: Colors.yellow[300],
fontSize: 20,
fontFamily: fontFamily_3),
// style: CustomStyle.balooCustom(20, Colors.white)
),
),
IconButton(
onPressed: () {
Navigator.of(context).pop();
},
icon: Icon(
Icons.close,
size: 25,
color: Colors.white,
)),
],
),
Row(
children: [
Expanded(
child: Container(
height: 120,
child: DisplayCountriesForm(
countriesList: eventResponse.countriesList,
num: 0,
displayCountries: displayCountries,
onValueChanged: (updatedList) {
},
),
)),
Expanded(
child: Container(
height: 120,
child: DisplayCountriesForm(
countriesList: eventResponse.countriesList,
num: 1,
displayCountries: displayCountries,
onValueChanged: (updatedList) {
},
),
)),
Expanded(
child: Container(
height: 120,
child: DisplayCountriesForm(
countriesList: eventResponse.countriesList,
num: 2,
displayCountries: displayCountries,
onValueChanged: (updatedList) {
},
),
)),
],
),
],
),
),
);
Try below code I have add background image of the alert dialog hope your problem is solved , Use your widget also and change background image on your need
TextButton(
child: Text('Pressed Me'),
onPressed: () => showDialog(
context: context,
builder: (context) => AlertDialog(
content: Stack(
alignment: Alignment.center,
children: <Widget>[
Image.network(
'https://www.kindpng.com/picc/m/355-3557482_flutter-logo-png-transparent-png.png',
),
Text(
'Add Your Text Here',
style: TextStyle(
fontSize: 24,
),
),
],
),
),
),
),
Your Result Screen->

How can i add expansion tile widgets inside GridView.builder() in flutter?

I was working on grid views and got stuck when trying to insert expansion tiles inside the grid view.The problem that i am facing is, when tring to expand the tile, i am getting an overflow error. Is there any way to use expansion tile inside grid view in such a way that when one of the tiles is expanded, the other tiles moves down without causing any overflow error ?
Here's my code snippet :
Expanded(
child: GridView.builder(
itemCount: 21,
physics: BouncingScrollPhysics(),
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: (1 / 0.46),
crossAxisCount:
(MediaQuery.of(context).orientation ==
Orientation.landscape)
? 4
: 1,
),
itemBuilder:
(BuildContext context, int index) => Card(
elevation: 6.0,
child: ClipRRect(
borderRadius: BorderRadius.circular(10.0),
child: ExpansionTile(
// collapsedBackgroundColor: Colors.white,
// backgroundColor: Colors.white,
trailing: FadeInImage.memoryNetwork(
image:
'https://picsum.photos/250?image=123',
placeholder: kTransparentImage,
),
title: Container(
child: Text(
'Pencil Pen Test Long String Again Test Long String',
),
),
subtitle: Padding(
padding:
const EdgeInsets.only(top: 8.0),
child: Text(
'\u{20B9} $myAmount',
style: TextStyle(
fontWeight: FontWeight.bold,
),
),
),
children: <Widget>[
Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Align(
alignment: Alignment.topLeft,
child: Text('Price 1 :' +
' \u{20B9} $myAmount'),
),
Align(
alignment: Alignment.topLeft,
child: Text('Price 2 :' +
' \u{20B9} $myAmount'),
),
Align(
alignment: Alignment.topLeft,
child: Text('Price 3 :' +
' \u{20B9} $myAmount'),
),
SizedBox(
height: 6.0,
),
Column(
children: [
Container(
padding:
EdgeInsets.all(20.0),
child: Align(
alignment:
Alignment.centerLeft,
child: Text(
'TAGS',
style: TextStyle(
color: Colors.white,
decoration:
TextDecoration
.underline,
),
),
),
),
Row(
children: [
Expanded(
child: InputChip(
onDeleted: () {},
onPressed: () {},
label: Text('Chip a'),
avatar: Icon(
Icons.ac_unit),
),
),
Expanded(
child: InputChip(
onDeleted: () {},
onPressed: () {},
label: Text('Chip b'),
avatar: Icon(Icons
.e_mobiledata),
),
),
Expanded(
child: InputChip(
onDeleted: () {},
onPressed: () {},
label: Text('Chip c'),
avatar: Icon(Icons
.format_align_justify_outlined),
),
),
],
),
],
),
Divider(),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: <Widget>[
Row(
children: [
Text(
'In Hand : ',
style: TextStyle(
fontWeight:
FontWeight.bold,
color:
Theme.of(context)
.colorScheme
.secondary,
),
),
],
),
Row(
children: [
IconButton(
onPressed: () {
displayBottomSheetAddInventory(
context);
},
icon: Icon(
Icons.add_circle),
),
IconButton(
onPressed: () {
displayBottomSheetSubtractInventory(
context);
},
icon: Icon(Icons
.remove_circle),
),
IconButton(
onPressed: () {
displayBottomSheetEditInventory(
context);
},
icon: Icon(
Icons.edit,
),
),
],
),
],
)
],
),
)
],
),
),
),
),
),
This is what i'm getting:
And this is want i want : (The other tiles should be below this tile and readjust when collapsed.)
Can anyone help ?

how to remove bottom space between bottom of the screen and bottom bar?

How to remove white space between bottom bar and bottom of the screen. I also try apply padding or margin in bottom container but its not working . please help me how to resolve this problem .
hey help me i am afraid about this error . it takes my most of the time but i cant solve it. please help me.
Its my code
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:provider/provider.dart';
import 'package:grk_001/Provider/products.dart';
class ProductDetails extends StatelessWidget {
static const String routename = 'ProductDetails';
#override
Widget build(BuildContext context) {
final devicesize = MediaQuery.of(context).size;
final Productid = ModalRoute.of(context).settings.arguments as String;
final loadedproduct = Provider.of<Products>(
context,
).findByid(Productid);
return SafeArea(
maintainBottomViewPadding: true,
child: Scaffold(
appBar: AppBar(
title: Text(loadedproduct.title == null ? '' : loadedproduct.title),
),
body: Container(
margin: EdgeInsets.zero,
padding: EdgeInsets.zero,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
SingleChildScrollView(
child: Column(
children: <Widget>[
Container(
width: double.infinity,
height: 300,
child: Image.network(
loadedproduct.imageUrl,
fit: BoxFit.cover,
),
),
SizedBox(
height: 15.0,
),
Text(
'₹${loadedproduct.price}',
style: TextStyle(fontSize: 30.0),
),
SizedBox(
height: 10.0,
),
Text(
loadedproduct.description,
softWrap: true,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 20.0),
),
Row(
children: <Widget>[
Expanded(
child: FlatButton.icon(
onPressed: () {},
icon: Icon(
Icons.arrow_drop_down,
color: Colors.pink,
),
label: Text(
'Quantity',
style: TextStyle(color: Colors.pink),
)),
),
Expanded(
child: FlatButton.icon(
onPressed: () {},
icon: Icon(
Icons.arrow_drop_down,
color: Colors.pink,
),
label: Text(
'Color',
style: TextStyle(color: Colors.pink),
),
),
)
],
)
],
),
),
Container(
padding: EdgeInsets.zero,
margin: EdgeInsets.zero,
width: double.infinity,
decoration: BoxDecoration(),
child: Row(
children: <Widget>[
Expanded(
flex: 5,
child: FlatButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0.0),
),
color: Colors.pink,
onPressed: () {},
child: Text('BUY NOW'),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {},
child: Container(
child: Icon(
Icons.favorite,
size: 37.0,
color: Colors.red,
),
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {},
child: Container(
child: Icon(
Icons.shopping_cart,
size: 37.0,
color: Colors.red,
),
),
),
),
],
),
)
],
),
),
),
);
}
}
At last, found your problem.
The problem is with your 'BUY NOW' button! It occupies extra height so that it will visible to be high up from the bottom.
Since your icon's size is 37, a height greater than 37 would be preferred.
Set it for both parent Container and Button's Container.
Also, make a note of crossAxisAlignment of the Row.
Do something like this to your 'BUY NOW' button,
Container(
width: MediaQuery.of(context).size.width,
height: 40.0,
color: Colors.green,
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Expanded(
flex: 5,
child: Container(
height: 40.0,
child: FlatButton(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0.0),
),
color: Colors.pink,
onPressed: () {},
child: Text('BUY NOW'),
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {},
child: Container(
child: Icon(
Icons.favorite,
size: 37.0,
color: Colors.red,
),
),
),
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {},
child: Container(
child: Icon(
Icons.shopping_cart,
size: 37.0,
color: Colors.red,
),
),
),
),
],
),
)
Hope this solves your issue.

Layout in list tile - flutter

Current output:
Expected output:
Code:
SizedBox(
width: 380,
height: 180,
child: Swiper(
itemCount: items.length,
itemBuilder: (context, index) {
return Column(
children: <Widget>[
Expanded(
child: Card(
child: ListTile(
title: Text(
'${items[index].title}',
),
subtitle: Text(
'${items[index].body}',
),
trailing: Column(
children: <Widget>[
CircleAvatar(
backgroundColor: HexColor("#0087a8"),
child: IconButton(
icon: Icon(Icons.add),
],
),
),
),
)
],
);
},
viewportFraction: 0.8,
scale: 0.9,
control: SwiperControl(color: Colors.white),
),
);
I am unable to create the icon button to be that way. As when i put in padding, it says that the pixels overflowed. I need to get the add button on the bottom right hand side.
As already pointed out, you shouldn't use a ListTile for this, as you want to use more than just a title, subtitle for your content.
The reason I've picked a Stack over a Column here, is that it allows you to safely use it in different size screens whilst assuring the view won't overflow. With Column, it would use the button diameter as the whole space to use (vertically), even though it is restrict to the right side of the box.
I believe this is what you're looking for.
class MyListTile extends StatelessWidget {
const MyListTile({
Key key,
}) : super(key: key);
#override
Widget build(BuildContext context) {
return Container(
height: 180.0,
color: const Color(0xff0087a8),
child: Container(
padding: const EdgeInsets.all(20.0),
margin: const EdgeInsets.all(10.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
color: const Color.fromRGBO(19, 12, 117, 1.0),
),
child: Stack(
children: <Widget>[
Text(
'EUR - USD',
style: Theme.of(context).textTheme.display2.copyWith(
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
Align(
alignment: Alignment.centerLeft,
child: Text(
'Forex',
style: TextStyle(color: Colors.white, fontSize: 20.0),
),
),
Align(
alignment: Alignment.bottomRight,
child: FloatingActionButton(
backgroundColor: const Color(0xff0087a8),
onPressed: () {},
child: Icon(
Icons.add,
color: Colors.white,
size: 50.0,
),
),
)
],
),
),
);
}
}
Try this code
Container(
height: 180,
width: double.infinity,
child: Card(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'EUR/USD',
style: TextStyle(fontSize: 40),
),
Text('FOREX', style: TextStyle(fontSize: 20)),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
CircleAvatar(
backgroundColor: Colors.blueAccent,
child: IconButton(
onPressed: () {
print('On Pressed');
},
icon: Icon(Icons.add),
)),
],
)
],
),
),
),
)
Use custom widget for list item OR column from below code for single view. To align left and right you have to put your view in 'Align' as in below -
class _ItemsState extends State<Items> {
#override
Widget build(BuildContext context) {
// TODO: implement build
return Scaffold(
body: SizedBox(
width: 380,
height: 160,
child: Card(
child: ListView.builder(
itemCount: 1,
itemBuilder: (context, index) {
return
Padding(padding: EdgeInsets.all(10.0),child: Column(children: <Widget>[
Align(
alignment: Alignment.centerLeft,
child: Column(children: <Widget>[
Text(
'title',
style: TextStyle(fontSize: 20.0 , fontWeight: FontWeight.bold,),
),
Text(
'body',
style: TextStyle(fontSize: 14.0), )
]),
),
Align(
alignment: Alignment.centerRight,
child: CircleAvatar(
maxRadius: 20.0,
backgroundColor: Colors.blueGrey,
child: IconButton(
icon: Icon(Icons.add,
color: Colors.white,),
))
)
]));
}))));
}
}