pheasant_build library

This library is not intended for use within this package, but is used by sibling packages like pheasant_build for the createApp function. This is also the library used in all compiled pheasant files cached during development.

The reason this library is separate from pheasant_temp is becuase of unsupported libraries like "dart:html".

In this library, the base definition for RavenTemplate is defined here, and so is used for external functions or processes, like the files built from the text returned by renderFunc and renderMain, in order to make use of the functionality during build processes.

This library also contains the definitions for the State classes, which are used for state management. The main classes used in the application are TemplateState and AppState.

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.
ElementState<T>
The base component state class used in controlling state in a component or object.
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.
Route
A Route used in standard Routing in a Pheasant Application
RouteBase
A base class representation of a Route
Router
A Router object used in creating/instantiating a new router.
State<T>
The base class to represent State in an object.
StateChange<T>
Class used to represent state changes in an application.
StateObject<T>
This is the class that makes use of the State class, with proper definitions of overriden functions from State.
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.

Mixins

ComponentStateControl
This is a mixin used to define base functions used in controlling state in a component.
HtmlElementStateControl
Mixin for the new ElementChangeWatcher object, an object specifically used for changes between parent and children in PheasantTemplate objects.
StateControl
Mixin for base definition of state control functions.

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.

Properties

currentRoute String
Get the current route of the page
no setter

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
refreshPage() → void
Function used to refresh the current page
setpopState() → void
Function used to set pop/backward state during page routing

Typedefs

PheasantAnnotation = BuildAnnotationObject