List
The list property returns a ListResult class, which includes two main properties:
-
Data Property:
- The
dataproperty contains a list of data based on the specified type. For instance, if you are fetching publications, the data will be of typeList<Publication>.
- The
-
Pagination Property:
- The
paginationproperty is an instance of thePaginationentity, which provides information related to pagination. It includes the following properties:page: The current page.pages: The total number of pages.count: The count of data entries on the current page.perPage: The number of entries per page.total: The total number of data entries.
- The
-
Data Availability Property:
- The
dataAvailabilityproperty is an enum fromDataAvailabilityenum, which provides information related to data availability. It includes the following values:DataAvailability.available: Indicating data is available.DataAvailability.listUnavailable: Indicating the requested list not available.DataAvailability.unavailable: Indicating the requested data not available.
- The
To retrieve a list of models, follow these steps:
-
Create an instance of
StadataFlutter. -
Access the
listgetter from the instance, granting you access to various models from domains, publications, press releases, and more. -
Use the
listmethod with the desired parameters. For example:var result = await StadataFlutter.instance.list.publications(domain: '7200');
This call will provide you with a ListResult containing data of type List<Publication> and pagination information for further navigation.