will-play/lib/views/createRoom/widget/CustomRadio.dart

90 lines
2.6 KiB
Dart

// import 'package:flutter/material.dart';
// class CustomRadioWidget extends StatefulWidget {
// // final List list;
// CustomRadioWidget({Key? key}) : super(key: key);
// @override
// State<CustomRadioWidget> createState() => _CustomRadioWidgetState();
// }
// class _CustomRadioWidgetState extends State<CustomRadioWidget> {
// Widget _buttonstyle(theme, parameter) {
// return Container(
// child: Stack(
// children: [
// Container(
// width: 80.0,
// height: 40.0,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.all(Radius.circular(2)),
// border: Border.all(
// width: 1,
// color: parameter.isSelected
// ? theme
// : Color.fromRGBO(222, 222, 222, 1)),
// ),
// child: Center(
// child: Text(
// "${parameter.buttonText}",
// style: TextStyle(
// color: parameter.isSelected
// ? theme
// : Color.fromRGBO(51, 51, 51, 1)),
// ),
// ),
// ),
// ],
// ),
// );
// }
// @override
// Widget build(BuildContext context) {
// return Container(
// padding: EdgeInsets.fromLTRB(0, 0, 0, 25),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Text(
// '房间模式',
// textAlign: TextAlign.left,
// style: TextStyle(
// fontSize: 14.0,
// color: Color.fromRGBO(153, 153, 153, 1),
// ),
// ),
// SizedBox(height: 15),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: List<Widget>.generate(widget.list.length, (index) {
// return InkWell(
// child: _buttonstyle(
// Color.fromRGBO(21, 185, 208, 1), widget.list[index]),
// onTap: () {
// setState(() {
// widget.list
// .forEach((element) => element.isSelected = false);
// print(widget.list[index].buttonText);
// widget.list[index].isSelected = true;
// });
// },
// );
// }),
// ),
// ],
// ),
// );
// }
// }
// class RadioModel {
// bool isSelected;
// final String buttonText;
// RadioModel(
// this.isSelected,
// this.buttonText,
// );
// }