storeCategory method

Widget storeCategory(
  1. BuildContext context
)

Implementation

Widget storeCategory(BuildContext context) {
  return Obx(() {
    if (controller.storeCategoryList.isEmpty) {
      controller.fetchStoreCategory(context);
      return Utils.loader();
    } else {
      return Container(
          margin: const EdgeInsets.symmetric(vertical: (10)),
          child: DropdownWidget(
            currentItem: controller.storeCategory.value,
            items: controller.storeCategoryList,
            title: Strings.storeCategory,
            itemCallBack: (value) {
              controller.storeCategory.value = value;
            },
            validator: (value) =>
                value == null ? Strings.fieldCantBeEmpty : null,
          ));
    }
  });
}