Flusmic class
Flusmic - repository class
Get documents from Prismic.io
Constructors
Properties
- defaultAuthToken → String?
-
Default Auth token
final
- defaultLanguage → String?
-
Default language
Ex. es-gt
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- prismicEndpoint → String
-
The prismic API endpoint
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getApi(
{String? authToken}) → Future< Api> - Fetch API Get the API main document of prismic repository
-
getDocumentById(
String id, {String? language, String? authToken}) → Future< FlusmicResponse< Document< >Map< >String, dynamic> > -
Fetch document by id
Get a documents by
id
. -
getDocumentsByType(
String slug, {String? language, String? authToken, int page = 1}) → Future< FlusmicResponse< Document< >Map< >String, dynamic> > -
Fetch documents by type
Get all the documents by type using the
slug
. -
getRootDocument(
{String? language, String? authToken, int page = 1}) → Future< FlusmicResponse< Document< >Map< >String, dynamic> > - Fetch Root Get the API root document of prismic repository Contains all the documents.
-
graphQuery(
String graphQuery, {List< Ordering> ? orderings, String? after, String? authToken, String? language, int? page, int? pageSize}) → Future<FlusmicResponse< Document< >Map< >String, dynamic> > - Fetch by query using graphQuery Get result by query using only the graphQuery
-
graphQueryWithModel<
T> (String graphQuery, T fromJson(Object?), {List< Ordering> ? orderings, String? after, String? authToken, String? language, int? page, int? pageSize}) → Future<FlusmicResponse< Document< >T> > - Fetch by query using graphQuery Get result by query using only the graphQuery
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
List< Predicate> predicates, {List<CustomPredicatePath> ? fetch, List<CustomPredicatePath> ? fetchLinks, List<Ordering> ? orderings, String? after, String? authToken, String? language, int? page, int? pageSize}) → Future<FlusmicResponse< Document< >Map< >String, dynamic> > - Fetch by query Get result by query using predicates
-
queryWithModel<
T> (List< Predicate> predicates, T fromJson(Object?), {List<CustomPredicatePath> ? fetch, List<CustomPredicatePath> ? fetchLinks, List<Ordering> ? orderings, String? after, String? authToken, String? language, String? graphQuery, int? page, int? pageSize}) → Future<FlusmicResponse< Document< >T> > - Fetch by query Get result by query using predicates The result document data will be of T type
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited