getAlerts static method

List<AlertData> getAlerts(
  1. BuildContext context
)

Implementation

static List<AlertData> getAlerts(BuildContext context) {
  String amount = usdWithSignFormat(context, decimalDigits: 0).format(120);
  String percent = percentFormat(context, decimalDigits: 0).format(0.9);
  return <AlertData>[
    AlertData(
      message:
          "Beware: you’ve used up $percent of your shopping budget for this month.",
      // message: GalleryLocalizations.of(context)
      //     .rallyAlertsMessageHeadsUpShopping(
      //         percentFormat(context, decimalDigits: 0).format(0.9)),
      iconData: Icons.sort,
    ),
    AlertData(
      message: "You’ve spent $amount on restaurants this week.",
      // message: GalleryLocalizations.of(context)
      //     .rallyAlertsMessageSpentOnRestaurants(
      //         usdWithSignFormat(context, decimalDigits: 0).format(120)),
      iconData: Icons.sort,
    ),
    AlertData(
      message: "You’ve spent $amount in ATM fees this month",
      // message: GalleryLocalizations.of(context).rallyAlertsMessageATMFees(
      //     usdWithSignFormat(context, decimalDigits: 0).format(24)),
      iconData: Icons.credit_card,
    ),
    AlertData(
      message:
          "Good work! Your current account is {percent} higher than last month.",
      // message: GalleryLocalizations.of(context)
      //     .rallyAlertsMessageCheckingAccount(
      //         percentFormat(context, decimalDigits: 0).format(0.04)),
      iconData: Icons.attach_money,
    ),
    AlertData(
      message:
          "{count,plural, =1{Increase your potential tax deduction! Assign categories to 1 unassigned transaction.}other{Increase your potential tax deduction! Assign categories to {count} unassigned transactions.}}",
      // message: GalleryLocalizations.of(context)
      //     .rallyAlertsMessageUnassignedTransactions(16),
      iconData: Icons.not_interested,
    ),
  ];
}