Untitled

 avatar
unknown
dart
a year ago
1.9 kB
1
Indexable
    List<MessageCategory> categoryList = [
      MessageCategory(name: "Promotional"),
      MessageCategory(name: "Information"),
      MessageCategory(name: "Downtime"),
      MessageCategory(name: "Reactivation"),
      MessageCategory(name: "Celebration"),
      MessageCategory(name: "Cross Sales"),
    ];
    
    SmartechAppinbox()
        .getAppInboxCategoryWiseMessageList(
            categoryList: categoryList
                .where((element) => element.selected)
                .map((e) => e.name)
                .toList())
        .then((value) {
      // Here you will get list of  appinbox messages according to selected category list
      Logger.logInfo(
          "#######1 response getAppInboxCategoryWiseMessageList: ${value.toString()}");
    });

    SmartechAppinbox()
        .getAppInboxMessagesByApiCall(
            messageLimit: 10,
            smtInboxDataType: "all",
            categoryList: categoryList
                .where((element) => element.selected)
                .map((e) => e.name)
                .toList())
        .then((value) {
      // Here you will get list of app inbox messages
      Logger.logInfo(
          "#######1 response getAppInboxMessagesByApiCall: ${value.toString()}  ${categoryList.toString()}");
    });

    // Logger.logInfo('#######1 INAPP NOTIFICATIONS: $nots');

    String smtAppInboxMessageType = "inbox";
    SmartechAppinbox()
        .getAppInboxMessageCount(smtAppInboxMessageType: smtAppInboxMessageType)
        .then((value) {
      Logger.logInfo('#######1 response getAppInboxMessageCount: $value');
      // It will return count of messages in integer format
    });

    final msgRes = await SmartechAppinbox().getAppInboxMessages();
    inspect(msgRes);

    final res = await SmartechAppinbox().getAppInboxCategoryList();

    Logger.logInfo(
        "#######1 response getAppInboxCategoryList: ${res.toString()}");
    inspect(res);
Editor is loading...
Leave a Comment