contentful_flutter library
Contentful package for flutter
Classes
- Asset
- Asset is a file that is stored in Contentful. It has the link in the AssetField to the actual file. Also we could find different details in side the AssetField concerning the size and content type of the file.
- AssetField
- AssetField is the field that contains the actual file. It has the title and description of the file. the file itself is in the FileField. The FileField contains the url of the file and the details of the file. The details are the size and the content type. also the dimensions and the size of the image if it's an image.
- Content
- Content is usually non null when we have a node type of document or paragraph. It contains a list of paragraph contents. And if it is a document it contains a list of different node types.
- ContentfulAPIConstants
- Constants for Contentful API
- ContentfulClient
- Contentful client used to make requests to the Contentful Delivery API.
- ContentfulDeliveryAPIRepository
-
ContentfulDeliveryDataModel<
T> -
ContentfulDeliveryDataModel is the base model for the contentful delivery API
returned from the API.
It contains the
sys
information, thetotal
number of items, theskip
andlimit
values. It also contains theitems
andincludes
that are returned from the API. Theitems
are the entries that are returned from the API. Theincludes
are the assets and linked entries that are returned from the API. - ContentfulFlutterBuilder
- It returns the desired widget based on the type of the field.
- ContentfulImage
- ContentfulTextMark
- Data
- Details
- Details contains the Asset and the AssetField details. The details are specific to the asset content type. For example if the asset is an image, the details will contain the size, the dimensions and the content type.
- Document
-
Document is the base model for the contentful rich text document.
It contains the
contentList
that is returned from the API. ThecontentList
are the entries that are returned from the API. ThenodeType
is the type of the node that is returned from the API. -
Entry<
T> - The model of Contentful Entry
- FileField
- FileField contains the url of the file and the details of the file. The details are the url, the size, the content type and the fileName. also the dimensions and the size of the image if it's an image. The FileField is usually inside the AssetField.
- Includes
- Includes is where the assets and it's linked entries are stored. It's a part of the ContentfulDeliveryDataModel and is used to retrieve the assets and linked entries from the Entrys.
- Metadata
- Metadata contains the tags of the entry. It's usually in the items and the includes asset returned from the delivery API in the ContentfulDeliveryDataModel It's also used in the Entry to store the tags of the entry.
- Sys
-
Sys is the system information that is returned from the Contentful API.
It contains the
type
,linkType
andid
of the entry. We use it to define if the returned data is of type Entry or Asset or link. And from that you could return the desired widget or data. - Target
-
We find the target inside the data of the embedded-asset-block node.
It contains the
sys
of the asset/file. where we find it's id, type and linkType. And we use it to retrieve the asset from the Includes object.
Enums
- ContentfulContentNodeType
- Enumerations for Contentful content node types. It could be a paragraph, an embedded asset block or a document. A document is a collection of nodes. A node is a paragraph or an embedded asset block. An embedded asset block is an asset that is embedded in a paragraph.
- ContentfulItemType
- Enumerations for Contentful types.
- ContentfulLinkType
- Enumerations for Contentful link types. It could be an asset or a space.
- ContentfulTextMarksEnum
- HttpClientRequestType
Extensions
- ContentfulContentNodeTypeX on ContentfulContentNodeType
- Extension methods for ContentfulContentNodeType.
- ContentfulItemTypeX on ContentfulItemType
- ContentfulLinkTypeX on ContentfulLinkType
- ContentfulStringX on String?
-
ContentfulTextMarksListX
on List<
ContentfulTextMark> - Extension methods for ContentfulTextMark. Text marks are used to style text nodes. And they are retunrned inside the item of nodeType text.
- HttpClientRequestTypeX on HttpClientRequestType
- NullableContentfulTextMarksEnumX on ContentfulTextMarksEnum?
- SysX on Sys
- Extension methods for Sys objects.
Functions
-
getAssetDataFrom(
{required String assetId, required Includes includes}) → AssetField? -
Returns AssetField from
assetId
andincludes
-
getAssetUrlFrom(
{Asset? asset, String? assetId, Includes? includes}) → String?
Typedefs
-
ContentfulEitherDataType
= Either<
List< Content> , String?>