buildSavedPassengersTableRow method

TableRow buildSavedPassengersTableRow(
  1. String hashNo,
  2. String fullname,
  3. String gender,
  4. String passportNumber,
  5. String issuingCountry,
  6. String expiryDate,
  7. String nationality,
  8. String DOB,
  9. String type,
  10. int index,
)

Implementation

TableRow buildSavedPassengersTableRow(
    String hashNo,
    String fullname,
    String gender,
    String passportNumber,
    String issuingCountry,
    String expiryDate,
    String nationality,
    String DOB,
    String type,
    int index) {
  return TableRow(
    decoration: BoxDecoration(
        borderRadius: BorderRadius.only(
      topLeft: Radius.circular(index == 0 ? 16 : 0),
      topRight: Radius.circular(index == 0 ? 16 : 0),
      bottomLeft: Radius.circular(index == 3 ? 16 : 0),
      bottomRight: Radius.circular(index == 3 ? 16 : 0),
    )),
    children: [
      Padding(
        padding: const EdgeInsets.all(12.0),
        child: Text(
          hashNo,
          style: const TextStyle(
              fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
        ),
      ),
      Padding(
        padding: const EdgeInsets.all(12.0),
        child: Text(
          fullname,
          style: const TextStyle(
              fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
        ),
      ),
      Padding(
        padding: const EdgeInsets.all(12.0),
        child: Text(
          gender,
          style: const TextStyle(
              fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
        ),
      ),
      Padding(
        padding: const EdgeInsets.all(12.0),
        child: Text(
          passportNumber,
          style: const TextStyle(
              fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
        ),
      ),
      Padding(
        padding: const EdgeInsets.all(12.0),
        child: Text(
          issuingCountry,
          style: const TextStyle(
              fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
        ),
      ),
      Padding(
        padding: const EdgeInsets.all(12.0),
        child: Text(
          DateFormat('dd-MM-yyyy').format(DateTime.parse(expiryDate)),
          style: const TextStyle(
              fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
        ),
      ),
      Padding(
        padding: const EdgeInsets.all(12.0),
        child: Text(
          nationality,
          style: const TextStyle(
              fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
        ),
      ),
      Padding(
        padding: const EdgeInsets.all(12.0),
        child: Text(
          DateFormat('dd-MM-yyyy').format(DateTime.parse(DOB)),
          style: const TextStyle(
              fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
        ),
      ),
      Padding(
        padding: const EdgeInsets.all(12.0),
        child: Text(
          type,
          style: const TextStyle(
              fontSize: 12, fontWeight: FontWeight.w400, color: Colors.black),
        ),
      ),
      const Padding(
          padding: EdgeInsets.all(12.0), child: Icon(Icons.more_vert)),
    ],
  );
}