cake_wallet/lib/src/widgets/standart_list_row.dart

67 lines
2 KiB
Dart
Raw Normal View History

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,
this.isDrawTop = false,
this.isDrawBottom = false});
2020-01-08 12:26:34 +00:00
2020-01-04 19:31:52 +00:00
final String title;
final String value;
final bool isDrawTop;
final bool isDrawBottom;
2020-01-04 19:31:52 +00:00
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
isDrawTop
2020-07-06 20:09:03 +00:00
? Container(
width: double.infinity,
height: 1,
color: Theme.of(context).dividerColor,
)
: Offstage(),
Container(
width: double.infinity,
color: Theme.of(context).accentTextTheme.title.backgroundColor,
child: Padding(
2020-07-06 20:09:03 +00:00
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-07-06 20:09:03 +00:00
color:
Theme.of(context).primaryTextTheme.caption.color),
textAlign: TextAlign.left),
Padding(
padding: const EdgeInsets.only(top: 12),
child: Text(value,
style: TextStyle(
fontSize: 16,
2020-07-06 20:09:03 +00:00
fontWeight: FontWeight.w500,
color: Theme.of(context)
.primaryTextTheme
.title
.color)),
)
]),
),
),
isDrawBottom
2020-07-06 20:09:03 +00:00
? Container(
width: double.infinity,
height: 1,
color: Theme.of(context).dividerColor,
)
: Offstage(),
],
2020-01-04 19:31:52 +00:00
);
}
}