Im a newbie to flutter and working on a basic screen that will display a dice image
here is my code
import 'package:flutter/material.dart';
const startAli = Alignment.topLeft;
const endAli = Alignment.bottomRight;
class GContainer extends StatelessWidget {
const GContainer(this.colors, {super.key});
final List<Color> colors;
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: colors,
begin: startAli,
end: endAli,
)),
child: Center(
child: Image.asset(
"assets/images/dice-1.png",
width: 150,
),
),
);
}
}
there are no errors showing it's simply not showing and i did add them image name to my pubspec.yaml
folder
update: I ran the code on vscode chrome emulator and it does not seem to be able to find my image at all, error no image or empty