Getting Started - PixelaGt/flusmic GitHub Wiki
You only need to add Flusmic in your pubspec.yaml file.
dependencies:
flusmic_ui: <latest-version> /// latest version
Flusmic instance creation it's simple:
final flusmic = Flusmic(prismicEndpoint: <yourEndpoint>);
With optional 'defaultLanguage' and 'defaultAuthToken' params;
final flusmic = Flusmic(prismicEndpoint: <yourEndpoint>,
defaultLanguage: <defaultLang>, defaultAuthToken: <yourToken>);
There are 4 basic methods to start fetching data from Prismic.io:
For general prismic API information.
final api = await flusmic.getApi();
The main document containing all the prismic documents.
final response = await flusmic.getRootDocument();
Fetching all the documents by a specific type using the slug.
final response = await flusmic.getDocumentsByType('typeSlug');
Fetching a specific document by the document id
final response = await flusmic.getDocumentById('documentId');