Skip to content

Apps launch and UI visible but no response to touch. No text visible in apps. #178

Open
@octonout

Description

@octonout

Hello. I have been trying to get flutter apps to run on my RPi 3B+ that is running a Yocto image. Haven't had much success yet.

Target: Raspberry Pi 3B+
OS: Yocto (Dunfell) with raspberrypi3-64 as the MACHINE (64-bit). I am using the meta-flutter layer developed by jwinarske.

Display: Waveshare 7inch HDMI LCD (B). Resolution: 800x480. Dimensions: 154.08, 85.92.
Display config added to /boot/config.txt:

max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
hdmi_drive=1

From the meta-flutter layer I have added flutter-pi and flutter-gallery to the Yocto image.

I have tried running flutter-gallery.
Command:
$ flutter-pi -i /dev/input/touchscreen0 -d "154,86" --release /usr/share/flutter-gallery/sony/data/flutter_assets/
The app is launched and the UI is visible. But the app does not accept any touch input.
Output displayed by flutter-pi: pastebin

Sidenote: Before I had the fontconfig package installed I used to get these errors in the flutter-pi output:

Fontconfig error: Cannot load default config file
Fontconfig error: Cannot load default config file

Using $ cat /dev/input/touchscreen0 and then touching the touchscreen produces random output. Touching anywhere on the screen does this. So I am guessing that touch is set up correctly?

Because the flutter-gallery app wasn't working, I decided to try and make my own app using the instructions you have provided in the README.md.

These are the commands I used. Hope nothing is wrong here.

$ <path-to-dart-sdk-bin-dir>/dart \
<path-to-dart-sdk-bin-dir>/snapshots/frontend_server.dart.snapshot \
--sdk-root ~/flutter_development/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk_product \
--target=flutter --aot --tfa -Ddart.vm.product=true --packages .packages \
--output-dill build/kernel_snapshot.dill --verbose --depfile build/snapshot_blob.bin.d \
package:codelab_app/main.dart
$ <path-to-arm64-engine-binaries>/gen_snapshot_linux_x64_release \
--deterministic --snapshot_kind=app-aot-elf \
--elf=build/flutter_assets/app.so --strip build/kernel_snapshot.dill

The apps I created launch on the Pi. But none of the text is visible on the screen. For the flutter example app, the appbar on top doesn't show the title. There is no text showing the current value of the counter. And touching the + button does nothing, there is not animation on the button when its touched. Output: pastebin

App 2 is the app that gives infinite word pairs on scrolling. It runs and has the same problem, no title text is visible in the appbar. This app has a listview with lines dividing the list tiles. The divider between the list tiles isn't shown. Touching the screen does nothing. Output: pastebin

These apps run fine on my Linux Desktop. At this point I am kind of out of ideas. I am new to flutter and I don't know much about the how flutter-pi works so I am having difficulty in troubleshooting this. Sorry that this post is so long.

Any help is appreciated. Thanks.

P.S. Earlier I was facing an issue with flutter-pi where touching the button in the top right corner used to produce this error: pastebin: https://pastebin.ubuntu.com/p/qhDcDVKg4j/
Now touching that button does nothing. Installing fontconfig might have fixed it. I am not sure how those two could be connected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions