I am able to replicate the issue.
In the example code I've created:
import 'package:flutter/material.dart';
void main() {
runApp(UIUX());
}
class UIUX extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
UIUXCard(),
],
),
),
);
}
}
class UIUXCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ClipRRect(
borderRadius: BorderRadius.circular(15),
child: GridTile(
child: Image.asset(
'images/ui.jpeg',
fit: BoxFit.cover,
),
footer: GridTileBar(
backgroundColor: Colors.black54,
title: Text('UI/UX Design'),
),
),
);
}
}
This will throw errors:
The following assertion was thrown during performLayout():
'package:flutter/src/rendering/stack.dart': Failed assertion: line 588 pos 12: 'size.isFinite': is not true.
and
RenderBox was not laid out: RenderStack#f487f relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'
As observed, the UIUXCard() is in an unbounded widget (the Column widget). It needs to be wrap in a bounded widget and provide the size for it. In the example below, I added a Container to solve the issue.
import 'package:flutter/material.dart';
void main() {
runApp(UIUX());
}
class UIUX extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Wrap in a Container
Container(
width: 100.0,
height: 100.0,
child: UIUXCard(),
),
],
),
),
);
}
}
class UIUXCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ClipRRect(
borderRadius: BorderRadius.circular(15),
child: GridTile(
child: Image.asset(
'images/ui.jpeg',
fit: BoxFit.cover,
),
footer: GridTileBar(
backgroundColor: Colors.black54,
title: Text('UI/UX Design'),
),
),
);
}
}

Or try to wrap the GridTile in a container:
import 'package:flutter/material.dart';
void main() {
runApp(UIUX());
}
class UIUX extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// Wrap in a Container
UIUXCard(),
],
),
),
);
}
}
class UIUXCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ClipRRect(
borderRadius: BorderRadius.circular(15),
child: Container(
width: 100.0,
height: 100.0,
child: GridTile(
child: Image.asset(
'images/ui.jpeg',
fit: BoxFit.cover,
),
footer: GridTileBar(
backgroundColor: Colors.black54,
title: Text('UI/UX Design'),
),
),
),
);
}
}
Try to check out the documentation about "Layouts in Flutter". It would be a good reference for this kind of case.
If this is not the case, could you provide other parts of your code? or the part where you are trying to call the UIUXCard class?