Untitled

mail@pastecode.io avatar
unknown
dart
2 years ago
3.8 kB
1
Indexable
Never
if (typelink == ‘3’) {
      //category
    }
    if (typelink == ‘4’) {
      //book
              playListNotifier.changeIndex(0);
        bookViewNotifier.allComments.clear();
        bookViewNotifier.firstTimeComments = true;
        bookViewNotifier.resetPagination();
        bookViewNotifier.getAllComments(bookId!);
        bookViewNotifier.getBookDetails(bookId: book.bookId!, withRoute: true);
    }
    if (typelink == ‘5’) {
      //bodcast
    }
    if (typelink == ‘6’) {
      //markiting
    }
    if (typelink == ‘7’) {
      //podcast
    }
    if (typelink == ‘8’) {
      //translator
      categoriesNotifier.selections.id = cont.id;
        categoriesNotifier.selections.type = 'translators';
        categoriesNotifier.resetPageIndex();
        await categoriesNotifier
            .getAllCategories(categoriesNotifier.selections);

        await Navigator.of(context).push(
          MaterialPageRoute(
            builder: (BuildContext context) => IntegratedFollowingDetailsPage(
              contributor:
                  categoriesNotifier.contributor ?? ContributorCategories(),
              contributorBooks: categoriesNotifier.subcategoriesBooks,
              roleId: 4,
              backToContributor: false,
            ),
          ),
        );
    }
    if (typelink == ‘9’) {
      //publisher
      categoriesNotifier.selections.id = cont.id;
        categoriesNotifier.selections.type = 'publishers';
        categoriesNotifier.resetPageIndex();
        await categoriesNotifier
            .getAllCategories(categoriesNotifier.selections);

        await Navigator.of(context).push(
          MaterialPageRoute(
            builder: (BuildContext context) => IntegratedFollowingDetailsPage(
              contributor:
                  categoriesNotifier.contributor ?? ContributorCategories(),
              contributorBooks: categoriesNotifier.subcategoriesBooks,
              roleId: 3,
              backToContributor: false,
            ),
          ),
        );
    }
    if (typelink == ‘10’) {
      //writer
      categoriesNotifier.selections.id = cont.id;
        categoriesNotifier.selections.type = 'authors';
        categoriesNotifier.resetPageIndex();
        await categoriesNotifier
            .getAllCategories(categoriesNotifier.selections);

        await Navigator.of(context).push(
          MaterialPageRoute(
            builder: (BuildContext context) => IntegratedFollowingDetailsPage(
              contributor:
                  categoriesNotifier.contributor ?? ContributorCategories(),
              contributorBooks: categoriesNotifier.subcategoriesBooks,
              roleId: 1,
              backToContributor: false,
            ),
          ),
        );
    }
    if (typelink == ‘11’) {
      //reader
      categoriesNotifier.selections.id = cont.id;
        categoriesNotifier.selections.type = 'readers';
        categoriesNotifier.resetPageIndex();
        await categoriesNotifier
            .getAllCategories(categoriesNotifier.selections);

        await Navigator.of(context).push(
          MaterialPageRoute(
            builder: (BuildContext context) => IntegratedFollowingDetailsPage(
              contributor:
                  categoriesNotifier.contributor ?? ContributorCategories(),
              contributorBooks: categoriesNotifier.subcategoriesBooks,
              roleId: 2,
              backToContributor: false,
            ),
          ),
        );
    }
    if (typelink == ‘12’) {
      //purchase
      Navigator.push(
              context,
              MaterialPageRoute(
                builder: (BuildContext context) => const SupscriptionPage(),
              ),
            );
    }