Skip to content

Commit

Permalink
added onTap on tile click
Browse files Browse the repository at this point in the history
  • Loading branch information
bhattabhi013 committed Apr 7, 2022
1 parent c02a37c commit 591f5b9
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions packages/smooth_app/lib/cards/product_cards/product_title_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,27 @@ class ProductTitleCard extends StatelessWidget {
final ThemeData themeData = Theme.of(context);
return Align(
alignment: Alignment.topLeft,
child: ListTile(
dense: dense,
contentPadding: EdgeInsets.zero,
title: Text(
_getProductName(appLocalizations),
style: themeData.textTheme.headline4,
).selectable(isSelectable: isSelectable),
subtitle: Text(product.brands ?? appLocalizations.unknownBrand),
trailing: Text(
product.quantity ?? '',
style: themeData.textTheme.headline3,
).selectable(isSelectable: isSelectable),
child: InkWell(
onTap: () {
if (_getProductName(appLocalizations) ==
appLocalizations.unknownProductName) {
print('Hello');
// navigate to basic details page
}
},
child: ListTile(
dense: dense,
contentPadding: EdgeInsets.zero,
title: Text(
_getProductName(appLocalizations),
style: themeData.textTheme.headline4,
).selectable(isSelectable: isSelectable),
subtitle: Text(product.brands ?? appLocalizations.unknownBrand),
trailing: Text(
product.quantity ?? '',
style: themeData.textTheme.headline3,
).selectable(isSelectable: isSelectable),
),
),
);
}
Expand Down

0 comments on commit 591f5b9

Please sign in to comment.