Skip to content

Commit

Permalink
Fix: add a missing Material Widget (#4111)
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k committed Jun 10, 2023
1 parent 386e6b6 commit 6a8edbe
Showing 1 changed file with 73 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,81 +75,84 @@ class SmoothProductCardFound extends StatelessWidget {
},
child: Hero(
tag: heroTag,
child: Ink(
decoration: BoxDecoration(
borderRadius: ROUNDED_BORDER_RADIUS,
color:
backgroundColor ?? (isDarkMode ? Colors.black : Colors.white),
),
child: SmoothCard(
elevation: elevation,
color: Colors.transparent,
padding: const EdgeInsets.all(VERY_SMALL_SPACE),
child: Row(
children: <Widget>[
SmoothMainProductImage(
product: product,
width: screenSize.width * 0.20,
height: screenSize.width * 0.20,
),
const Padding(
padding:
EdgeInsetsDirectional.only(start: VERY_SMALL_SPACE)),
Expanded(
child: SizedBox(
height: screenSize.width * 0.2,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
getProductName(product, appLocalizations),
overflow: TextOverflow.ellipsis,
style: themeData.textTheme.headlineMedium,
),
Text(
getProductBrands(product, appLocalizations),
overflow: TextOverflow.ellipsis,
style: themeData.textTheme.titleMedium,
),
Row(
children: <Widget>[
Icon(
Icons.circle,
size: 15,
color: helper.getButtonColor(isDarkMode),
),
const Padding(
padding: EdgeInsetsDirectional.only(
start: VERY_SMALL_SPACE),
),
Expanded(
child: FittedBox(
fit: BoxFit.scaleDown,
alignment: AlignmentDirectional.centerStart,
child: Text(
helper.getSubtitle(appLocalizations),
style: themeData.textTheme.bodyMedium,
child: Material(
type: MaterialType.transparency,
child: Ink(
decoration: BoxDecoration(
borderRadius: ROUNDED_BORDER_RADIUS,
color: backgroundColor ??
(isDarkMode ? Colors.black : Colors.white),
),
child: SmoothCard(
elevation: elevation,
color: Colors.transparent,
padding: const EdgeInsets.all(VERY_SMALL_SPACE),
child: Row(
children: <Widget>[
SmoothMainProductImage(
product: product,
width: screenSize.width * 0.20,
height: screenSize.width * 0.20,
),
const Padding(
padding: EdgeInsetsDirectional.only(
start: VERY_SMALL_SPACE)),
Expanded(
child: SizedBox(
height: screenSize.width * 0.2,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
getProductName(product, appLocalizations),
overflow: TextOverflow.ellipsis,
style: themeData.textTheme.headlineMedium,
),
Text(
getProductBrands(product, appLocalizations),
overflow: TextOverflow.ellipsis,
style: themeData.textTheme.titleMedium,
),
Row(
children: <Widget>[
Icon(
Icons.circle,
size: 15,
color: helper.getButtonColor(isDarkMode),
),
const Padding(
padding: EdgeInsetsDirectional.only(
start: VERY_SMALL_SPACE),
),
Expanded(
child: FittedBox(
fit: BoxFit.scaleDown,
alignment: AlignmentDirectional.centerStart,
child: Text(
helper.getSubtitle(appLocalizations),
style: themeData.textTheme.bodyMedium,
),
),
),
),
],
),
],
],
),
],
),
),
),
),
const Padding(
padding:
EdgeInsetsDirectional.only(start: VERY_SMALL_SPACE),
),
Padding(
padding: const EdgeInsets.all(VERY_SMALL_SPACE),
child: Column(
children: scores,
const Padding(
padding:
EdgeInsetsDirectional.only(start: VERY_SMALL_SPACE),
),
Padding(
padding: const EdgeInsets.all(VERY_SMALL_SPACE),
child: Column(
children: scores,
),
),
),
],
],
),
),
),
),
Expand Down

0 comments on commit 6a8edbe

Please sign in to comment.