Skip to content

Instantly share code, notes, and snippets.

@rena2019
Last active September 30, 2025 12:57
Show Gist options
  • Select an option

  • Save rena2019/369cf30f4550ba049dd19eb6531e253b to your computer and use it in GitHub Desktop.

Select an option

Save rena2019/369cf30f4550ba049dd19eb6531e253b to your computer and use it in GitHub Desktop.
flutter image placeholder
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(body:
SingleChildScrollView(child:
Column(children: [
Text('Hello, World!'),
//Image.network('https://placehold.co/600x400/EEE/31343C'),//SVG !!!!
Image.network('https://picsum.photos/300/200'), //Picture
Image.network('https://dummyimage.com/300x200/EEE/31343C'), // XXX x YYY with color
//Image.network('https://images.placeholders.dev/?width=1055&height=100&text=Hello%20World&bgColor=%23434343&textColor=%23dfdfde'), //SVG
//Image.network('https://placehold.jp/150x150.png'),
Image.network('https://ui-avatars.com/api/?rounded=true&background=c0c0c0&name=X'),//circle
]
)),
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment