I'm going to ask a question about flutter.
Looking at the capture, I want the height of the left and right containers to match the height of the longer one.
Since we have to fit a longer height, we want to implement it in a way that does not declare a height.
I hope someone can help me solve this.
Thank you.
this is a my code
import 'package:flutter/material.dart';
class RowTest extends StatefulWidget {
@override
_RowTestState createState() => _RowTestState();
}
class _RowTestState extends State<RowTest> {
@override
Widget build(BuildContext context) {
final Size size = MediaQuery.of(context).size;
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('simple Page'),
),
body: ListView(
shrinkWrap: true,
children: <Widget>[
Container(
color: Colors.blue,
child: Column(
children: <Widget>[
Container(
child: Column(
children: <Widget>[
for (int i = 0; i < 5; i++)
Row(
children: <Widget>[
Container(
width: 141,
margin: EdgeInsets.fromLTRB(size.width * 0.1,
8, size.width * 0.05, 8),
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
decoration: BoxDecoration(
border: Border.all(
color: Color(0xff939393),
),
color: Colors.red,
borderRadius:
BorderRadius.all(Radius.circular(5)),
),
child: Center(
child: Text(
'testededed',
textAlign: TextAlign.center,
textScaleFactor: 1.0,
style: TextStyle(
fontSize: 16,
height: 1.5,
color: Colors.white),
),
),
),
Container(
width: 141,
margin: EdgeInsets.fromLTRB(size.width * 0.05,
8, size.width * 0.1, 8),
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
decoration: BoxDecoration(
border: Border.all(
color: Color(0xff939393),
),
color: Colors.red,
borderRadius:
BorderRadius.all(Radius.circular(5)),
),
child: Center(
child: Text(
'testesttaaaaaaaaaaaaest',
textAlign: TextAlign.center,
textScaleFactor: 1.0,
style: TextStyle(
fontSize: 16,
height: 1.5,
color: Colors.white),
),
),
),
],
)
],
)),
],
),
)
],
)));
}
}