Related
I leave the entire code fragment, the main idea is to have a textfield that, by using the keyboard, shows me a series of elements, in the description variable, I have that element to select, this works well, the only issue is, how to keep my alertdialog with all the correct notes.
return await Get.generalDialog(
barrierLabel: "Barrier",
barrierDismissible: false,
transitionBuilder: (context, a1, a2, widget) {
return StatefulBuilder(builder: (context, setState) {
return Transform.scale(
scale: a1.value,
child: Opacity(
opacity: a1.value,
child: Dialog(
insetAnimationCurve: Curves.bounceOut,
insetPadding: EdgeInsets.only(right: 20, left: 20),
//backgroundColor: colorFour(),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0),
),
child: SingleChildScrollView(
child: Container(
height: 340,
child: Column(
children: <Widget>[
Container(
alignment: Alignment.topCenter,
height: 50,
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(12),
topRight: Radius.circular(12),
),
),
padding: EdgeInsets.all(5),
child: Center(
child: Text(
title,
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.w600),
maxLines: 2,
textAlign: TextAlign.center,
),
),
),
SingleChildScrollView(
padding: EdgeInsets.only(left: 10, right: 10),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: [
Container(
margin: EdgeInsets.only(top: 10),
child: TextFormField(
controller: controller,
decoration: InputDecoration(
border: OutlineInputBorder(
gapPadding: 5.0)),
keyboardType: TextInputType.text,
maxLines: 1,
onChanged: (String cadena) async {
listado = pivote
.where((x) => x.descripcion
.split("/")[value]
.toLowerCase()
.contains(
cadena.toLowerCase()))
.toList();
setState(() {});
},
),
),
Container(
height: 200,
margin: EdgeInsets.only(
top: 10, bottom: 10.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(5)),
border: Border.all(
color: Colors.grey, width: 1)),
child: ListView.builder(
padding: const EdgeInsets.all(0.0),
physics: BouncingScrollPhysics(),
itemCount: listado.length,
shrinkWrap: true,
scrollDirection: Axis.vertical,
itemBuilder: (context, index) {
return Container(
height: 34,
child: InkWell(
child: SizedBox.expand(
child: Align(
alignment:
Alignment.centerLeft,
child: Padding(
padding:
EdgeInsets.only(
right: 5,
left: 5),
child: Text(
listado[index]
.descripcion
.split(
"/")[value],
textAlign:
TextAlign.left),
),
),
),
onTap: () {
Get.back(result: {
"item": listado[index],
});
}),
);
}),
),
],
)),
],
),
),
),
),
));
});
},
pageBuilder: (context, animation1, animation2) {
return Container();
});
I need to overlay my alertdialog, that is to say that the size does not break my design, this happens after focusing on the textfield
Show us some code to help you out.
In any case, it might make sense to wrap the layout in a SingleChildScrollView.
Here is a very good explanation.
https://api.flutter.dev/flutter/widgets/SingleChildScrollView-class.html
yourAlertDialog(
context: context,
builder: (BuildContext context) {
return SingleChildScrollView(child: yourchild);
},
);
Your layout should be wrapped in Scrollview , I didn't replicate or run this code but it should be like this:
AlertDialog(
title: Text("title", style: TextStyle(color: ThemeColors.colorPrimary),),
content: Container(
width: double.maxFinite,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: StatefulBuilder(builder: (BuildContext context1, StateSetter setState) {
this.setState = setState;
return Container(
height: 340,
child: Column(
children: <Widget>[
//your container
],
),
),
}),
)),
);
I have the following code for a DraggableScrollableSheet in Flutter.
DraggableScrollableSheet(
builder: (BuildContext context, ScrollController scrollController) {
return ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(35),
topRight: Radius.circular(35),
),
child: Container(
color: ColorData.secondaryColor,
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 10,
horizontal: 15,
),
child: Column(
children: [
Container(
height: 3,
width: 30,
decoration: BoxDecoration(
color: ColorData.primaryDividerColor,
borderRadius: BorderRadius.circular(16),
),
),
const SizedBox(
height: 18,
),
SizedBox(
width: _screenWidth,
child: const Text(
'Exchange Houses',
textAlign: TextAlign.start,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20,
),
),
),
const SizedBox(
height: 8,
),
SizedBox(
width: _screenWidth,
child: const Text(
'(Tap to select)',
textAlign: TextAlign.start,
),
),
const SizedBox(
height: 10,
),
Expanded(
child: ListView.separated(
itemCount: 5,
itemBuilder: (context, index) => const ExchangeHouseCard(
id: 1,
houseName: 'Test House',
houseContactNumber: '+94 77123456',
houseUrl:
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQrLlwS2ymz1oFL10jTbD7QMcCffrrAzUAbMA&usqp=CAU',
houseImageUrl:
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQrLlwS2ymz1oFL10jTbD7QMcCffrrAzUAbMA&usqp=CAU',
houseLatitude: 7.0012345,
houseLongitude: 20.301456,
userCurrencyName: 'USD',
convertingCurrencyName: 'LKR',
exchangeRate: 200.00,
change: 500.00,
changeInConvertingCurrency: 1200.00,
),
separatorBuilder: (context, index) => const SizedBox(
height: 5,
),
),
),
],
),
),
),
);
},
),
In the above code, I am trying to make my DraggableScrollableSheet be able be to dragged upwards or collapsed downwards when user drags the sheet. No matter how I try, I can not drag or collapse the sheet. It stays where it is.
Furthermore, something interesting happens if I set controller property of my ListView to the scrollController I get from the builder method in DraggableScrollableSheet. In this case, the DraggableScrollableSheet becomes draggable if we try to scroll the ListView.
But I want the DraggableScrollableSheet to be draggable if I drag from a general area of the sheet. How to implement this to the above DraggableScrollableSheet?
(I also tried wrapping the widget that is being returned inside the builder method with a ListView and setting controller property of the ListView to scrollController that I get from the builder method. But this also gives a render error. I could not find a way to fix this.)
Can someone please help?
You need to give isScrollControlled to true and set the height
showModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (context) {
return DraggableScrollableSheet(
initialChildSize: 0.9,
maxChildSize: 0.9,
builder: (BuildContext context, ScrollController scrollController) {
return ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(35),
topRight: Radius.circular(35),
),
child: Container(
color: ColorData.secondaryColor,
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 10,
horizontal: 15,
),
child: Column(
children: [
Container(
height: 3,
width: 30,
decoration: BoxDecoration(
color: ColorData.primaryDividerColor,
borderRadius: BorderRadius.circular(16),
),
),
const SizedBox(
height: 18,
),
SizedBox(
width: _screenWidth,
child: const Text(
'Exchange Houses',
textAlign: TextAlign.start,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20,
),
),
),
const SizedBox(
height: 8,
),
SizedBox(
width: _screenWidth,
child: const Text(
'(Tap to select)',
textAlign: TextAlign.start,
),
),
const SizedBox(
height: 10,
),
Expanded(
child: ListView.separated(
itemCount: 5,
controller: scrollController,
itemBuilder: (context, index) =>
const ExchangeHouseCard(
id: 1,
houseName: 'Test House',
houseContactNumber: '+94 77123456',
houseUrl:
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQrLlwS2ymz1oFL10jTbD7QMcCffrrAzUAbMA&usqp=CAU',
houseImageUrl:
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQrLlwS2ymz1oFL10jTbD7QMcCffrrAzUAbMA&usqp=CAU',
houseLatitude: 7.0012345,
houseLongitude: 20.301456,
userCurrencyName: 'USD',
convertingCurrencyName: 'LKR',
exchangeRate: 200.00,
change: 500.00,
changeInConvertingCurrency: 1200.00,
),
separatorBuilder: (context, index) =>
const SizedBox(
height: 5,
),
),
),
],
),
),
),
);
},
);
});
I'm making a pop-up dialog that asks for the user's password when he enters certain screens. This field should have an icon that changes the password visibility, but the state change is not being made, it only happens when I exit the dialog and open it again.
getConfirmationPortalKey() {
return showGeneralDialog(
transitionBuilder: (ctx, anim1, anim2, child) => BackdropFilter(
filter:
ImageFilter.blur(sigmaX: 4 * anim1.value, sigmaY: 4 * anim1.value),
child: FadeTransition(
child: child,
opacity: anim1,
),
),
context: context,
barrierDismissible: true,
barrierLabel: '',
barrierColor: Colors.black26,
transitionDuration: Duration(milliseconds: 200),
pageBuilder: (ctx, anim1, anim2) => AlertDialog(
content: Wrap(
alignment: WrapAlignment.center,
children: [
Wrap(
alignment: WrapAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(top: 10, bottom: 10),
child: TextField(
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(10),
),
),
hintText: 'Input Password',
suffixIconConstraints:
BoxConstraints.tightFor(height: 50, width: 50),
suffixIcon: Padding(
padding: EdgeInsets.only(top: 5),
child: SizedBox(
width: 24,
height: 24,
child: IconButton(
icon: passwordPortalVisible
? SvgPicture.asset(
"assets/svgs/icons/visibility_off.svg",
fit: BoxFit.scaleDown,
color: widget.colors.grey.shade400,
)
: SvgPicture.asset(
"assets/svgs/icons/visibility_on.svg",
fit: BoxFit.scaleDown,
color: widget.colors.grey.shade400,
),
onPressed: passwordVisible
? null
: () {
setState(() {
passwordVisible =
!passwordVisible;
});
},
),
),
),
),
controller: textEditingControllerKey,
keyboardType: TextInputType.number,
obscureText: !passwordVisible,
),
),
],
),
],
),
Padding(
padding:
EdgeInsets.only(left: 30, right: 30, top: 10, bottom: 10),
child: Row(
children: [
Expanded(
widget._myBtns.elevatedButton('OK
', (){UserLogin user = UserLogin();})
),
],
),
),
),
],
),
);
}
I think you will need to use StatefulBuilder inside the AlertDialog. I think this is because the dialog is an overlay and doesn't know about the widget it came from.
https://api.flutter.dev/flutter/widgets/StatefulBuilder-class.html
Below is your code edited:
getConfirmationPortalKey() {
return showGeneralDialog(
transitionBuilder: (ctx, anim1, anim2, child) => BackdropFilter(
filter:
ImageFilter.blur(sigmaX: 4 * anim1.value, sigmaY: 4 * anim1.value),
child: FadeTransition(
child: child,
opacity: anim1,
),
),
context: context,
barrierDismissible: true,
barrierLabel: '',
barrierColor: Colors.black26,
transitionDuration: Duration(milliseconds: 200),
pageBuilder: (ctx, anim1, anim2) => AlertDialog(
content: StatefulBuilder(
builder: (BuildContext context, StateSetter setDialogState) {
bool passwordVisible = false;
return Wrap(
alignment: WrapAlignment.center,
children: [
Wrap(
alignment: WrapAlignment.center,
children: [
Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(top: 10, bottom: 10),
child: TextField(
decoration: InputDecoration(
border: OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(10),
),
),
hintText: 'Input Password',
suffixIconConstraints:
BoxConstraints.tightFor(height: 50, width: 50),
suffixIcon: Padding(
padding: EdgeInsets.only(top: 5),
child: SizedBox(
width: 24,
height: 24,
child: IconButton(
icon: passwordPortalVisible
? SvgPicture.asset(
"assets/svgs/icons/visibility_off.svg",
fit: BoxFit.scaleDown,
color: widget.colors.grey.shade400,
)
: SvgPicture.asset(
"assets/svgs/icons/visibility_on.svg",
fit: BoxFit.scaleDown,
color: widget.colors.grey.shade400,
),
onPressed:() => setDialogState(() {
passwordVisible =
!passwordVisible;
});
),
),
),
),
controller: textEditingControllerKey,
keyboardType: TextInputType.number,
obscureText: !passwordVisible,
),
),
],
),
],
),
Padding(
padding:
EdgeInsets.only(left: 30, right: 30, top: 10, bottom: 10),
child: Row(
children: [
Expanded(
widget._myBtns.elevatedButton('OK
The problem is in this line:
onPressed: passwordVisible ? null : () {...}
Your onPressed event only calls the function if passwordVisible is false. Remove the ternary operator and it will call whether passwordVisible is true or false:
onPressed: () {...}
How would I manage the responsiveness on different devices since the app works great on emulator Pixel 3 XL, but on real device such as Samsung - SM-G991B with screen resolution 1080.0 X 2256.0
as you can see all images are overlapping text does not looks good, maybe i am doing something wrong with the code..
How i can manage responsiveness on different devices ?
#override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: ListView(
physics: PageScrollPhysics(),
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.symmetric(
horizontal: kDefaultPadding, vertical: kDefaultPadding),
child: Text('Меню', style: kStyleHeaders),
),
SizedBox(
height: 10.0,
),
Builder(builder: (_) {
if (_isLoading) {
return Padding(
padding: EdgeInsets.symmetric(vertical: 200.0),
child: Center(child: null),
);
}
if (_apiResponse.error) {
return Center(child: Text(_apiResponse.errorMessage));
}
if (_apiResponse.data.length == 0) {
return Padding(
padding: EdgeInsets.symmetric(vertical: 200.0),
child: Center(
child: Text(
'No products has been found..!',
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
fontFamily: 'BuffetBold',
color: Colors.black,
),
),
),
);
}
return GridView.builder(
shrinkWrap: true,
physics: ClampingScrollPhysics(),
itemCount: _apiResponse.data.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: 0.72,
mainAxisSpacing: 1.0,
crossAxisSpacing: 1.0,
),
itemBuilder: (context, index) {
var product = _apiResponse.data[index];
return CachedNetworkImage(
imageUrl: product.imageMedium,
imageBuilder: (context, imageProvider) => Column(
children: [
GestureDetector(
onTap: () => Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ProductDetail(
id: product.id,
title: product.title,
description: product.description,
structure: product.structure,
imageLarge: product.imageLarge,
weight: product.weight,
hasDiscount: product.hasDiscount,
priceBefore:
double.parse(product.priceBefore),
priceAfter:
double.parse(product.priceAfter),
isHit: product.isHit,
isNew: product.isNew,
isSpicy: product.isSpicy,
isRecommended: product.isRecommended,
isVegetarian: product.isVegetarian,
attributes: product.attributes),
),
),
child: Container(
alignment: Alignment(-1, 0.9),
child: (product.isNew == '1')
? Image.asset(
'assets/images/new.png',
width: 60.0,
)
: null,
height: 165.0,
width: 165.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover,
),
boxShadow: [
BoxShadow(
color: Colors.grey,
blurRadius: 2.0,
spreadRadius: 0,
offset: Offset(0, 2))
],
),
),
),
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0, horizontal: 10.0),
child: Row(
children: [
Flexible(
child: Text(product.title,
style: kStyleTitle))
],
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 10.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
product.weight != null
? product.weight
: '',
style: kStyleWeight),
Text(
product.hasDiscount != '0'
? product.priceBefore
: '',
style: kStyleDiscount),
Container(
margin: EdgeInsets.symmetric(
horizontal: 3, vertical: 0),
height: 30.0,
width: 70.0,
child: FlatButton(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(20.0),
),
color: kPrimaryColor,
textColor: Colors.white,
padding:
EdgeInsets.symmetric(horizontal: 5.0),
onPressed: () {
// ... Todo
context.read<OrderNotify>().addOrder(
CartOrder(
productId: product.id,
product: product,
qty: 1,
price: hasDiscount(product)),
);
},
child: Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Text(hasDiscount(product),
style: kStylePrice),
Icon(
FontAwesomeIcons.rubleSign,
size: 13.0,
color: Colors.white,
)
],
),
),
),
],
),
),
],
),
placeholder: (context, url) => Center(
child: CircularProgressIndicator(
valueColor:
AlwaysStoppedAnimation(Color(0xffB81F33)),
),
),
errorWidget: (context, url, error) => Icon(
Icons.error,
size: 40.0,
color: Theme.of(context).primaryColor,
),
);
},
);
}),
],
),
],
),
),
);
}
On your first container you don't have a rendered size, try to give a size to your first container, not infinity and not maxFinite size.
i am beginner in Flutter , i am trying to create a gridview builder with a card that contains an image, the gridview. builder in the bottom works fine but the gridview builder on the top do not load any image, the difference of the both gridviews is that the one that have problem : the image is inside a card,
I do not have any idea why the second works and the one on the top do not do that even they use the same assets
the error i am getting is about Invalid argument(s): No host specified in URI for every asset
import 'package:flutter/material.dart';
import 'package:footyappp/clubs/Clubs.dart';
import 'package:footyappp/results/results.dart';
import 'package:footyappp/schedules/schedules.dart';
import 'package:footyappp/stats/player_goals.dart';
import 'package:footyappp/tables%20copy/league_board.dart';
import 'package:footyappp/stats/player_assists.dart';
import 'package:footyappp/stats/player_red_cards.dart';
import 'package:footyappp/stats/player_yellow_cards.dart';
class Statss extends StatelessWidget {
List<String> images = [
"Assets/tt.jpg",
"Assets/qatarairways.jpg",
"Assets/LOGO_Danao.jpg",
"Assets/delice.jpg"
];
List<String> menu = [
"Assets/tt.jpg",
"Assets/qatarairways.jpg",
"Assets/LOGO_Danao.jpg",
"Assets/delice.jpg"
];
#override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Stats"),
backgroundColor: Colors.blue[300],
elevation: 0.0,
),
body: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [Colors.purple, Colors.blue])),
child: ListView(
children: [
SizedBox(
height: 20,
),
Container(
margin: EdgeInsets.fromLTRB(10, 0, 0, 0),
child: Text(
"Statistiques",
style: TextStyle(
fontSize: 25,
fontWeight: FontWeight.w900,
color: Colors.white),
),
),
SizedBox(
height: 30,
),
Container(
padding: EdgeInsets.all(12.0),
child: GridView.builder(
shrinkWrap: true,
itemCount: menu.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
crossAxisSpacing: 1.0,
mainAxisSpacing: 1.0),
itemBuilder: (BuildContext context, int index) {
return Card(
elevation: 4.0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0),
),
child: Padding(
padding: const EdgeInsets.all(16.0),
child:
Column(
children: <Widget>[
Container(
height: 60,
width: 60,
child:
Image.network(menu[index]),
),
const SizedBox(width:10.0),
],
),
),
);
},
),
),
Container(
margin: EdgeInsets.fromLTRB(15, 30, 15, 0),
child: Column(
children: [
SizedBox(
height: 1,
),
ButtonTheme(
minWidth: double.infinity,
height: 40,
child: RaisedButton(
child: Align(
child: Text(
"Top Scorers",
style: TextStyle(fontSize: 17),
textAlign: TextAlign.right,
),
alignment: Alignment.centerLeft,
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Scorers()),
);
},
color: Colors.grey.shade300,
textColor: Colors.black,
padding: EdgeInsets.fromLTRB(15, 8, 8, 8),
splashColor: Colors.green,
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0))),
),
SizedBox(
height: 1,
),
ButtonTheme(
minWidth: double.infinity,
height: 40,
child: RaisedButton(
child: Align(
child: Text(
"Top Assists",
style: TextStyle(fontSize: 17),
textAlign: TextAlign.right,
),
alignment: Alignment.centerLeft,
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => Assists()),
);
},
color: Colors.grey.shade300,
textColor: Colors.black,
padding: EdgeInsets.fromLTRB(15, 8, 8, 8),
splashColor: Colors.green,
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0))),
),
SizedBox(
height: 1,
),
ButtonTheme(
minWidth: double.infinity,
height: 40,
child: RaisedButton(
child: Align(
child: Text(
"Yellow Cards",
style: TextStyle(fontSize: 17),
textAlign: TextAlign.right,
),
alignment: Alignment.centerLeft,
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => YellowCards()),
);
},
color: Colors.grey.shade300,
textColor: Colors.black,
padding: EdgeInsets.fromLTRB(15, 8, 8, 8),
splashColor: Colors.green,
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0))),
),
SizedBox(
height: 1,
),
ButtonTheme(
minWidth: double.infinity,
height: 40,
child: RaisedButton(
child: Align(
child: Text(
"Red Cards",
style: TextStyle(fontSize: 17),
textAlign: TextAlign.right,
),
alignment: Alignment.centerLeft,
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => RedCards()),
);
},
color: Colors.grey.shade300,
textColor: Colors.black,
padding: EdgeInsets.fromLTRB(15, 8, 8, 8),
splashColor: Colors.green,
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0))),
),
SizedBox(
height: 30,
)
],
),
),
Container(
padding: EdgeInsets.all(12.0),
child: GridView.builder(
shrinkWrap: true,
itemCount: images.length,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
crossAxisSpacing: 4.0,
mainAxisSpacing: 4.0),
itemBuilder: (BuildContext context, int index) {
return Image.asset(images[index]);
},
),
),
SizedBox(
height: 30,
)
],
),
));
}
}
here how it looks:
i am tryin to make it works
This is because you are using Image.network(menu[index]) for the top gridview.
change it to
Image.asset(menu[index]), it'll work, because you are loading your images from your assets, and not anything from the network.