main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
theme: ThemeData(primarySwatch: Colors.green),
home: Scaffold(
appBar: AppBar(
title: const Text("Flutter - Card Circle Image")
),
body: bodyContent()
)
)
);
}
bodyContent(){
return Center(
child: SizedBox.square(
dimension: 300,
child: Card(
elevation: 8,
shape: const CircleBorder(),
clipBehavior: Clip.antiAliasWithSaveLayer,
child: Image.network(
"https://picsum.photos/600",
fit: BoxFit.contain
)
)
)
);
}
More flutter tutorials
- flutter – How to make a Card clickable
- flutter – Card circle shape
- flutter – Card circle image padding
- flutter – Card rounded corners image
- flutter – Container decoration image
- flutter – Container clip behavior
- flutter – How to use InkResponse
- flutter – Column items equal height
- flutter – Column items stretch horizontally
- flutter – Column height wrap content
- flutter – Column vertical direction
- flutter – Row space between
- flutter – Row height
- flutter – Row center vertically
- flutter – Row background color