2020-08-27 19:42:28 +00:00
|
|
|
import 'package:flutter/cupertino.dart';
|
2020-01-04 19:31:52 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class StandartListRow extends StatelessWidget {
|
2020-07-06 20:09:03 +00:00
|
|
|
StandartListRow(
|
|
|
|
{this.title,
|
|
|
|
this.value,
|
2020-08-27 19:42:28 +00:00
|
|
|
this.titleFontSize = 14,
|
|
|
|
this.valueFontSize = 16,
|
2021-01-06 13:34:04 +00:00
|
|
|
this.image});
|
2020-01-08 12:26:34 +00:00
|
|
|
|
2020-01-04 19:31:52 +00:00
|
|
|
final String title;
|
|
|
|
final String value;
|
2020-08-27 19:42:28 +00:00
|
|
|
final double titleFontSize;
|
|
|
|
final double valueFontSize;
|
|
|
|
final Image image;
|
2020-01-04 19:31:52 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2021-01-06 13:34:04 +00:00
|
|
|
return Container(
|
|
|
|
width: double.infinity,
|
|
|
|
color: Theme.of(context).backgroundColor,
|
|
|
|
child: Padding(
|
|
|
|
padding:
|
|
|
|
const EdgeInsets.only(left: 24, top: 16, bottom: 16, right: 24),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
Text(title,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: titleFontSize,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
color:
|
|
|
|
Theme.of(context).primaryTextTheme.overline.color),
|
|
|
|
textAlign: TextAlign.left),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(top: 12),
|
|
|
|
child: Row(
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
child: Text(value,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: valueFontSize,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
color: Theme.of(context)
|
|
|
|
.primaryTextTheme
|
|
|
|
.title
|
|
|
|
.color)),
|
2020-08-27 19:42:28 +00:00
|
|
|
),
|
2021-01-06 13:34:04 +00:00
|
|
|
image != null
|
|
|
|
? Padding(
|
|
|
|
padding: EdgeInsets.only(left: 24),
|
|
|
|
child: image,
|
|
|
|
)
|
|
|
|
: Offstage()
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
]),
|
|
|
|
),
|
2020-01-04 19:31:52 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|