Flutter Tutorials

Flutter app development tutorials


flutter – Card border radius

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



About Me

Flutter Developer

Design a site like this with WordPress.com
Get started