TitleOptions class
Title prefix/suffix options of a layout.
A title can be decorated with a prefix and a suffix (which may contain
keywords such as <$n> or an index placeholder), each styled with its own
SectionAttributes and case rule.
Pure data: building the prefix/suffix AST paragraphs is done externally by
TitleOptionsBuilder.
Constructors
- TitleOptions({required String titlePrefix, required String titleSuffix, required SectionAttributes attrPrefix, required SectionAttributes attrSuffix, required LetterCase lettercasePrefix, required LetterCase lettercaseSuffix, required LetterCase lettercaseTitle, String? preffix, String? suffix})
- Builds title options.
- TitleOptions.common({String? preffix, String? suffix})
-
Neutral title options: no prefix/suffix text, normal case everywhere and
default attributes.
factory
- TitleOptions.fromJson(String source)
-
Parses the options from their JSON string.
factory
-
TitleOptions.fromMap(Map<
String, dynamic> map) -
Parses the options from their on-disk JSON map (tolerant of missing
fields).
factory
Properties
- attrPrefix → SectionAttributes
-
Attributes of the prefix. They do not apply when titlePrefix and
titleSuffix are empty.
final
- attrSuffix → SectionAttributes
-
Attributes of the suffix.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- lettercasePrefix → LetterCase
-
Case applied to titlePrefix.
final
- lettercaseSuffix → LetterCase
-
Case applied to titleSuffix.
final
- lettercaseTitle → LetterCase
-
Case applied to the title itself.
final
- preffix → String?
-
Legacy plain prefix appended without attributes (kept for compatibility).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- suffix → String?
-
Legacy plain suffix appended without attributes (kept for compatibility).
final
- titlePrefix → String
-
Text written before the title. Only placeholders that index words work
here (
<$n>,<$wc>and similar).final - titleSuffix → String
-
Text written after the title.
final
Methods
-
copyWith(
{String? titlePrefix, String? titleSuffix, LetterCase? lettercasePreffix, LetterCase? lettercaseSuffix, LetterCase? lettercaseTitle, SectionAttributes? attrPreffix, SectionAttributes? attrSuffix, String? suffix, String? preffix}) → TitleOptions - Returns a copy with the given values replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String - Serializes the options to a JSON string.
-
toMap(
) → Map< String, dynamic> - Serializes the options to their on-disk JSON map (snake_case keys).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
covariant TitleOptions other) → bool -
The equality operator.
override