implemented Ticker page selection persistence and enhanced ProseMirror table display modes
This commit is contained in:
@@ -20,3 +20,24 @@ class PmRenderScope extends InheritedWidget {
|
||||
bool updateShouldNotify(PmRenderScope oldWidget) =>
|
||||
oldWidget.onLinkTap != onLinkTap;
|
||||
}
|
||||
|
||||
/// Controls whether inline text below it may wrap. Table cells disable wrapping
|
||||
/// in the scroll/zoom modes so every row stays a single line (bound height),
|
||||
/// matching the web ticker; the default outside tables is to wrap.
|
||||
class PmCellTextFlow extends InheritedWidget {
|
||||
final bool softWrap;
|
||||
|
||||
const PmCellTextFlow({
|
||||
required this.softWrap,
|
||||
required super.child,
|
||||
super.key,
|
||||
});
|
||||
|
||||
static bool softWrapOf(BuildContext context) =>
|
||||
context.dependOnInheritedWidgetOfExactType<PmCellTextFlow>()?.softWrap ??
|
||||
true;
|
||||
|
||||
@override
|
||||
bool updateShouldNotify(PmCellTextFlow oldWidget) =>
|
||||
oldWidget.softWrap != softWrap;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user