WT 1.1.14 uxcam fix, nullsafe changes
This commit is contained in:
@@ -23,6 +23,10 @@ class TutorialWidget with Trans, Logging {
|
||||
}
|
||||
|
||||
void tip(BuildContext context) {
|
||||
final TutorialBloc bloc = BlocProvider.of<TutorialBloc>(context);
|
||||
if (bloc.action == null) {
|
||||
return;
|
||||
}
|
||||
setContext(context);
|
||||
if (tooltip != null && tooltip!.isOpen) {
|
||||
tooltip!.rebuild();
|
||||
@@ -32,18 +36,15 @@ class TutorialWidget with Trans, Logging {
|
||||
|
||||
var targetGlobalCenter = renderBox.localToGlobal(renderBox.size.center(Offset.zero), ancestor: overlay);
|
||||
|
||||
final TutorialBloc bloc = BlocProvider.of<TutorialBloc>(context);
|
||||
final double mediaSize = MediaQuery.of(context).size.width;
|
||||
final double mediaHeight = MediaQuery.of(context).size.height;
|
||||
|
||||
Rect? area;
|
||||
if (bloc.action != null) {
|
||||
area = bloc.action!.showBubble == true
|
||||
? Rect.fromLTWH(mediaSize / 2 - 220, targetGlobalCenter.dy - bloc.action!.bubbleY, bloc.action!.bubbleWidth.toDouble(),
|
||||
bloc.action!.bubbleHeight.toDouble())
|
||||
//? Rect.fromLTWH(targetGlobalCenter.dx - 60, targetGlobalCenter.dy + 120, 420, 320)
|
||||
: null;
|
||||
}
|
||||
final Rect? area = bloc.action!.showBubble == true
|
||||
? Rect.fromLTWH(mediaSize / 2 - 220, targetGlobalCenter.dy - bloc.action!.bubbleY, bloc.action!.bubbleWidth.toDouble(),
|
||||
bloc.action!.bubbleHeight.toDouble())
|
||||
//? Rect.fromLTWH(targetGlobalCenter.dx - 60, targetGlobalCenter.dy + 120, 420, 320)
|
||||
//: Rect.fromLTWH(0, 0, 100, 100);
|
||||
: null;
|
||||
|
||||
final double distortion = mediaHeight / bloc.mediaHeightBase;
|
||||
|
||||
@@ -59,7 +60,7 @@ class TutorialWidget with Trans, Logging {
|
||||
calculatedTop = 10;
|
||||
}
|
||||
print("Height: $mediaHeight, width: $mediaSize distortion: $distortion top: ${bloc.top!} calculated $calculatedTop");
|
||||
print("targetCenter X ${targetGlobalCenter.dx}");
|
||||
print("targetCenter X ${targetGlobalCenter.dx} - Y: ${targetGlobalCenter.dy}");
|
||||
|
||||
tooltip = SuperTooltip(
|
||||
top: calculatedTop,
|
||||
|
||||
Reference in New Issue
Block a user