Skip to content

Commit

Permalink
tweaked phone card
Browse files Browse the repository at this point in the history
  • Loading branch information
mikezamayias committed Jan 23, 2022
1 parent 3fd099b commit 2586e59
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
27 changes: 17 additions & 10 deletions lib/pages/phones/view/widgets/phone_specifications_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,26 @@ class PhoneSpecificationsCard extends StatelessWidget {
padding: const EdgeInsets.all(21),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CachedNetworkImage(
imageUrl: phone.imageUrl,
placeholder: (context, url) =>
const CircularProgressIndicator(),
errorWidget: (context, url, error) => Icon(
Icons.error,
color: Colors.red.shade700,
Expanded(
flex: 1,
child: CachedNetworkImage(
imageUrl: phone.imageUrl,
errorWidget: (context, url, error) => Icon(
Icons.error,
color: Colors.red.shade700,
),
progressIndicatorBuilder: (context, url, downloadProgress) {
return CircularProgressIndicator(
value: downloadProgress.progress,
);
},
fit: BoxFit.contain,
),
fit: BoxFit.contain,
),
Flexible(
Expanded(
flex: 3,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
Expand Down
7 changes: 6 additions & 1 deletion lib/pages/phones/view/widgets/specification_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ class SpecificationField extends StatelessWidget {
TextSpan(
text: '$fieldName ',
style: const TextStyle(
fontWeight: FontWeight.w900, color: Colors.orange),
fontWeight: FontWeight.w900,
color: Colors.orange,
),
),
TextSpan(
text: fieldValue,
style: const TextStyle(
overflow: TextOverflow.ellipsis,
),
),
],
),
Expand Down

0 comments on commit 2586e59

Please sign in to comment.