From 5d4bc47adf7ea9bc0176003e3c4b59ec082964df Mon Sep 17 00:00:00 2001 From: Dian Bayu Nugroho Date: Tue, 6 Feb 2024 14:39:16 +0700 Subject: [PATCH] styling components --- lib/application/component/text_caption/text_caption.dart | 7 ++++++- lib/application/component/text_form/text_form_view.dart | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/application/component/text_caption/text_caption.dart b/lib/application/component/text_caption/text_caption.dart index 8a5d57b..3b7e67e 100644 --- a/lib/application/component/text_caption/text_caption.dart +++ b/lib/application/component/text_caption/text_caption.dart @@ -3,10 +3,14 @@ import 'package:flutter/material.dart'; class TextCaption extends StatelessWidget { final String title, subtitle; + final TextAlign? textAlignSubtitle; + final CrossAxisAlignment? crossAxisAlignment; const TextCaption({ Key? key, required this.title, this.subtitle = '', + this.textAlignSubtitle, + this.crossAxisAlignment, }) : super(key: key); @override @@ -14,7 +18,7 @@ class TextCaption extends StatelessWidget { return Padding( padding: const EdgeInsets.only(bottom: 32.0), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: crossAxisAlignment ?? CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( @@ -30,6 +34,7 @@ class TextCaption extends StatelessWidget { padding: const EdgeInsets.only(top: 8.0), child: Text( subtitle, + textAlign: textAlignSubtitle ?? TextAlign.start, style: const TextStyle( fontSize: 16, fontWeight: FontWeight.w500, diff --git a/lib/application/component/text_form/text_form_view.dart b/lib/application/component/text_form/text_form_view.dart index 8540251..ea26bb5 100644 --- a/lib/application/component/text_form/text_form_view.dart +++ b/lib/application/component/text_form/text_form_view.dart @@ -94,12 +94,12 @@ class TextFormView extends StatelessWidget { name, style: const TextStyle( fontSize: 16, - color: ColorPalette.greyLight, + // color: ColorPalette.greyLight, ), ), suffixLable ?? const Text( - " * ", + "", style: TextStyle( fontSize: 16, color: Colors.red,