PugInstance class

Singleton wrapper for Pug that automatically handles setup

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compile(String template, [Map<String, dynamic>? data, Map<String, dynamic>? options]) Future<String>
Compiles and renders a Pug template string in one step. Automatically sets up Pug.js on first call.
compileFile(File file, [Map<String, dynamic>? data, Map<String, dynamic>? options]) Future<String>
Compiles and renders a Pug template file in one step. Automatically sets up Pug.js on first call.
dispose() Future<void>
Disposes resources and shuts down the Pug server. Call this when you're done using Pug to clean up resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(String template, [Map<String, dynamic>? data, Map<String, dynamic>? options]) Future<String>
Renders a Pug template string with optional data and options. Automatically sets up Pug.js on first call.
renderFile(File file, [Map<String, dynamic>? data, Map<String, dynamic>? options]) Future<String>
Renders a Pug template file with optional data and options. Automatically sets up Pug.js on first call.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance PugInstance
Get the singleton instance
no setter