build library

This is the library used in all generated pheasant files, from the compiled dart code generated from the Pheasant Components to the main.phs.dart file also.

This library only exposes the two functions from the html library used in the compiled dart code, and the PheasantTemplate class, which represents the backbone for all Pheasant-Compiled File Components

Classes

AppState
Object to represent the application's state
ChangeWatcher<T>
A state watcher class
ElementChangeWatcher<U extends PheasantTemplate>
A special extended class of ChangeWatcher used to control the state of not only the PheasantTemplate object, but the Element rendered by the file.
GlobalRoute
The class used for obtaining and setting the current route on the website
PheasantTemplate
The base class for all Pheasant App Components
Prop
This is an object used in denoting prop variables passed as arguments in a pheasant component.
TemplateState
The class used in Pheasant Template Components. This class extends the base class ElementState with functionality used directly in controlling state in an application.
UnknownPheasantTemplate
A base implementation for any unknown component, mostly used as a displayable error message.

Constants

noprop → const _NoProp
By default, all uninitialised variables are automatically passed as props (i.e constructor arguments) for the component during compilation.
prop → const Prop
This object serves the same purpose as the Prop object, and is actually derived from such. This annotation is a default setting of the Prop object, where the default value defaultValue is null, while optional is false.

Functions

fetchState() → dynamic
Function used to get the current page state for a Pheasant Application.
getCurrentRoute([String? path]) PheasantTemplate
Function used to get the current route of the application
initPage(String url, [Object? pageInfo]) → void
Initialise current state of page
Function used in navigating to a new page
Function used in navigating to a new page with data
onBack(void func(Event event)) → void
parse(dynamic input, {String? encoding, bool generateSpans = false, String? sourceUrl}) → Document
Parse an html5 document into a tree.
parseFragment(dynamic input, {String container = 'div', String? encoding, bool generateSpans = false, String? sourceUrl}) → DocumentFragment
Parse an html5 document fragment into a tree.