getWidget method

dynamic getWidget(
  1. String? wType,
  2. dynamic wData
)

Implementation

dynamic getWidget(String? wType, dynamic wData) {
  switch (wType) {
    case 'UikCircularClickButton':
      return UikCircularClickButton(
        WidgetType.UikCircularClickButton,
        UikCircularClickButtonProps.fromJson(wData),
      );
    // case 'UikDropDownContainer':
    //   return UikDropDownContainer(WidgetType.UikDropDownContainer,
    //       UikDropDownContainerProps.fromJson(wData));
    case 'UikSimpleColumn':
      return UikSimpleColumn(
          WidgetType.UikSimpleColumn, UikSimpleColumnProps.fromJson(wData));
    case 'UikSimpleRow':
      return UikSimpleRow(
          WidgetType.UikSimpleRow, UikSimpleRowProps.fromJson(wData));
    case 'UikCard':
      return UikCard(WidgetType.UikCard, UikCardProps.fromJson(wData));
    case 'UikEarningCard':
      return UikEarningCard(
          WidgetType.UikEarningCard, UikEarningCardProps.fromJson(wData));
    case "UikImage":
      return UikImage(WidgetType.UikImage, UikImageProps.fromJson(wData));
    case "UikThreeColumnProduct":
      return UikThreeColumnProduct(WidgetType.UikThreeColumnProduct,
          UikThreeColumnProductProps.fromJson(wData));
    case "UikText":
      return UikText(WidgetType.UikText, UikTextProps.fromJson(wData));
    case "UikButton":
      return UikButton(WidgetType.UikButton, UikButtonProps.fromJson(wData));
    case "UikMembership":
      return UikMembership(
          WidgetType.UikMembership, UikMembershipProps.fromJson(wData));
    case "UikNavbar":
      return UikNavbar(WidgetType.UikNavbar, UikNavbarProps.fromJson(wData));
    case "UikPopover":
      return UikPopover(
          WidgetType.UikPopover, UikPopoverProps.fromJson(wData));
    case "UikChips":
      return UikChips(WidgetType.UikChips, UikChipsProps.fromJson(wData));
    case "UikSwitch":
      return UikSwitch(WidgetType.UikSwitch, UikSwitchProps.fromJson(wData));
    case "UikCell":
      return UikCell(WidgetType.UikCell, UikCellProps.fromJson(wData));
    case "UikDivider":
      return UikDivider(
          WidgetType.UikDivider, UikDividerProps.fromJson(wData));
    case "UikIcon":
      return UikIcon(WidgetType.UikIcon, UikIconProps.fromJson(wData));
    case "UikPagination":
      return UikPagination(
          WidgetType.UikPagination, UikPaginationProps.fromJson(wData));
    case "UikListTiles":
      return UikListTiles(
          WidgetType.UikListTiles, UikListTilesProps.fromJson(wData));
    case "UikTextArea":
      return UikTextArea(
          WidgetType.UikTextArea, UikTextAreaProps.fromJson(wData));
    case "UikPageControl":
      return UikPageControl(
          WidgetType.UikPageControl, UikPageControlProps.fromJson(wData));

    case "UikAvatar":
      return UikAvatar(WidgetType.UikAvatar, UikAvatarProps.fromJson(wData));
    case "UikRadioButton":
      return UikRadioButton(
          WidgetType.UikRadioButton, UikRadioButtonProps.fromJson(wData));
    case "UikSlidder":
      return UikSlidder(
          WidgetType.UikSlidder, UikSlidderProps.fromJson(wData));
    case "UikListItems":
      return UikListItems(
          WidgetType.UikListItems, UikListItemsProps.fromJson(wData));

    case "UikGroupAvatar":
      return UikGroupAvatar(
          WidgetType.UikGroupAvatar, UikGroupAvatarProps.fromJson(wData));
    case "UikListTileContainer":
      return UikListTileContainer(WidgetType.UikListTileContainer,
          UikListTileContainerProps.fromJson(wData));

    case "UikTab":
      return UikTab(WidgetType.UikTab, UikTabProps.fromJson(wData));
    case "UikTabBar":
      return UikTabBar(WidgetType.UikTabBar, UikTabBarProps.fromJson(wData));
    case "UikSelect":
      return UikSelect(WidgetType.UikSelect, UikSelectProps.fromJson(wData));
    case "UikToolTip":
      return UikToolTip(
          WidgetType.UikToolTip, UikToolTipProps.fromJson(wData));

    case "UikProduct":
      return UikProduct(
          WidgetType.UikProduct, UikProductProps.fromJson(wData));
    case "UikDiscount":
      return UikDiscount(
          WidgetType.UikDiscount, UikDiscountProps.fromJson(wData));
    case "UikScrollProducts":
      return UikScrollProducts(WidgetType.UikScrollProducts,
          UikScrollProductsProps.fromJson(wData));
    case "UikTop100":
      return UikTop100(WidgetType.UikTop100, UikTop100Props.fromJson(wData));
    case "UikOtp":
      return UikOtp(WidgetType.UikOtp, UikOtpProps.fromJson(wData));
    case "UikStepper":
      return UikStepper(
          WidgetType.UikStepper, UikStepperProps.fromJson(wData));
    case "UikBagItem":
      return UikBagItem(
          WidgetType.UikBagItem, UikBagItemProps.fromJson(wData));
    case "UikTextField":
      return UikTextField(
          WidgetType.UikTextField, UikTextFieldProps.fromJson(wData));
    case "UikProductCard":
      return UikProductCard(
          WidgetType.UikProductCard, UikProductCardProps.fromJson(wData));

    case "UikSearch":
      return UikSearch(WidgetType.UikSearch, UikSearchProps.fromJson(wData));
    case "UikProductPagePagination":
      return UikProductPagePagination(WidgetType.UikProductPagePagination,
          UikProductPagePaginationProps.fromJson(wData));
    case "UikCartTextHorizontal":
      return UikCartTextHorizontal(WidgetType.UikCartTextHorizontal,
          UikCartTextHorizontalProps.fromJson(wData));
    // case "UikSnackBar" :
    //   return UikSnackBar(WidgetType.UikText, UikSnackBarProps("Snack Me"));
    case "UikVideoPlayer":
      return UikVideoPlayer(
          WidgetType.UikVideoPlayer, UikVideoPlayerProps.fromJson(wData));

    case "UikProductScreenTagsRow":
      return UikProductScreenTagsRow(WidgetType.UikProductScreenTagsRow,
          UikProductScreenTagsRowProps.fromJson(wData));
    case "UikProductPageContainer":
      return UikProductPageContainer(WidgetType.UikProductPageContainer,
          UikProductPageContainerProps.fromJson(wData));

    case "UikProductPageInformationContainer":
      return UikProductPageInformationContainer(
          WidgetType.UikProductPageInformationContainer,
          UikProductPageInformationContainerProps.fromJson(wData));
    case "UikProductCardBig":
      return UikProductCardBig(WidgetType.UikProductCardBig,
          UikProductCardBigProps.fromJson(wData));
    case "UikProductCardGrid":
      return UikProductCardGrid(WidgetType.UikProductCardGrid,
          UikProductCardGridProps.fromJson(wData));
    case "UikTags":
      return UikTags(WidgetType.UikTags, UikTagsProps.fromJson(wData));

    case "UikSortFilter":
      return UikSortFilter(
          WidgetType.UikSortFilter, UikSortFilterProps.fromJson(wData));

    case "UikHomeCardOne":
      return UikHomeCardOne(
          WidgetType.UikHomeCardOne, UikHomeCardOneProps.fromJson(wData));
    case "UikAppBar":
      return UikAppBar(WidgetType.UikAppBar, UikAppBarProps.fromJson(wData));
    case "UikHomeCardTwo":
      return UikHomeCardTwo(
          WidgetType.UikHomeCardTwo, UikHomeCardTwoProps.fromJson(wData));
    case "UikStackedImage":
      return UikImage(
          WidgetType.UikStackedImage, UikImageProps.fromJson(wData));
    case "UikHomeCardThree":
      return UikHomeCardThree(
          WidgetType.UikHomeCardThree, UikHomeCardThreeProps.fromJson(wData));
    case "UikHomeCardEleven":
      return UikHomeCardEleven(WidgetType.UikHomeCardEleven,
          UikHomeCardElevenProps.fromJson(wData));
    case "UikHomeCardTwelve":
      return UikHomeCardTwelve(WidgetType.UikHomeCardTwelve,
          UikHomeCardTwelveProps.fromJson(wData));
    case "UikHomeCardFour":
      return UikProductPageInformationContainer(WidgetType.UikHomeCardFour,
          UikProductPageInformationContainerProps.fromJson(wData));
    case "UikHomeCardFive":
      return UikHomeCardFive(
          WidgetType.UikHomeCardFive, UikHomeCardFiveProps.fromJson(wData));

    case "UikOrderAgainProduct":
      return UikOrderAgainProduct(WidgetType.UikOrderAgainProduct,
          UikOrderAgainProductProps.fromJson(wData));
    case "UikScrollOrderAgainProduct":
      return UikScrollOrderAgainProduct(WidgetType.UikScrollOrderAgainProduct,
          UikScrollOrderAgainProductProps.fromJson(wData));
    case "UikFilterRowThreeComponent":
      return UikFilterRowThreeComponent(WidgetType.UikFilterRowThreeComponent,
          UikFilterRowThreeComponentProps.fromJson(wData));
    case "UikThreeDivider":
      return UikThreeDivider(
          WidgetType.UikThreeDivider, UikThreeDividerProps.fromJson(wData));
    case "UikJarItem":
      return UikJarItem(
          WidgetType.UikJarItem, UikJarItemProps.fromJson(wData));
    case "UikMyOrder":
      return UikMyOrder(
          WidgetType.UikMyOrder, UikMyOrderProps.fromJson(wData));
    case "UikShortAndFilter":
      return UikShortAndFilter(WidgetType.UikShortAndFilter,
          UikShortAndFilterProps.fromJson(wData));
    case "UikTotal":
      return UikTotal(WidgetType.UikTotal, UikTotalProps.fromJson(wData));
    case "UikHeadline":
      return UikHeadline(
          WidgetType.UikHeadline, UikHeadlineProps.fromJson(wData));
    case "UikUploadPhoto":
      return UikUploadPhoto(
          WidgetType.UikUploadPhoto, UikUploadPhotoProps.fromJson(wData));
    case "UikContainerText":
      return UikContainerText(
          WidgetType.UikContainerText, UikContainerTextProps.fromJson(wData));
    case "UikFilterOption":
      return UikFilterOption(
          WidgetType.UikFilterOption, UikFilterOptionProps.fromJson(wData));
    case "UikThreeComponentRow":
      return UikThreeComponentRow(WidgetType.UikThreeComponentRow,
          UikThreeComponentRowProps.fromJson(wData));
    case "UikTextRadioButton":
      return UikTextRadioButton(WidgetType.UikTextRadioButton,
          UikTextRadioButtonProps.fromJson(wData));
    case "UikProductInformationComp":
      return UikProductInformationComp(WidgetType.UikProductInformationComp,
          UikProductInformationCompProps.fromJson(wData));
    case "UikTwoComponentRow":
      return UikTwoComponentRow(WidgetType.UikTwoComponentRow,
          UikTwoComponentRowProps.fromJson(wData));
    case "UikProductInformation":
      return UikProductInformation(WidgetType.UikProductInformation,
          UikProductInformationProps.fromJson(wData));
    case "UikActionSheet":
      return UikActionSheet(
          WidgetType.UikActionSheet, UikActionSheetProps.fromJson(wData));
    case "UikNoInternet":
      return UikNoInternet(
          WidgetType.UikNoInternet, UikNoInternetProps.fromJson(wData));
    case "UikTopBar":
      return UikTopBar(WidgetType.UikTopBar, UikTopBarProps.fromJson(wData));
    case "UikListTile":
      return UikListTile(
          WidgetType.UikListTile, UikListTileProps.fromJson(wData));
    case "UikScreenTitleSubtitle":
      return UikScreenTitleSubtitle(WidgetType.UikScreenTitleSubtitle,
          UikScreenTitleSubtitleProps.fromJson(wData));
    case "UiklistViewBuilder":
      return UikListViewBuilder(WidgetType.UiklistViewBuilder,
          UikListViewBuilderProps.fromJson(wData));
    case "UikCenterRow":
      return UikCenterRow(
          WidgetType.UikCenterRow, UikCenterRowProps.fromJson(wData));
    case "UikSpacer":
      return UikSpacer(WidgetType.UikSpacer, UikSpacerProps.fromJson(wData));
    case "UikSelectFiles":
      return UikSelectFiles(
          WidgetType.UikSelectFiles, UikSelectFilesProps.fromJson(wData));
    case "UikNewReviewPage":
      return UikNewReview(
          WidgetType.UikNewReviewPage, UikNewReviewProps.fromJson(wData));

    case "UikNewRatingPage":
      return UikRating(
          WidgetType.UikNewRatingPage, UikRatingProps.fromJson(wData));

    case "UikStackImageIconPage":
      return UikStackImageIcon(WidgetType.UikStackImageIconPage,
          UikStackImageIconProps.fromJson(wData));

    case "UikReviewPage":
      return UikReview(
          WidgetType.UikReviewPage, UikReviewProps.fromJson(wData));

    case "UikSortPage":
      return UikSortPage(
          WidgetType.UikSortPage, UikSortPageProps.fromJson(wData));
    // case "UikAddress":
    //   return UikAddress(WidgetType.UikText, UikAddressProps.fromJson(wData));
    case "UikIconText":
      return UikIconText(
          WidgetType.UikIconText, UikIconTextProps.fromJson(wData));
    case "UikProfile":
      return UikProfile(
          WidgetType.UikProfile, UikProfileProps.fromJson(wData));
    case "UikTextIconButton":
      return UikTextIconButton(WidgetType.UikTextIconButton,
          UikTextIconButtonProps.fromJson(wData));
    case "UikHomeCardSeven":
      return UikHomeCardSeven(
          WidgetType.UikHomeCardSeven, UikHomeCardSevenProps.fromJson(wData));
    case "UikHomeCardTen":
      return UikHomeCardTen(
          WidgetType.UikHomeCardTen, UikHomeCardTenProps.fromJson(wData));
    case "UikHomeCardEight":
      return UikHomeCardEight(
          WidgetType.UikHomeCardEight, UikHomeCardEightProps.fromJson(wData));
    case "UikHomeCardNine":
      return UikHomeCardNine(
          WidgetType.UikHomeCardNine, UikHomeCardNineProps.fromJson(wData));
    case "UikRowText":
      return UikRowText(
          WidgetType.UikRowText, UikRowTextProps.fromJson(wData));
    case "UikTextChip":
      return UikTextChip(
          WidgetType.UikTextChip, UikTextChipProps.fromJson(wData));
    case "UikTextChipList":
      return UikTextChipList(
          WidgetType.UikTextChipList, UikTextChipListProps.fromJson(wData));
    case "UikProductImageTitlePriceCard":
      return UikProductImageTitlePriceCard(
          WidgetType.UikProductImageTitlePriceCard,
          UikProductImageTitlePriceCardProps.fromJson(wData));
    case "UikMultiButtonRow":
      return UikMultiButtonRow(WidgetType.UikMultiButtonRow,
          UikMultiButtonRowProps.fromJson(wData));
    case "UikRadioButtonList":
      return UikRadioButtonList(WidgetType.UikRadioButtonList,
          UikRadioButtonListProps.fromJson(wData));
    case "UikColumn":
      return UikColumn(WidgetType.UikColumn, UikColumnProps.fromJson(wData));
    case "UikRow":
      return UikRow(WidgetType.UikRow, UikRowProps.fromJson(wData));
    case "UikAccordion":
      return UikAccordionNew(
          WidgetType.UikAccordion, UikAccordionNewProps.fromJson(wData));
    case "UikTextDivider":
      return UikTextDivider(
          WidgetType.UikTextDivider, UikTextDividerProps.fromJson(wData));
    case "UikRowListItem":
      return UikRowListItem(
          WidgetType.UikRowListItem, UikRowListItemProps.fromJson(wData));
    case "UikDropDown":
      return UikDropDown(
          WidgetType.UikDropDown, UikDropDownProps.fromJson(wData));
    case "UikThreeColumnTile":
      return UikThreeColumnTile(WidgetType.UikThreeColumnTile,
          UikThreeColumnTileProps.fromJson(wData));
    case "UikThreeColumnTileList":
      return UikThreeColumnTileList(WidgetType.UikThreeColumnTileList,
          UikThreeColumnTileListProps.fromJson(wData));
    case "UikAnimatedImage":
      return UikAnimatedImage(
          WidgetType.UikAnimatedImage, UikAnimatedImageProps.fromJson(wData));
    case "UikThreeTextColumn":
      return UikThreeTextCard(WidgetType.UikThreeTextColumn,
          UikThreeTextCardProps.fromJson(wData));
    case "UikMyAgentReward":
      return UikMyAgentReward(
          WidgetType.UikMyAgentReward, UikMyAgentRewardProps.fromJson(wData));
    case "UikMyCustomerDetails":
      return UikMyCustomerDetails(WidgetType.UikMyCustomerDetails,
          UikMyCustomerDetailsProps.fromJson(wData));
    case "UikListItemCustomer":
      return UikListItemCustomer(WidgetType.UikListItemCustomer,
          UikListItemCustomerProps.fromJson(wData));
    case "UikHtmlRenderer":
      return UikHtmlRenderer(
          WidgetType.UikHtmlRenderer, UikHtmlRendererProps.fromJson(wData));
    case "UikAccordionNew":
      return UikAccordionNew(
          WidgetType.UikAccordionNew, UikAccordionNewProps.fromJson(wData));
    case "UikVideoPlayerNew":
      return UikVideoPlayerNew(WidgetType.UikVideoPlayerNew,
          UikVideoPlayerNewProps.fromJson(wData));
    case "UikLottieView":
      return UikLottieView(
          WidgetType.UikLottieView, UikLottieViewProps.fromJson(wData));
    case "UikLokalAcademyCard":
      return UikLokalAcademyCard(WidgetType.UikLokalAcademyCard,
          UikLokalAcademyCardProps.fromJson(wData));
    case "UikMyOrderCard":
      return UikMyOrderCard(
          WidgetType.UikMyOrderCard, UikMyOrderCardProps.fromJson(wData));
    case "UikmyAgent":
      return UikMyAgent(
          WidgetType.UikMyAgent, UikMyAgentProps.fromJson(wData));
    case "UikOrderProductCard":
      return UikOrderProductCard(WidgetType.UikOrderProductCard,
          UikOrderProductCardProps.fromJson(wData));
    case "UikExpandedText":
      return UikExpandedText(
          WidgetType.UikExpandedText, UikExpandedTextProps.fromJson(wData));
    case "UikScrollCarousel":
      return UikScrollCarousel(WidgetType.UikScrollCarousel,
          UikScrollCarouselProps.fromJson(wData));
    case "UikContainer":
      return UikContainer(
          WidgetType.UikContainer, UikContainerProps.fromJson(wData));
    case "UikJob":
      return UikJob(WidgetType.UikJob, UikJobProps.fromJson(wData));
    case "UikJobBox":
      return UikJobBox(WidgetType.UikJobBox, UikJobBoxProps.fromJson(wData));
    case "UikListView":
      return UikListView(
          WidgetType.UikListView, UikListViewProps.fromJson(wData));
    case "UikFilterContainer":
      return UikFilterContainer(WidgetType.UikFilterContainer,
          UikFilterContainerProps.fromJson(wData));
    case "UikStack":
      return UikStack(WidgetType.UikStack, UikStackProps.fromJson(wData));
    case "UikAccountCompletion":
      return UikAccountCompletion(
          WidgetType.UikAccordion, UikAccountCompletionProps.fromJson(wData));
    case "UikPassProgress":
      return UikPassProgress(
          WidgetType.UikText, UikPassProgressProps.fromJson(wData));
    case "UikNotificationContainer":
      return UikNotificationContainer(WidgetType.UikNotificationContainer,
          UikNotificationContainerProps.fromJson(wData));
    case "UikListTab":
      return UikListTab(
          WidgetType.UikAccordion, UikListTabProps.fromJson(wData));
    default:
      return UikText(WidgetType.UikText, UikTextProps.fromJson(wData));
  }
}