lastTransaction method

Widget lastTransaction()

Implementation

Widget lastTransaction() {
  return Obx(
    () => controller.listHistory.isEmpty
        ? const SizedBox()
        : Column(
            children: [
              headerLastTransaction(),
              Card(
                elevation: 4,
                shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(20),
                ),
                child: Container(
                  padding: const EdgeInsets.all(20),
                  decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(20),
                      color: Colors.white),
                  child: ListView.builder(
                    padding: EdgeInsets.zero,
                    shrinkWrap: true,
                    physics: const NeverScrollableScrollPhysics(),
                    itemBuilder: (context, index) => Column(
                      children: [
                        ItemTransactionWidget(
                          paymentHistory: controller.listHistory[index],
                        ),
                        index == controller.listHistory.length - 1
                            ? const SizedBox()
                            : Padding(
                                padding:
                                    const EdgeInsets.symmetric(vertical: 12),
                                child: Container(
                                  width: double.maxFinite,
                                  height: 0.5,
                                  color: Colors.grey,
                                ),
                              ),
                      ],
                    ),
                    itemCount: controller.listHistory.length,
                  ),
                ),
              ),
            ],
          ),
  );
}