38 lines
1.1 KiB
Dart
38 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lba/res/colors.dart';
|
|
|
|
Widget buildWrappedInfo(String label, String value) {
|
|
List<String> lines = value.split('\n');
|
|
return Padding(
|
|
padding: const EdgeInsets.only(bottom: 10.0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
RichText(
|
|
text: TextSpan(
|
|
style: TextStyle(color: AppColors.productDetailDivider),
|
|
children: [
|
|
TextSpan(
|
|
text: '$label ',
|
|
style: TextStyle(color: AppColors.confirmButton),
|
|
),
|
|
TextSpan(
|
|
text: lines.first,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
if (lines.length > 1)
|
|
Padding(
|
|
padding: const EdgeInsets.only(top: 4.0),
|
|
child: Text(
|
|
lines.skip(1).join('\n'),
|
|
style: TextStyle(color: AppColors.productDetailDivider),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|