buildWalletChangesEntry function

List<Widget> buildWalletChangesEntry({
  1. required CompneyDoc? compneyDoc,
  2. required WalletChangesEntry entry,
  3. required ProductDoc? productDoc,
})

Implementation

List<Widget> buildWalletChangesEntry({
  required CompneyDoc? compneyDoc,
  required WalletChangesEntry entry,
  required ProductDoc? productDoc,
}) {
  return [
    const Divider(height: 30),
    HeaderTile(
      title: "Wallet Changes (${entry.walletChangeType.isRemoved ? "-" : "+"})",
      trailing: Text(entry.amount.toString()),
    ),
    HeaderTile(
      title: "Type",
      trailing: Text(entry.walletChangeType.title),
    ),
    if (entry.message.trim().isNotEmpty)
      ListTile(
        title: const Text("Message"),
        subtitle: Text(entry.message),
      ),
  ];
}