Merge remote-tracking branch 'origin/export_module_ui_ux_enhancement' into export_module_ui_ux_enhancement
commit
29917cf4e0
@ -0,0 +1,13 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:test_sa/extensions/string_extensions.dart';
|
||||||
|
import 'package:test_sa/extensions/text_extensions.dart';
|
||||||
|
import 'package:test_sa/new_views/app_style/app_color.dart';
|
||||||
|
|
||||||
|
class InfoDateWidget extends StatelessWidget {
|
||||||
|
final String date;
|
||||||
|
|
||||||
|
InfoDateWidget(this.date, {Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) => Text(date.toServiceRequestCardFormat, textAlign: TextAlign.end, style: AppTextStyles.tinyFont2.copyWith(color: AppColor.text9Color(context)));
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:test_sa/extensions/text_extensions.dart';
|
||||||
|
import 'package:test_sa/new_views/app_style/app_color.dart';
|
||||||
|
|
||||||
|
class InfoHeaderWidget extends StatelessWidget {
|
||||||
|
final String label;
|
||||||
|
|
||||||
|
InfoHeaderWidget(this.label, {Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) => Text(label, style: AppTextStyles.bodyText.copyWith(color: AppColor.textStyleColor(context)));
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:test_sa/extensions/text_extensions.dart';
|
||||||
|
import 'package:test_sa/extensions/widget_extensions.dart';
|
||||||
|
import 'package:test_sa/new_views/app_style/app_color.dart';
|
||||||
|
|
||||||
|
class InfoTextWidget extends StatelessWidget {
|
||||||
|
String? value;
|
||||||
|
final String label;
|
||||||
|
final bool showEmptyValue;
|
||||||
|
final bool showArrow;
|
||||||
|
|
||||||
|
InfoTextWidget({required this.label, this.value, this.showEmptyValue = false, this.showArrow = false, Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
Widget text;
|
||||||
|
if (showEmptyValue) {
|
||||||
|
text = Text('$label: ${value ?? ""}', style: AppTextStyles.bodyText2.copyWith(color: AppColor.lightTextColor(context)));
|
||||||
|
} else if (value?.isNotEmpty ?? false) {
|
||||||
|
text = Text('$label: $value', style: AppTextStyles.bodyText2.copyWith(color: AppColor.lightTextColor(context)));
|
||||||
|
} else {
|
||||||
|
text = const SizedBox();
|
||||||
|
}
|
||||||
|
if (showArrow) {
|
||||||
|
text = Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
text.expanded,
|
||||||
|
const SizedBox(width: 4),
|
||||||
|
"arrow_right".toSvgAsset(width: 17, color: AppColor.primary10),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue