AdminRestClient class

Cliente HTTP genérico do admin: fala com os endpoints declarativos do Flenx (envelope {success, data, error, meta}) para qualquer recurso — posts, produtos, pedidos, usuários, configurações. É a ponte entre as telas Flutter do admin (ilha) e a API do servidor.

Constructors

AdminRestClient({String baseUrl = ''})
const

Properties

baseUrl String
Base da API (vazio = mesma origem — ideal para a ilha rodando no /admin).
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getOne(String path) Future<Map<String, Object?>?>
GET de um único registro (data é um objeto). Usado por */get?id=.
list(String path) Future<List<Map<String, Object?>>>
GET que devolve uma lista (data é um array). Usado por */list.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post(String path, Map<String, Object?> body) Future<Map<String, Object?>>
POST com corpo JSON. Retorna o data (ex.: {id: N}).
toString() String
A string representation of this object.
inherited

Operators

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