BaseSourcePageState<T extends BaseSourcePage> class

A base class for providing all pages used for media in the app with a collection of shared functions and variables. In large part, this was implemented to define shortcuts for common lengthy methods across UI code.

Inheritance

Constructors

BaseSourcePageState()

Properties

appModel AppModel
Access the global model responsible for app-wide state management.
read-onlyinherited
appModelNoUpdate AppModel
Access the global model responsible for app-wide state management without listening to state updates. Useful when accessing state from initState.
read-onlyinherited
context BuildContext
The location in the tree where this widget builds.
read-onlyinherited
creatorModel CreatorModel
Access the global model responsible for creator state management.
read-onlyinherited
creatorModelNoUpdate CreatorModel
Access the global model responsible for creator state management. without listening to state updates. Useful when accessing state from initState.
read-onlyinherited
currentResult DictionarySearchResult?
Get the result returned from the last search.
read-only
dictionaryBackgroundOpacity double
Allows customisation of dictionary background.
read-only
dictionaryEntryOpacity double
Allows customisation of opacity of dictionary entries.
read-only
dictionaryPopupShown bool
Used to check if the pop-up is open.
read-only
hashCode int
The hash code for this object.
read-onlyinherited
isDictionaryShown bool
Whether or not there is a present dictionary result.
read-only
mounted bool
Whether this State object is currently in a tree.
read-onlyinherited
ref WidgetRef
An object that allows widgets to interact with providers.
latefinalinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
selectionControls MaterialTextSelectionControls
Get the selection controls for a SelectableText.
read-onlyinherited
textTheme TextTheme
Shortcut for accessing the app-wide theme-defined text theme.
read-onlyinherited
theme ThemeData
Shortcut for accessing the app-wide theme.
read-onlyinherited
widget → T
The current configuration.
read-onlyinherited

Methods

activate() → void
Called when this object is reinserted into the tree after having been removed via deactivate.
inherited
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
inherited
buildBottomHalfDictionary() Widget
The dictionary in the case of JidoujishoPopupPosition.bottomHalf.
buildDictionary() Widget
Build a dictionary showing the result with positioning. If the result is null, show nothing.
buildDictionaryLoading() Widget
In progress indicator for dictionary searching.
buildDictionaryResult() Widget
The dictionary result unpositioned. See buildDictionary for the positioned version.
buildError({Object? error, StackTrace? stack, dynamic refresh()?}) Widget
Standard error message for use across the application. General widget for showing an error or a retry screen.
inherited
buildLeftHalfDictionary() Widget
The dictionary in the case of JidoujishoPopupPosition.leftHalf.
buildLoading() Widget
Standard loading circle for use across the application.
inherited
buildNoSearchResultsPlaceholderMessage() Widget
Placeholder when there are no search results.
buildRightHalfDictionary() Widget
The dictionary in the case of JidoujishoPopupPosition.rightHalf.
buildSearchResult() Widget
Displays the dictionary entries.
buildTopHalfDictionary() Widget
The dictionary in the case of JidoujishoPopupPosition.topHalf.
buildTopThreeFourths() Widget
The dictionary in the case of JidoujishoPopupPosition.topThreeFourths.
clearDictionaryResult() → void
Hide the dictionary and dispose of the current result.
deactivate() → void
Called when this object is removed from the tree.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
didChangeDependencies() → void
Called when a dependency of this State object changes.
inherited
didUpdateWidget(covariant T oldWidget) → void
Called whenever the widget configuration changes.
inherited
dispose() → void
Called when this object is removed from the tree permanently.
override
initState() → void
Called when this object is inserted into the tree.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCreatorClose() → void
Performs an action after closing the Card Creator.
onCreatorOpen() → void
Performs an action before opening the Card Creator.
onDictionaryDismiss() → void
Executed on dictionary dismiss.
onSearch(String searchTerm, {String? sentence = ''}) → void
Action upon selecting the Search option.
override
onShare(String searchTerm, {String? sentence = ''}) → void
Action to perform upon using the Share context option.
inherited
onSourcePagePop() Future<void>
Action to perform within the source page upon closing the media.
onStash(String searchTerm) → void
Action upon selecting the Stash option.
override
onWillPop() Future<bool>
Standard warning dialog for leaving a source page. All sources should use this and wrap their build function with a WillPopScope.
reassemble() → void
Called whenever the application is reassembled during debugging, for example during hot reload.
inherited
searchDictionaryResult({required String searchTerm, required JidoujishoPopupPosition position}) Future<void>
Perform a search with a given query and update the dictionary search result. The position parameter determines where the pop-up will be shown on the screen.
setState(VoidCallback fn) → void
Notify the framework that the internal state of this object has changed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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