Vanethos / code_builder_gen

A sample app that uses `code_builder` for code generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code Builder Article

Running the generater

To run the generator we need to create an Input model and give it to the generateCode function isnide codegen/main.dart

Then, we need to run:

$ dart run codegen/input_codegen.dart

To run the simple example we can run:

$ dart run codegen/simple_codegen.dart

Plushie Directory API

This Mock API aims to help us make CRUD operations on an API for Plushie stock management

Plushie Model

A Plushie is defined as:

class Plushie {
    final String id;
    final String name;
    final String manufacturer;
    final List<String> tags;
    /// ...
}

Endpoints

void createPlushie(Plushie plushie);

Plushie getPlushieById(String id);

void deletePlushie(String id);

List<Plushie> getPlushiesForManufacturer(String manufacturer);

Code Architecture

This application is using Bloc as a state management solution, and uses the repository pattern to abstract the API logic.

About

A sample app that uses `code_builder` for code generation


Languages

Language:Dart 96.8%Language:HTML 3.2%