|
@@ -18,65 +18,69 @@ class ExamRadio extends StatelessWidget {
|
|
|
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
- return ExamCard(
|
|
|
- titleText: ExamTitle(
|
|
|
- label: currentFormObject.label,
|
|
|
- titleType: '(单选)',
|
|
|
- ),
|
|
|
- title: currentFormObject.label ?? '',
|
|
|
- content: Container(
|
|
|
- padding: const EdgeInsets.symmetric(
|
|
|
- horizontal: 5,
|
|
|
+ if (currentFormObject.showLimit ?? true) {
|
|
|
+ return ExamCard(
|
|
|
+ titleText: ExamTitle(
|
|
|
+ label: currentFormObject.label,
|
|
|
+ titleType: '(单选)',
|
|
|
),
|
|
|
- alignment: currentFormObject.span == 24
|
|
|
- ? Alignment.centerLeft
|
|
|
- : Alignment.center,
|
|
|
- width: double.infinity,
|
|
|
- child: Wrap(
|
|
|
- children: options
|
|
|
- .map(
|
|
|
- (e) => Container(
|
|
|
- padding: const EdgeInsets.all(7),
|
|
|
- child: InkWell(
|
|
|
- onTap: () => selectRaidoChange(e),
|
|
|
- borderRadius: BorderRadius.circular(50),
|
|
|
- child: Ink(
|
|
|
- decoration: BoxDecoration(
|
|
|
- border: Border.all(
|
|
|
+ title: currentFormObject.label ?? '',
|
|
|
+ content: Container(
|
|
|
+ padding: const EdgeInsets.symmetric(
|
|
|
+ horizontal: 5,
|
|
|
+ ),
|
|
|
+ alignment: currentFormObject.span == 24
|
|
|
+ ? Alignment.centerLeft
|
|
|
+ : Alignment.center,
|
|
|
+ width: double.infinity,
|
|
|
+ child: Wrap(
|
|
|
+ children: options
|
|
|
+ .map(
|
|
|
+ (e) => Container(
|
|
|
+ padding: const EdgeInsets.all(7),
|
|
|
+ child: InkWell(
|
|
|
+ onTap: () => selectRaidoChange(e),
|
|
|
+ borderRadius: BorderRadius.circular(50),
|
|
|
+ child: Ink(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ border: Border.all(
|
|
|
+ color: currentSelected == e.value
|
|
|
+ ? Colors.blue
|
|
|
+ : Colors.black26,
|
|
|
+ ),
|
|
|
+ borderRadius: const BorderRadius.all(
|
|
|
+ Radius.circular(50),
|
|
|
+ ),
|
|
|
color: currentSelected == e.value
|
|
|
? Colors.blue
|
|
|
- : Colors.black26,
|
|
|
+ : Colors.transparent,
|
|
|
),
|
|
|
- borderRadius: const BorderRadius.all(
|
|
|
- Radius.circular(50),
|
|
|
- ),
|
|
|
- color: currentSelected == e.value
|
|
|
- ? Colors.blue
|
|
|
- : Colors.transparent,
|
|
|
- ),
|
|
|
- child: Container(
|
|
|
- padding: const EdgeInsets.all(15),
|
|
|
- alignment: Alignment.center,
|
|
|
- width: 250,
|
|
|
- child: FittedBox(
|
|
|
- child: Text(
|
|
|
- e.label ?? '',
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 20,
|
|
|
- color: currentSelected == e.value
|
|
|
- ? Colors.white
|
|
|
- : Colors.black54,
|
|
|
+ child: Container(
|
|
|
+ padding: const EdgeInsets.all(15),
|
|
|
+ alignment: Alignment.center,
|
|
|
+ width: 250,
|
|
|
+ child: FittedBox(
|
|
|
+ child: Text(
|
|
|
+ e.label ?? '',
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 20,
|
|
|
+ color: currentSelected == e.value
|
|
|
+ ? Colors.white
|
|
|
+ : Colors.black54,
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
- ),
|
|
|
- )
|
|
|
- .toList(),
|
|
|
+ )
|
|
|
+ .toList(),
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
- );
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return Container();
|
|
|
+ }
|
|
|
}
|
|
|
}
|