I’m a newbie in Flutter. I’m building a project for university work. I want to have radio buttons in row directions like in the below image. But, I am having problems like render overflow, the assertion errors. There is no error until I put the right side (radio buttons row). After added radio button row, the layout is disappeared. I have tried with every knowledge I know. Please guide me how can I build the following layout.Layout design
Below is just a portion of the code I tried to know the layout. There is no error in below code, but it is just the sample code to know where the error is.
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:rootine/components/reminder_list.dart';
List<String> periodicity = [
'Daily',
'Weekly',
'Monthly',
'None',
];
class EditReminders extends StatefulWidget {
const EditReminders({super.key});
@override
State<EditReminders> createState() => _EditRemindersState();
}
class _EditRemindersState extends State<EditReminders> {
String currentPeriod = 'None';
@override
Widget build(BuildContext context) {
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Edit Reminders',
style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold, color: Color(0xff5B7A49)),
),
Container(
height: 300,
color: Colors.teal,
child: ListView(
children: [
//PestControl
ListTile(
title: Row(
children: [
Icon(
Icons.pest_control,
color: Color(0xffBB64D9),
size: 16,
),
Text(
'Pest control',
style: TextStyle(color: Color(0xff5B7A49), fontSize: 12),
)
],
),
trailing: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
width: 200,
color: Colors.white,
child: Text('Hello'),
),
Container(
color: Colors.yellow,
width: 200,
child: Text('Hello'),
)
],
),
),
],
),
),
],
);
}
}
Kaung Myat Tun is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.