buildFinancialEntityFromAccountData function

FinancialEntityCategoryView buildFinancialEntityFromAccountData(
  1. AccountData model,
  2. int accountDataIndex,
  3. BuildContext context
)

Implementation

FinancialEntityCategoryView buildFinancialEntityFromAccountData(
  AccountData model,
  int accountDataIndex,
  BuildContext context,
) {
  final amount = usdWithSignFormat(context).format(model.primaryAmount);
  final shortAccountNumber = model.accountNumber!.substring(6);
  return FinancialEntityCategoryView(
    suffix: const Icon(Icons.chevron_right, color: Colors.grey),
    title: model.name,
    subtitle: '• • • • • • $shortAccountNumber',
    semanticsLabel: "{accountName} account {accountNumber} with {amount}.",
    // semanticsLabel: GalleryLocalizations.of(context).rallyAccountAmount(
    //   model.name,
    //   shortAccountNumber,
    //   amount,
    // ),
    indicatorColor: RallyColors.accountColor(accountDataIndex),
    indicatorFraction: 1,
    amount: amount,
  );
}