getCards method
- BuildContext context
override
Implementation
@override
List<PreferenceCard> getCards(BuildContext context) {
final AppLocalizations appLocalizations = AppLocalizations.of(context);
final LocalDatabase localDatabase = context.read<LocalDatabase>();
final String userId = ProductQuery.getWriteUser().userId;
return <PreferenceCard>[
PreferenceCard(
title: appLocalizations.preferences_my_contributions_title,
tiles: <PreferenceTile>[
_buildNewProductsTile(
context,
appLocalizations,
localDatabase,
userId,
),
_buildInformerTile(context, appLocalizations, localDatabase, userId),
_buildPhotographerTile(
context,
appLocalizations,
localDatabase,
userId,
),
_buildToBeCompletedTile(
context,
appLocalizations,
localDatabase,
userId,
),
_buildAllIncompleteTile(context, appLocalizations, localDatabase),
],
),
PreferenceCard(
title: appLocalizations.preferences_my_contributions_prices_title,
tiles: <PreferenceTile>[_buildMyPricesTile(context, appLocalizations)],
),
PreferenceCard(
title: appLocalizations.preferences_contribute_title,
tiles: <PreferenceTile>[_buildCategorizeProductsTile(appLocalizations)],
),
];
}