// #3 working with external assets import 'package:flutter/material.dart'; void main() { runApp(MaterialApp( // home: Text("this my app"), home: NewsFeed(), // return the class )); } // stateless, stateful class class NewsFeed extends StatelessWidget { @override Widget build(BuildContext context){ //Scaffold: it's widget which will occupy all the screen (bar, body return Scaffold( appBar: AppBar( backgroundColor: Colors.green, title: Text("Skynews "), centerTitle: true, ) , // Center will center all the body // child is leaf of root ( body: Center( // to use image from network // child: Image.network('//source') child: Image.asset('images/website.jpg'), ), floatingActionButton: FloatingActionButton( onPressed: (){ print("I'm clicked"); // (in console) }, child: Icon(Icons.atm), backgroundColor: Colors.amber, ), ); } }