|
|
|
@ -4,7 +4,6 @@ import 'dart:math' as math; |
|
|
|
|
import 'package:flutter/foundation.dart'; |
|
|
|
|
import 'package:flutter/gestures.dart'; |
|
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
|
import 'package:flutter/rendering.dart'; |
|
|
|
|
import 'package:flutter/scheduler.dart'; |
|
|
|
|
|
|
|
|
|
import '../models/documents/nodes/node.dart'; |
|
|
|
@ -82,7 +81,7 @@ class EditorTextSelectionOverlay { |
|
|
|
|
this.dragStartBehavior = DragStartBehavior.start, |
|
|
|
|
this.handlesVisible = false, |
|
|
|
|
}) { |
|
|
|
|
final overlay = Overlay.of(context, rootOverlay: true)!; |
|
|
|
|
final overlay = Overlay.of(context, rootOverlay: true); |
|
|
|
|
|
|
|
|
|
_toolbarController = AnimationController( |
|
|
|
|
duration: const Duration(milliseconds: 150), vsync: overlay); |
|
|
|
@ -222,7 +221,7 @@ class EditorTextSelectionOverlay { |
|
|
|
|
void showToolbar() { |
|
|
|
|
assert(toolbar == null); |
|
|
|
|
toolbar = OverlayEntry(builder: _buildToolbar); |
|
|
|
|
Overlay.of(context, rootOverlay: true, debugRequiredFor: debugRequiredFor)! |
|
|
|
|
Overlay.of(context, rootOverlay: true, debugRequiredFor: debugRequiredFor) |
|
|
|
|
.insert(toolbar!); |
|
|
|
|
_toolbarController.forward(from: 0); |
|
|
|
|
|
|
|
|
@ -407,7 +406,7 @@ class EditorTextSelectionOverlay { |
|
|
|
|
_buildHandle(context, _TextSelectionHandlePosition.END)), |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
Overlay.of(context, rootOverlay: true, debugRequiredFor: debugRequiredFor)! |
|
|
|
|
Overlay.of(context, rootOverlay: true, debugRequiredFor: debugRequiredFor) |
|
|
|
|
.insertAll(_handles!); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|