image from internet flutter
Image.network(
'https://picsum.photos/250?image=9',
)
image from internet flutter
Image.network(
'https://picsum.photos/250?image=9',
)
flutter image asset
// pubspec.yaml
flutter:
assets:
- graphics/
// Inside your widget
Image(image: AssetImage('graphics/background.png'))
flutter image
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text("Image from assets"),
),
body: Image.asset('assets/images/lake.jpg'), // <--- image
),
);
}
}
how to add image to flutter
flutter:
assets:
- assets/my_icon.png
- assets/background.png
how to add image to flutter
flutter:
assets:
- directory/
- directory/subdirectory/
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us