circularbox 1.1.1+1 circularbox: ^1.1.1+1 copied to clipboard
Circular Box - Convert your container to special box with radius. Put your image in this box and make it circular or make your buttons with circular radius.
import 'package:flutter/material.dart';
import 'package:circularbox/circularbox.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Circular Box Example',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Simple circular box example'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
bool isVisible = false;
@override
void initState() {
// TODO: implement initState
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
// Circular box with 10 radius and 100 height and width. You can use with any widget as child
body: CircularBox(
radius: 10,
child: Container(
width: 100,
height: 100,
)), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}