fix: layout MessageItem and throw exception
This commit is contained in:
parent
2609f1bdda
commit
2f8ce24295
|
@ -239,91 +239,116 @@ Widget liberationDynamicListView(
|
|||
Widget messageHistoryItem(BuildContext context, dynamic jsonBody) {
|
||||
log(jsonBody.toString());
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
child: Card(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
child: Container(
|
||||
// height: 100,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Icon(
|
||||
jsonBody['MSG_DESTINO_TP'] == 'T'
|
||||
? Icons.group
|
||||
: Icons.person,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
size: 25,
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
jsonBody['MSG_ORIGEM_DESC'].toString(),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 15,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||
child: Card(
|
||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||
child: Container(
|
||||
// height: 100,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 15.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Icon(
|
||||
jsonBody['MSG_DESTINO_TP'] == 'T'
|
||||
? Icons.group
|
||||
: Icons.person,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
size: 25,
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
jsonBody['MSG_ORIGEM_DESC'].toString(),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 15,
|
||||
color: FlutterFlowTheme.of(context).primary,
|
||||
),
|
||||
overflow: TextOverflow.fade,
|
||||
),
|
||||
overflow: TextOverflow.fade,
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(width: 10)),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 5),
|
||||
child: Icon(
|
||||
Icons.history,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
size: 15,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
jsonBody['MSG_DATE'].toString(),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 10,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(width: 20)),
|
||||
),
|
||||
].divide(const SizedBox(height: 4)),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text(
|
||||
jsonBody['MSG_TEXTO'].toString(),
|
||||
].divide(const SizedBox(width: 10)),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 5),
|
||||
child: Icon(
|
||||
Icons.history,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
size: 15,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
jsonBody['MSG_DATE'].toString(),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 10,
|
||||
color:
|
||||
FlutterFlowTheme.of(context).customColor6,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(width: 15)),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 5),
|
||||
child: Icon(
|
||||
Icons.message,
|
||||
color: FlutterFlowTheme.of(context).customColor6,
|
||||
size: 15,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
jsonBody['MSG_TEXTO'].toString(),
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(width: 15)),
|
||||
),
|
||||
].divide(const SizedBox(height: 4)),
|
||||
),
|
||||
],
|
||||
),
|
||||
// Row(
|
||||
// children: [
|
||||
// Icon(
|
||||
// Icons.message,
|
||||
// color: FlutterFlowTheme.of(context).customColor6,
|
||||
// size: 15,
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Text(
|
||||
// jsonBody['MSG_TEXTO'].toString(),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ]
|
||||
// .addToStart(const SizedBox(width: 8))
|
||||
// .addToEnd(const SizedBox(width: 8))),
|
||||
].divide(
|
||||
const SizedBox(height: 8),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue