hexaminate 0.1.4 copy "hexaminate: ^0.1.4" to clipboard
hexaminate: ^0.1.4 copied to clipboard

HexaMinate library for create app flutter more easy and lightweight, becouse this not required other library.

Hexaminate Library #

Install #

flutter pub add hexaminate
dart pub add hexaminate

Documentation #

Api #

Fetch #

quickstart:

import 'dart:convert';
import 'package:hexaminate/hexaminate.dart';
void main() async {
  FetchResponse res = await fetch("https://api.example.com", {
    "method": "post",
    "headers": {"Content-Type": "application/json"},
    "body": json.encode({"key": "value"})
  });
  print(res.body());
}

constructor

return Fetch Response

No key value Deskripsi required
1 url String path url yes
2 options object
parameters di butuhkan jika method membutuhkannya
no
  • examples
fetch("https://api.example.com", {
    "method": "post",
    "headers": { 
        "Content-Type": "application/json"
    },
    "body": json.encode({
        "key": "value"
    })
});

FetchResponse #

statusCode

return status int from api

No key value Deskripsi required
FetchResponse res = await fetch("url");
print(res.statusCode);

body

return Object or text from api

No key value Deskripsi required
FetchResponse res = await fetch("url");
print(res.body());

Server #

quickstart:

import 'dart:convert';
import 'dart:io';
import 'package:hexaminate/hexaminate.dart';
void main() async {
  Server app = Server();
  app.on("/", (RequestApi req, ResponseApi res) async {
    return res.send("api normal");
  });
  app.get("/json", (RequestApi req, ResponseApi res) async {
    return res.send({"value": "json"});
  });
  app.listen(callback: (HttpServer server) {}, port: 8080, host: "0.0.0.0");
}

constructor

No key value Deskripsi required
  • examples
Server();
5
likes
120
pub points
3%
popularity

Publisher

unverified uploader

HexaMinate library for create app flutter more easy and lightweight, becouse this not required other library.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

http, universal_io

More

Packages that depend on hexaminate