2020-01-04 19:31:52 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
class StandartListRow extends StatelessWidget {
|
2020-04-27 10:23:55 +00:00
|
|
|
StandartListRow({this.title, this.value, this.isDrawTop, this.isDrawBottom});
|
2020-01-08 12:26:34 +00:00
|
|
|
|
2020-01-04 19:31:52 +00:00
|
|
|
final String title;
|
|
|
|
final String value;
|
2020-04-27 10:23:55 +00:00
|
|
|
final bool isDrawTop;
|
|
|
|
final bool isDrawBottom;
|
2020-01-04 19:31:52 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2020-04-27 10:23:55 +00:00
|
|
|
return Column(
|
|
|
|
children: <Widget>[
|
|
|
|
isDrawTop
|
|
|
|
? Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: 1,
|
2020-05-29 15:10:11 +00:00
|
|
|
color: Theme.of(context).dividerColor,
|
2020-04-27 10:23:55 +00:00
|
|
|
)
|
|
|
|
: Offstage(),
|
|
|
|
Container(
|
|
|
|
width: double.infinity,
|
2020-05-29 15:10:11 +00:00
|
|
|
color: Theme.of(context).accentTextTheme.title.backgroundColor,
|
2020-04-27 10:23:55 +00:00
|
|
|
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: 14,
|
|
|
|
fontWeight: FontWeight.w600,
|
2020-05-29 15:10:11 +00:00
|
|
|
color: Theme.of(context).primaryTextTheme.caption.color),
|
2020-04-27 10:23:55 +00:00
|
|
|
textAlign: TextAlign.left),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(top: 12),
|
|
|
|
child: Text(value,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.w600,
|
2020-05-29 15:10:11 +00:00
|
|
|
color: Theme.of(context).primaryTextTheme.title.color)),
|
2020-04-27 10:23:55 +00:00
|
|
|
)
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
isDrawBottom
|
|
|
|
? Container(
|
|
|
|
width: double.infinity,
|
|
|
|
height: 1,
|
2020-05-29 15:10:11 +00:00
|
|
|
color: Theme.of(context).dividerColor,
|
2020-04-27 10:23:55 +00:00
|
|
|
)
|
|
|
|
: Offstage(),
|
|
|
|
],
|
2020-01-04 19:31:52 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|