Flutter Tutorials

Flutter app development tutorials


flutter – Card circle shape

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 Shape")
              ),
              body: bodyContent()
          )
      )
  );
}

bodyContent(){
  return const Center(
      child: SizedBox.square(
          dimension: 300,
          child: Card(
              elevation: 6,
              margin: EdgeInsets.all(12),
              shape: CircleBorder(),
              clipBehavior: Clip.antiAliasWithSaveLayer
          )
      )
  );
}

More flutter tutorials



About Me

Flutter Developer

Design a site like this with WordPress.com
Get started