I have sticky keys on my P80. I check the most serious one and it appears to be broken as some others suggested. I initially just tried to glue the broken piece together but it doesn’t solve the sticky issue completely. I eventually tried the needle method described in this blog post and webpage. I…
Month: August 2020
Mixin
Mixin is an incomplete class that can be mixed into multiple classes. For example, mixin Fluttering { void flutter() { print(‘fluttering’); } } abstract class Bird with Fluttering { void chirp() { print(‘chirp chirp’); } } Note that the Fluttering mixin can be used in multiple classes. If we want to restrict the mixin to…
Cannot locate adb starting Android emulator in Android Studio
I got this obscure problem and couldn’t resolve it no matter what I tried. It turns out it simply was because I was running virtualbox on another desktop and I wasn’t aware of that. The error is totally misleading. I was using Ubuntu 16.04. After I shut down the other virtual machine, Android emulator started…
Dart Cheatsheet
I found this cheatsheet very useful in understanding some unique features of Dart such as (?? and ..).
Game programming with Flutter and Flame
A very nice video tutorial to build 2D game with Flame/Flutter. I’m new to Flutter and Dart. I usually write in Python and wrote some Java decade ago. Dart is reasonable intuitive if one is familiar with Java or C/C++/C#. I came across some issues going through the tutorial though. I use Ubuntu 16.04 and…
Asynchronous programming in Dart
There are three keywords future, await, async to achieve asynchronous programming in Dart. I found the below example from the official documentation is most insightfull. Future printOrderMessage() async { print(‘Awaiting user order…’); var order = await fetchUserOrder(); print(‘Your order is: $order’); } Future fetchUserOrder() { // Imagine that this function is more complex and slow….