bayu/dev #2
| @@ -3,10 +3,14 @@ import 'package:flutter/material.dart'; | |||||||
|  |  | ||||||
| class TextCaption extends StatelessWidget { | class TextCaption extends StatelessWidget { | ||||||
|   final String title, subtitle; |   final String title, subtitle; | ||||||
|  |   final TextAlign? textAlignSubtitle; | ||||||
|  |   final CrossAxisAlignment? crossAxisAlignment; | ||||||
|   const TextCaption({ |   const TextCaption({ | ||||||
|     Key? key, |     Key? key, | ||||||
|     required this.title, |     required this.title, | ||||||
|     this.subtitle = '', |     this.subtitle = '', | ||||||
|  |     this.textAlignSubtitle, | ||||||
|  |     this.crossAxisAlignment, | ||||||
|   }) : super(key: key); |   }) : super(key: key); | ||||||
|  |  | ||||||
|   @override |   @override | ||||||
| @@ -14,7 +18,7 @@ class TextCaption extends StatelessWidget { | |||||||
|     return Padding( |     return Padding( | ||||||
|       padding: const EdgeInsets.only(bottom: 32.0), |       padding: const EdgeInsets.only(bottom: 32.0), | ||||||
|       child: Column( |       child: Column( | ||||||
|         crossAxisAlignment: CrossAxisAlignment.start, |         crossAxisAlignment: crossAxisAlignment ?? CrossAxisAlignment.start, | ||||||
|         mainAxisAlignment: MainAxisAlignment.spaceBetween, |         mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||||
|         children: [ |         children: [ | ||||||
|           Text( |           Text( | ||||||
| @@ -30,6 +34,7 @@ class TextCaption extends StatelessWidget { | |||||||
|                   padding: const EdgeInsets.only(top: 8.0), |                   padding: const EdgeInsets.only(top: 8.0), | ||||||
|                   child: Text( |                   child: Text( | ||||||
|                     subtitle, |                     subtitle, | ||||||
|  |                     textAlign: textAlignSubtitle ?? TextAlign.start, | ||||||
|                     style: const TextStyle( |                     style: const TextStyle( | ||||||
|                       fontSize: 16, |                       fontSize: 16, | ||||||
|                       fontWeight: FontWeight.w500, |                       fontWeight: FontWeight.w500, | ||||||
|   | |||||||
| @@ -94,12 +94,12 @@ class TextFormView extends StatelessWidget { | |||||||
|                             name, |                             name, | ||||||
|                             style: const TextStyle( |                             style: const TextStyle( | ||||||
|                               fontSize: 16, |                               fontSize: 16, | ||||||
|                               color: ColorPalette.greyLight, |                               // color: ColorPalette.greyLight, | ||||||
|                             ), |                             ), | ||||||
|                           ), |                           ), | ||||||
|                           suffixLable ?? |                           suffixLable ?? | ||||||
|                               const Text( |                               const Text( | ||||||
|                                 " * ", |                                 "", | ||||||
|                                 style: TextStyle( |                                 style: TextStyle( | ||||||
|                                   fontSize: 16, |                                   fontSize: 16, | ||||||
|                                   color: Colors.red, |                                   color: Colors.red, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user