tencent cloud

All product documents
Tencent Cloud Super App as a Service
Searching for the Mini Program
Last updated: 2025-04-03 17:53:12
Searching for the Mini Program
Last updated: 2025-04-03 17:53:12

Search mini programs

keyWord: The keyword used to search the mini program.
searchAppType:the scope to be searched, refer to SearchAppType.
category: category information of the mini program.
pageInfo:specify the page index and size when searching.
Future<SearchMiniAppResult?> searchMiniApp(
String keyword, {
SearchAppType searchAppType = SearchAppType.searchAppTypeAll,
CategoryInfo? category = const CategoryInfo(),
PageInfo? pageInfo = const PageInfo()
})
Example:
Future<void> doSearch() async {
FocusScope.of(context).unfocus();
final result = await _tcmppFlutterPlugin
.searchMiniApp(
searchController.text,
category: CategoryInfo(
mainCategory: firstTypeController.text,
subCategory: secondTypeController.text
)
)
.catchError((err) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(err.toString())));
});

setState(() {
_appInfoList.clear();
if (result != null && result.appInfoList.isNotEmpty) {
_appInfoList.addAll(result.appInfoList);
_emptyText = 'Total: ${result.total}, Current: ${result.appInfoList.length}';
} else {
_emptyText = 'No mini app found';
}
});
}

Get categories

Get all categories
existMnpOnly:Whether to get only the list of currently published mini programs.
searchAppType:the scope to be searched, refer to SearchAppType.
Future<List<CategoryInfo>?> getCategoryList(bool existMnpOnly,SearchAppType searchAppType)
Example:

List<CategoryInfo>? ctList = await _tcmppFlutterPlugin.getCategoryList(true, SearchAppType.searchAppTypeAll);
if (ctList != null) {
for (var i = 0; i < ctList.length; i++) {
print('Main Category: ${ctList[i].mainCategory}');
print('Sub Category: ${ctList[i].subCategory}');
}
}

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon