#6 Flutter | Assets & Images |Online & Offline Images insert

Опубликовано: 03 Апрель 2026
на канале: kalptaru academy
252
21

#flutter #android #appdeveloper #flutterdeveloper


Code File Link : https://drive.google.com/file/d/1cPdx...



Full code : import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHomePage(),
);
// This is the theme of your application.
}
}

class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Biginner Demo'),
centerTitle: true,
brightness: Brightness.light,
backgroundColor: Colors.deepPurple[400],
),
body: Center(
// child: Image.asset('assets/Logo.jpeg',
// fit: BoxFit.cover),

// child: Container(
// decoration: BoxDecoration(
// image: DecorationImage(
// image: NetworkImage('https://c0.wallpaperflare.com/preview...,
// fit: BoxFit.cover,
// ),
// ),
// ),

// child: Image.network('https://c0.wallpaperflare.com/preview...,

child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/Logo.jpeg'),
fit: BoxFit.cover,
),
),
),
),
floatingActionButton: FloatingActionButton(
child: Text('Click'),
backgroundColor: Colors.deepPurple,
onPressed: () {},
),
);
}
}


Dhruvin:
instagram id: https://www.instagram.com/dhruv__raba...


mail id = [email protected]

©all rights reserved by Kalptaru academy