Showing
2 changed files
with
21 additions
and
0 deletions
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | 4 | ||
5 | - Improve TTF Writer compatibility | 5 | - Improve TTF Writer compatibility |
6 | - Apply THE BIDIRECTIONAL ALGORITHM using dart_bidi [Milad akarie] | 6 | - Apply THE BIDIRECTIONAL ALGORITHM using dart_bidi [Milad akarie] |
7 | +- Add Inseparable Widget | ||
7 | 8 | ||
8 | ## 3.8.4 | 9 | ## 3.8.4 |
9 | 10 |
@@ -414,3 +414,23 @@ class DelayedWidget extends SingleChildWidget { | @@ -414,3 +414,23 @@ class DelayedWidget extends SingleChildWidget { | ||
414 | super.paint(context); | 414 | super.paint(context); |
415 | } | 415 | } |
416 | } | 416 | } |
417 | + | ||
418 | +class Inseparable extends SingleChildWidget { | ||
419 | + Inseparable({required Widget child, bool canSpan = false}) | ||
420 | + : _canSpan = canSpan, | ||
421 | + super(child: child); | ||
422 | + | ||
423 | + final bool _canSpan; | ||
424 | + | ||
425 | + @override | ||
426 | + bool get canSpan => _canSpan && super.canSpan; | ||
427 | + | ||
428 | + @override | ||
429 | + bool get hasMoreWidgets => _canSpan && super.hasMoreWidgets; | ||
430 | + | ||
431 | + @override | ||
432 | + void paint(Context context) { | ||
433 | + super.paint(context); | ||
434 | + paintChild(context); | ||
435 | + } | ||
436 | +} |
-
Please register or login to post a comment