You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.3 KiB
52 lines
1.3 KiB
import 'package:flutter/material.dart';
|
|
import 'package:akuCommunity/utils/screenutil.dart';
|
|
|
|
class RoundCheckBox extends StatefulWidget {
|
|
var value = false;
|
|
|
|
Function onChanged;
|
|
|
|
String title;
|
|
|
|
RoundCheckBox({Key key, @required this.value, this.onChanged, this.title})
|
|
: super(key: key);
|
|
|
|
@override
|
|
_RoundCheckBoxState createState() => _RoundCheckBoxState();
|
|
}
|
|
|
|
class _RoundCheckBoxState extends State<RoundCheckBox> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
child: InkWell(
|
|
onTap: widget.onChanged,
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
widget.value
|
|
? Icon(
|
|
Icons.check_circle,
|
|
size: 30.sp,
|
|
color: Color(0xffffc40c),
|
|
)
|
|
: Icon(
|
|
Icons.panorama_fish_eye,
|
|
size: 30.sp,
|
|
color: Color(0xff979797),
|
|
),
|
|
SizedBox(width: 10.w),
|
|
Text(
|
|
widget.title,
|
|
style: TextStyle(
|
|
fontSize: 26.sp,
|
|
color: Color(0xff333333),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|