You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
826 B
Dart
35 lines
826 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
class CircleContainer extends StatelessWidget {
|
|
const CircleContainer(
|
|
{this.child,
|
|
this.color = Colors.white,
|
|
this.borderColor,
|
|
this.borderWidth = 2,
|
|
this.onTap});
|
|
|
|
final Widget child;
|
|
final Color color;
|
|
final Color borderColor;
|
|
final double borderWidth;
|
|
final Function onTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWell(
|
|
onTap: onTap,
|
|
child: Container(
|
|
child: Center(child: child),
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
color: color,
|
|
border: Border.all(
|
|
color: borderColor ?? HexColor("#707070"), width: borderWidth)),
|
|
height: 80,
|
|
width: 80,
|
|
),
|
|
);
|
|
}
|
|
}
|