Network Image

 import "package:flutter/material.dart";


void main()
{
runApp(MyApp());
}
class MyApp extends StatelessWidget
{
MyApp({super.key});

@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Network Image",
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.grey,
),
home: NetworkDemo(),
);
}
}
class NetworkDemo extends StatelessWidget
{
NetworkDemo({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text("Network Image"),
centerTitle: true,
backgroundColor: Colors.grey,
),
body: Center(
child: Padding(
padding: const EdgeInsets.all(58.0),
child: Image.network("https://media.istockphoto.com/id/1166613720/photo/sunflower-"
"in-full-bloom-with-blue-sky.jpg?s=2048x2048&w=is&k=20&c=n68AQQDKN7jUV_R6F6PmdZQlmr"
"Z4CxXY3gNG9Ql9Z5c="),
),
),
);
}
}

Comments

Popular posts from this blog

Second GET API Calling with Bloc simple Example in Flutter

Pagination with Bloc Pattern in Flutter

If_Else_Example