In this example, I'm going to share the code on how to share a Container as a Circle.
Here is how the final output is going to look like.
Here is the live coding video for this example. This video demonstrates how to code by going through the documentation. Subscribe to my channel for more videos like this.
Here is the code from main.dart file that is required to create this circle.
import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); } class _MyAppState extends State<myapp> { double padValue = 0; @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar( title: Text("Container as a Circle"), ), body: Container( margin: EdgeInsets.all(100.0), decoration: BoxDecoration( color: Colors.orange, shape: BoxShape.circle ), ) ), ); } }
Hope this is helpful to you.
Thanks,
Srikanth