WhatsNewSheet class
A ready-made "What's New" bottom sheet.
Shows only entries newer than lastSeenVersion (or all when null),
then records the newest visible version via store when dismissed.
await WhatsNewSheet.show(
context,
changelog: myChangelog,
lastSeenVersion: await store.lastSeenVersion(),
onDismiss: (newestVersion) => store.markSeen(newestVersion),
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- WhatsNewSheet
Constructors
-
WhatsNewSheet({Key? key, String? changelog, List<
ChangelogEntry> ? entries, required String? sinceVersion, ChangelogStyle? style, String title = 'What\u2019s New', Widget bulletBuilder(String bullet)?}) -
Creates the sheet content (usually via show).
const
Properties
- bulletBuilder → Widget Function(String bullet)?
-
Custom bullet renderer (e.g.
prism_markdown).final - changelog → String?
-
Raw changelog markdown. Mutually exclusive with entries.
final
-
entries
→ List<
ChangelogEntry> ? -
Pre-parsed entries. Mutually exclusive with changelog.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sinceVersion → String?
-
Only entries strictly newer than this are shown; null shows all.
final
- style → ChangelogStyle?
-
Visual configuration.
final
- title → String
-
Sheet title.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
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
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
show(
BuildContext context, {required String changelog, String? lastSeenVersion, ChangelogStyle? style, String title = 'What\u2019s New', Widget bulletBuilder(String bullet)?, Future< void> onDismiss(String newestVersion)?, SeenVersionStore store = const SharedPrefsSeenStore(), bool autoPersist = true}) → Future<void> -
Shows the sheet and returns when dismissed. The newest version shown
is reported through
onDismissso the caller can persist it.