main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
theme: ThemeData(primarySwatch: Colors.pink),
home: Scaffold(
appBar: AppBar(
title: const Text("Flutter - Card Border Radius")
),
body: bodyContent()
)
)
);
}
bodyContent(){
return Card(
elevation: 6,
margin: const EdgeInsets.all(16),
shape: RoundedRectangleBorder(
side: const BorderSide(color: Colors.blueGrey, width: 2),
borderRadius: BorderRadius.circular(24)
),
child: const Padding(
padding: EdgeInsets.all(16),
child: Text("Lorem Ipsum is simply dummy text of the printing"
" and typesetting industry. Lorem Ipsum has been the"
" industry's standard dummy text ever since the 1500s,"
" when an unknown printer took a galley of type and"
" scrambled it to make a type specimen book.",
style: TextStyle(fontWeight: FontWeight.bold)
)
)
);
}
More flutter tutorials
- flutter – DecoratedBox border
- flutter – BoxDecoration image
- flutter – BoxDecoration shadow
- flutter – BoxDecoration opacity
- flutter – BoxDecoration background color
- flutter – How to use FittedBox
- flutter – FittedBox text
- flutter – How to use LimitedBox
- flutter – How to use GridView
- flutter – How to create horizontal GridView
- flutter – GridView horizontal scroll
- flutter – GridView extent
- flutter – GridView child aspect ratio
- flutter – How to use Card
- flutter – Card height