Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“onPointerMove” Method does not work #30

Closed
gk-1213 opened this issue Feb 17, 2023 · 5 comments · Fixed by #40
Closed

“onPointerMove” Method does not work #30

gk-1213 opened this issue Feb 17, 2023 · 5 comments · Fixed by #40
Labels
bug Something isn't working confirmed The problem described in this issue is confirmed unexpected behaviour

Comments

@gk-1213
Copy link

gk-1213 commented Feb 17, 2023

The onPointerMove method in this code does not work

import 'package:flutter/material.dart';
import 'package:betrayal/betrayal.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        home: Scaffold(
            appBar: AppBar(title: const Text("Look at the system tray 👀")),
            body: Center(
                child: TrayIconWidget(
              winIcon: WinIcon.application,
              // tooltip: "Here I am!",
              onPointerMove: (position) {
                print(position);
              },
              child: Text("111"),
            ))));
  }
}
@benthillerkus
Copy link
Owner

Can you share some system information incl Windows version?

@gk-1213
Copy link
Author

gk-1213 commented Feb 20, 2023

processor 12th Gen Intel(R) Core(TM) i5-12400 2.50 GHz
Belt RAM 16.0 GB (15.7 GB 可用)
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input available for this display

Version Windows 11 Professional
Version 21H2
Operating system version 22000.1455

@benthillerkus
Copy link
Owner

Haven't had a chance to look at this (yet), but what happens when you enable the BetrayalPluginLogger and set it to fine? iirc it should first log that the event was registered and then whenever you hover the cursor over the icon it should log the position.

@gk-1213
Copy link
Author

gk-1213 commented Feb 21, 2023

I can see some information in Flutter's log when I open BetrayalPluginLogger.
image
But why doesn't the "print" method work in "onPointerMove"
And a warning will appear
image

@benthillerkus benthillerkus added bug Something isn't working confirmed The problem described in this issue is confirmed unexpected behaviour labels Feb 23, 2023
@benthillerkus
Copy link
Owner

@gk-1213 both of your issues should be fixed in betrayal 1.3.7. Thanks for pointing them out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed The problem described in this issue is confirmed unexpected behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants