Simple Auth Generator

This is the API Generator for Simple Auth



pub run build_runner build


flutter packages pub run build_runner build

Add the following to your pubspec.yaml

  build_runner: ^0.8.0

The Generator is not required, however it will make things magical.

@GoogleApiDeclaration("GoogleTestApi","client_id",clientSecret: "client_secret", scopes: ["TestScope", "Scope2"])
abstract class GoogleTestDefinition {
  @Get(url: "")
  Future<Response<GoogleUser>> getCurrentUserInfo();

will generate a new Api for you that is easy to use!

var api = new GoogleTestApi("google");
var user = await getCurrentUserInfo();

For more examples, check out the example project


Json objects will automatically serialize if you conform to JsonSerializable

If you use the generator and you objects have the factory factory JsonSerializable.fromJson(Map<String, dynamic> json) your api calls will automatically Serialize/Deserialize

Or you can pass your own Converter to the api and handle conversion yourself. \