image fit in a container
Wed May 01 2024 10:21:29 GMT+0000 (Coordinated Universal Time)
Saved by
@salauddin01
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Lab Evaluation',
debugShowCheckedModeBanner: false,
home: MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white, //appbar
body: Container(
height: 150,
width: 800,
child: ClipRRect(
borderRadius: BorderRadius.vertical(
bottom: Radius.circular(40),
),
child: Image.asset('images/image.png', fit: BoxFit.cover,),
)
));
}
}
content_copyCOPY
Comments