helpers/imports library

Classes

ApplicationGenerator
Generates the application layer (facade classes) for each API category.
ArrayProperty
Represents an array schema property.
AsciiCodec
An AsciiCodec allows encoding strings as ASCII bytes and decoding ASCII bytes to strings.
AsciiDecoder
Converts ASCII bytes to string.
AsciiEncoder
Converts strings of only ASCII characters to bytes.
Base64Codec
A base64 encoder and decoder.
Base64Decoder
Decoder for base64 encoded data.
Base64Encoder
Base64 and base64url encoding converter.
BlocGenerator
A generator responsible for creating Bloc files for each API category.
ByteConversionSink
The ByteConversionSink provides an interface for converters to efficiently transmit byte data.
ChunkedConversionSink<T>
A ChunkedConversionSink is used to transmit data more efficiently between two converters during chunked conversions.
ClassGeneratorHelper
Utility helpers for generating Dart class source from OpenAPI schemas.
ClassSerializerGenerator
Generates serialization-related source for model/entity classes.
ClosableStringSink
A ClosableStringSink extends the StringSink interface by adding a close method.
Codec<S, T>
A Codec encodes and (if supported) decodes data.
Components
ConstantsHelper
A helper class for storing constant values used across the project.
Converter<S, T>
A Converter converts data from one representation into another.
DartTypeInfo
Represents type information derived from a Swagger schema.
Encoding
Open-ended set of encodings.
EntitiesGenerator
EntityClassGenerator
Generates Dart entity (parameter) classes for API endpoints.
EnumsGenerator
EventGenerator
Generates event classes for each module/category based on Swagger paths. Each event corresponds to an API action and contains the parameters (Param) required for that action.
FilePath
GeneratedJsonLine
Represents a single line of JSON mapping along with nullability info.
GeneratedParameters
Holds all generation artifacts for a single parameter field.
HtmlEscape
Converter which escapes characters with special meaning in HTML.
HtmlEscapeMode
HTML escape modes.
HttpMethodInfo
Describes details of an HTTP operation (e.g., a get or post on a path) as defined in the OpenAPI specification.
ImportPath
InjectionGenerator
A generator responsible for creating dependency injection setup files.
JsonCodec
A JsonCodec encodes JSON objects to strings and decodes strings to JSON objects.
JsonDecoder
This class parses JSON strings and builds the corresponding objects.
JsonEncoder
This class converts JSON objects to strings.
JsonUtf8Encoder
Encoder that encodes a single object as a UTF-8 encoded JSON string.
Latin1Codec
A Latin1Codec encodes strings to ISO Latin-1 (aka ISO-8859-1) bytes and decodes Latin-1 bytes to strings.
Latin1Decoder
This class converts Latin-1 bytes (lists of unsigned 8-bit integers) to a string.
Latin1Encoder
This class converts strings of only ISO Latin-1 characters to bytes.
LineSplitter
A StreamTransformer that splits a String into individual lines.
MediaTypeContent
Represents a parsed media type entry from an OpenAPI content map.
ModelsGenerator
NetworkGenerator
A generator class to create network-related exception handling classes.
ObjectProperty
Represents an object schema property with nested properties and optional additionalProperties.
OpenApiJSON
Represents the root structure of an OpenAPI (3.x) specification document.
ParametarsGenerator
Builds parameter metadata used to generate *Param classes and JSON mapping.
PrimitiveProperty
Represents a primitive schema property (e.g., string, integer, number, boolean).
PropertyNameAndSchema
Pair of a property name and its parsed schema.
ProviderGenerator
Generates Provider-based state management classes for each API category.
RefProperty
Represents a $ref schema that points to another component schema.
RemoteGenerator
A generator responsible for creating remote data source classes.
RepoImpGenerator
A generator responsible for creating repository implementation files.
RepositoryGenerator
ResultBuilderGenerator
A generator class that creates result handling utilities for Flutter applications.
RiverpodGenerator
Generates Riverpod-based state management classes for each API category.
RouteInfo
Represents a single API route entry parsed from the OpenAPI paths map.
RoutesGenerator
A generator that creates a Dart class (AppUrl) containing all API routes extracted from Swagger and grouped by category.
StateGenerator
Generates the State class for each module/category based on the Swagger paths. Each state class contains Result<T> fields for each API action, along with constructor and copyWith method for immutable updates.
StringConversionSink
A sink for converters to efficiently transmit String data.
TContentType
Wrapper type representing supported media (content) types used in OpenAPI.
TParameter
Represents a parameter in an API endpoint, such as query, path, header, or cookie parameters.
TProperty
Base type for any schema property, providing common fields used across variants.
TRequestBody
Represents the request body of an API operation
Utf8Codec
A Utf8Codec encodes strings to utf-8 code units (bytes) and decodes UTF-8 code units to strings.
Utf8Decoder
This class converts UTF-8 code units (lists of unsigned 8-bit integers) to a string.
Utf8Encoder
This class converts strings to their UTF-8 code units (a list of unsigned 8-bit integers).

Enums

HttpMethodType
Supported HTTP methods recognized by the code generator and runtime.
TPropertyType
Enumeration of supported schema property kinds and primitive types.

Constants

ascii → const AsciiCodec
An instance of the default implementation of the AsciiCodec.
base64 → const Base64Codec
A base64 encoder and decoder.
base64Url → const Base64Codec
A base64url encoder and decoder.
enumsImport → const String
htmlEscape → const HtmlEscape
A String converter that converts characters to HTML entities.
json → const JsonCodec
An instance of the default implementation of the JsonCodec.
latin1 → const Latin1Codec
An instance of the default implementation of the Latin1Codec.
line → const String
unicodeBomCharacterRune → const int
The Unicode Byte Order Marker (BOM) character U+FEFF.
unicodeReplacementCharacterRune → const int
The Unicode Replacement character U+FFFD (�).
utf8 → const Utf8Codec
An instance of the default implementation of the Utf8Codec.

Functions

base64Decode(String source) Uint8List
Decodes base64 or base64url encoded bytes.
base64Encode(List<int> bytes) String
Encodes bytes using base64 encoding.
base64UrlEncode(List<int> bytes) String
Encodes bytes using base64url encoding.
cleanPath(String path) String
Cleans the path by:
createFolder(String path) → void
Creates a folder at the given path if it does not already exist.
getCategory(String path) String
Extracts the category (module name) from a given path.
getDartType({required TProperty? schema, required Components components, required bool isForEntities}) DartTypeInfo
Determines the Dart type information for a given Swagger schema.
getModuleNames(List<RouteInfo> paths) List<String>
Extracts module names (tags) from Swagger API paths.
getRouteName(String path) String
Extracts a route name from the given path.
jsonDecode(String source, {Object? reviver(Object? key, Object? value)?}) → dynamic
Parses the string and returns the resulting Json object.
jsonEncode(Object? object, {Object? toEncodable(Object? nonEncodable)?}) String
Converts object to a JSON string.
makeBanner(String text, {int totalLength = 80}) String
printBlack(Object? msg) → void
Prints a message in black.
printBrown(Object? msg) → void
Prints a message in brown.
printDebug(dynamic message) → void
printError(String message) → void
Prints an error message in red.
printInfo(String message) → void
Prints an info message in blue.
printMap(String title, Map<String, dynamic> map) → void
printProgress(String message) → void
Prints a progress message in cyan (without newline).
printPurple(Object? msg) → void
Prints a message in purple.
printSuccess(String message) → void
Prints a success message in green.
printWarning(String message) → void
Prints a warning message in orange.
printWhite(Object? msg) → void
Prints a message in white.
printYellow(Object? msg) → void
Prints a message in yellow.
promptUser(String question) String
Prompts the user with a question in orange and waits for input.

Typedefs

ByteConversionSinkBase = ByteConversionSink
This class provides a base-class for converters that need to accept byte inputs.
StringConversionSinkBase = StringConversionSink
This class provides a base-class for converters that need to accept String inputs.
StringConversionSinkMixin = StringConversionSink
This class provides a mixin for converters that need to accept String inputs.

Exceptions / Errors

JsonCyclicError
Reports that an object could not be stringified due to cyclic references.
JsonUnsupportedObjectError
Error thrown by JSON serialization if an object cannot be serialized.