MBManager class Null safety

The manager of the MBurger SDK, you will use this class to make requests to MBurger.

Properties

apiToken String?
The API token used to make all the requests to the apis.
read / write
channel MBurgerChannel
The MBurger channel that will be queried (stable/develop/master).
read / write
endpoint String
The endpoint of MBurger, it uses the development flag to switch between dev and prod environments.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
locale String?
The locale used to make the requests.
read / write
localeForApi String
The locale sent by the manger to the apis.
read-only
plugins List<MBPlugin>
Additional plugins for MBurger
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

defaultParameters() Future<Map<String, String>>
Default parameters sent to MBurger. [...]
getAllMedia() Future<List<MBMedia>>
Retrieve all the media of the project. [...]
getBlock({required int blockId, List<MBParameter> parameters = const [], bool includeSections = false, bool includeElements = false}) Future<MBBlock>
Retrieve the block of the project with the specified id. [...]
getBlocks({List<MBParameter> parameters = const [], bool includeSections = false, bool includeElements = false}) Future<MBPaginatedResponse<MBBlock>>
Retrieve the blocks of the project. [...]
getMedia(int mediaId) Future<MBMedia>
Retrieve the media of the project with the specified id. [...]
getProject({bool includeContracts = false}) Future<MBProject>
Retrieve the MBurger project. [...]
getSection({required int sectionId, List<MBParameter> parameters = const [], bool includeElements = false}) Future<MBSection>
Retrieve the sections with the specified id. [...]
getSections({required int blockId, List<MBParameter> parameters = const [], bool includeElements = false}) Future<MBPaginatedResponse<MBSection>>
Retrieve the sections of the block with the specified id. [...]
getSectionWithSlug({required String slug, List<MBParameter> parameters = const [], bool includeElements = false}) Future<MBSection>
Retrieve the sections with the specified slug. [...]
headers({bool contentTypeJson = false}) Future<Map<String, String>>
Default headers sent to MBurger. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
pluginOf<T>() → T?
Returns the plugin of the specified type in the array of plugins
toString() String
A string representation of this object. [...]
inherited
votePoll(int pollId, int answerIndex) Future<MBPollVoteResponse>
Votes for a poll. [...]

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Properties

shared MBManager
The singleton that manages all the data sent and received to/from MBurger.
read-only

Static Methods

checkResponse(String response, {bool checkBody = true}) Map<String, dynamic>
Checks the response of the api call and returns the body, it throws a MBException if it encounters an error. [...]
checkResponseForType<T>(String response, {bool checkBody = true}) → T
Function to check the response of the api and parse the response as the type passed [...]