Skip to content

Touch Issue #123

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

Closed
vigno88 opened this issue Nov 19, 2020 · 8 comments
Closed

Touch Issue #123

vigno88 opened this issue Nov 19, 2020 · 8 comments

Comments

@vigno88
Copy link

vigno88 commented Nov 19, 2020

Hi!

First thanks a lot for your port, this is amazing! I'm new to flutter and I would like to use it as a ui framework for raspberry pi so I buil the 'flutter gallery' example and everything worked fine, I used a touchscreen and it worked like a charm. So I did one of
the example that is on the google docs website build it on my host. Then I repeated the exact same procedure that I did for
the flutter gallery to run it on the pi, but with my new super basic app ( the shoplist example ) won't respond to any touch input. I tried rebuilding it many time, adding some small changes but nothing works. Is there something that I am missing ? Do I need to add a specific package or configure something for it to works?

side note: I am using the default touch library.

Thanks a lot for your help,

Nathan

@ardera
Copy link
Owner

ardera commented Nov 19, 2020

Hey,
if it works with flutter gallery but doesn't with your test app, it's likely caused by your test app. Flutter-pi's touch support should be the same on all apps.

There's a subreddit and a discord where you can get help debugging your app, see the flutter community page.

When you change the state of any stateful widgets, make sure you're calling the setState function, since otherwise the build function won't be called. Maybe you forgot to call setState in some touch/ button press callback. When you don't call setState, flutter assumes the state of your stateful widget didn't change, or that it did change, but not in a way affecting the output of the build function.

@vigno88
Copy link
Author

vigno88 commented Nov 19, 2020

My test app works when I use the android emulator on my desktop. I have tested it before building it for the pi. But thanks for your quick answer! Now I know that the problem is somewhere on my side and that I haven't missed anything important.

@vigno88 vigno88 closed this as completed Nov 19, 2020
@vigno88
Copy link
Author

vigno88 commented Nov 20, 2020

Hey again,

My app runs fine on an android emulator on my pc. I tried doing the exact same thing that you said in the readme and I still don't have any touch support even though it works well for the flutter gallery. I tried to replace the main of the flutter_gallery project with the main of my own project and i still don't have touch support. Do you have a sample project near that you know will work so I can try to debug with it?

I use a raspberry pi model 3 b+

@vigno88 vigno88 reopened this Nov 20, 2020
@ardera
Copy link
Owner

ardera commented Nov 20, 2020

Actually, I mostly use flutter gallery for testing. All the other apps I have depend on specific peripherals (for example an ELM327 connected via Bluetooth, a SI468X connected via SPI)

If you want, you can send me your app and I'll try to get it working (or publish it as a github repo so I can fork it)

@vigno88
Copy link
Author

vigno88 commented Nov 20, 2020

Oh nice! You are building application for cars?

I think I was not patient enough.. In --release i have still no touch, but without the --release the app wouldn't open so I always shut it after a few seconds but this morning a waited a little bit more, the app opened and now everything works like a charm!

Thanks again for you port!

@ardera
Copy link
Owner

ardera commented Nov 20, 2020

Oh nice! You are building application for cars?

Exactly, actually I only developed flutter-pi so I can have a nice & modern UI in my car

I think I was not patient enough.. In --release i have still no touch, but without the --release the app wouldn't open so I always shut it after a few seconds but this morning a waited a little bit more, the app opened and now everything works like a charm!

Thanks again for you port!

Nice! Yeah debug mode takes a bit longer to start, I think it's mostly spend on disk IO. So a faster SD card may help

It's still weird it doesn't work in release mode, it should work fine there too

@vigno88
Copy link
Author

vigno88 commented Nov 20, 2020

Exactly, actually I only developed flutter-pi so I can have a nice & modern UI in my car

That must be so perfect, you can have any data you want from car at any time. Good luck with this project!

Nice! Yeah debug mode takes a bit longer to start, I think it's mostly spend on disk IO. So a faster SD card may help

I note that down.

@ardera
Copy link
Owner

ardera commented Jan 31, 2021

That must be so perfect, you can have any data you want from car at any time. Good luck with this project!

(a bit late but) thanks! Closing this now, since it seems to be resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants