@@ -116,26 +116,33 @@ Widget buildImagePickerRow(
116116) {
117117 final colorScheme = Theme .of (context).colorScheme;
118118
119- return OutlinedButton .icon (
120- onPressed: onPickImage,
121- style: OutlinedButton .styleFrom (
122- foregroundColor: colorScheme.primary,
123- side: BorderSide (
124- color: isImagePicked ? colorScheme.primary : colorScheme.outline,
119+ return SizedBox (
120+ width: double .infinity,
121+ child: OutlinedButton .icon (
122+ onPressed: onPickImage,
123+ style: OutlinedButton .styleFrom (
124+ alignment: Alignment .centerLeft,
125+ foregroundColor: colorScheme.primary,
126+ side: BorderSide (
127+ color: isImagePicked ? colorScheme.primary : colorScheme.outline,
128+ ),
129+ shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (12 )),
130+ padding: const EdgeInsets .symmetric (horizontal: 12 , vertical: 12 ),
131+ ),
132+ icon: Padding (
133+ padding: const EdgeInsets .only (left: 4 ),
134+ child: Icon (
135+ isImagePicked
136+ ? FluentIcons .checkmark_circle_20_filled
137+ : FluentIcons .image_add_20_regular,
138+ size: 20 ,
139+ ),
140+ ),
141+ label: Text (
142+ isImagePicked
143+ ? context.l10n! .imagePicked
144+ : context.l10n! .pickImageFromDevice,
125145 ),
126- shape: RoundedRectangleBorder (borderRadius: BorderRadius .circular (12 )),
127- padding: const EdgeInsets .symmetric (horizontal: 16 , vertical: 12 ),
128- ),
129- icon: Icon (
130- isImagePicked
131- ? FluentIcons .checkmark_circle_20_filled
132- : FluentIcons .image_add_20_regular,
133- size: 20 ,
134- ),
135- label: Text (
136- isImagePicked
137- ? context.l10n! .imagePicked
138- : context.l10n! .pickImageFromDevice,
139146 ),
140147 );
141148}
0 commit comments