fix overflow issue
This commit is contained in:
@@ -143,32 +143,35 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
|
||||
// final double width = size.width;
|
||||
//final double height = size.height;
|
||||
if (widget.cardList.isNotEmpty) {
|
||||
return GridView.builder(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.only(
|
||||
left: getHorizontalPaddingSize(size),
|
||||
right: getHorizontalPaddingSize(size),
|
||||
//bottom: height / 5,
|
||||
//top: 20,
|
||||
return SizedBox(
|
||||
height: size.height,
|
||||
child: GridView.builder(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.only(
|
||||
left: getHorizontalPaddingSize(size),
|
||||
right: getHorizontalPaddingSize(size),
|
||||
//bottom: height / 5,
|
||||
//top: 20,
|
||||
),
|
||||
// physics: ,
|
||||
// shrinkWrap: true,
|
||||
itemCount: widget.cardList.length,
|
||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
mainAxisSpacing: 0,
|
||||
crossAxisSpacing: 10,
|
||||
maxCrossAxisExtent: 200,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
return GestureDetector(
|
||||
child: MihCardDisplay(
|
||||
shopName: widget.cardList[index].shop_name, height: 100),
|
||||
onTap: () {
|
||||
viewCardWindow(index);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
// physics: ,
|
||||
// shrinkWrap: true,
|
||||
itemCount: widget.cardList.length,
|
||||
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
mainAxisSpacing: 0,
|
||||
crossAxisSpacing: 10,
|
||||
maxCrossAxisExtent: 175,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
return GestureDetector(
|
||||
child: MihCardDisplay(
|
||||
shopName: widget.cardList[index].shop_name, height: 100),
|
||||
onTap: () {
|
||||
viewCardWindow(index);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
// return ListView.separated(
|
||||
// shrinkWrap: true,
|
||||
@@ -191,13 +194,17 @@ class _BuildLoyaltyCardListState extends State<BuildLoyaltyCardList> {
|
||||
// },
|
||||
// );
|
||||
} else {
|
||||
return const Padding(
|
||||
padding: EdgeInsets.only(top: 25.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"No Cards Available",
|
||||
style: TextStyle(fontSize: 25, color: Colors.grey),
|
||||
textAlign: TextAlign.center,
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 25.0),
|
||||
child: SizedBox(
|
||||
height: size.height,
|
||||
child: const Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: Text(
|
||||
"No Cards Available",
|
||||
style: TextStyle(fontSize: 25, color: Colors.grey),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user