93 lines
3.0 KiB
Dart
93 lines
3.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:satu/shared/app_colors.dart';
|
|
|
|
class InfoRow extends StatelessWidget {
|
|
const InfoRow(this.name, {this.value = '', this.onTap});
|
|
|
|
final String name;
|
|
final String? value;
|
|
final Function()? onTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Material(
|
|
color: Colors.transparent,
|
|
child: InkWell(
|
|
onTap: onTap,
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Expanded(
|
|
child: Container(
|
|
decoration: const BoxDecoration(
|
|
color: whiteColor,
|
|
border: Border(
|
|
bottom: BorderSide(
|
|
// <--- left side
|
|
color: placeholderColor,
|
|
width: 0.5,
|
|
),
|
|
top: BorderSide(
|
|
// <--- top side
|
|
color: placeholderColor,
|
|
width: 0.5,
|
|
),
|
|
),
|
|
),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: Text(
|
|
name,
|
|
style: const TextStyle(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w400,
|
|
color: textColor,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Expanded(
|
|
child: Container(
|
|
decoration: const BoxDecoration(
|
|
color: whiteColor,
|
|
border: Border(
|
|
left: BorderSide(
|
|
color: placeholderColor,
|
|
width: 0.5,
|
|
),
|
|
bottom: BorderSide(
|
|
color: placeholderColor,
|
|
width: 0.5,
|
|
),
|
|
top: BorderSide(
|
|
color: placeholderColor,
|
|
width: 0.5,
|
|
),
|
|
),
|
|
),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: Text(
|
|
'$value тг',
|
|
style: const TextStyle(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w400,
|
|
color: textColor,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|