我正在尝试将 ListTile 放入卡片中,但出现渲染框错误
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderPhysicalShape#c872a relayoutBoundary=up7
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'
The relevant error-causing widget was
Card
lib/…/task/make_offer.dart:100
ListView(children: [
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 16.0,
vertical: 10.0,
),
child: TextFormField(
controller: _offerController,
textInputAction: TextInputAction.next,
// textCapitalization: TextCapitalization.words,
// maxLength: 40,
decoration: const InputDecoration(
hintText: '5-9999',
prefixIcon: Icon(Icons.attach_money_rounded),
labelText: 'Your Offer',
),
keyboardType: TextInputType.number,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.singleLineFormatter
],
onChanged: (offerAmount) => _offerAmount = offerAmount as int,
),
),
Card(
child: ListTile(
leading: Text('Fee'),
trailing: Text(_offerController.toString())))
]),