I'm having a render overflow error where text goes off the screen..I'm new to flutter and I can't for the life of me figure out how to fix it. Any pointers on how I could resolve it? I've tried a bunch of different things based on other questions but for whatever reason none of them worked.
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:save_extra_money/shared/globals/ProjectColors.dart';
import '../../model/Transaction.dart';
class DetailRow extends StatelessWidget {
final String fieldName;
final String text;
final Color textColor;
const DetailRow({
Key? key,
required this.text,
required this.fieldName,
this.textColor = ProjectColors.normalText,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
padding: EdgeInsets.all(5),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
alignment: Alignment.topLeft,
color: Colors.white,
child: Container(
child: Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
fieldName,
style: TextStyle(color: Colors.black54),
),
Text(
text,
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 30,
color: textColor),
),
],
),
),
),
),
],
),
);
}
}
