it's a code of a main file
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text("RTSPS"),
),
body: Center(
child: FlatButton(
child: Image.asset('assets/1st.png'),
onPressed:()=>HomePage(),
),
),
),
);
}
}
and here is pubspec.yaml
file code in which I only made changes in assets
assets:
- assets/1st.png