Skip to main content

Posts

Add read more/ less to Android TextView

In this quick article, I’m going to show you how to add read more/ less components to android TextView. Finally, your text view looks like this.
Recent posts

How to identify release mode in Flutter with kReleaseMode

Find whether the Flutter application compiled in release mode or not is very important in some cases in flutter development. In my case, I wanted to avoid the Red Screen Of Death by showing a custom error handler widget. But I only want it shown for release builds only. How we find, our app is in release mode? The easiest way is to use  kReleaseMode constant in the flutter constants. This constant is true if the application was compiled in release mode. Since this is a const value, it can be used to indicate to the compiler that a particular block of code will not be executed in release mode, and hence can be removed. So it's an another advantage of using this constant.  Happy Coding!

Run Flutter UI tests in CircleCI

Flutter allows you to create UI tests with Flutter Deriver. By creating UI tests and automate UI test execution helps to identify most of the UI issues even before QA testing. That helps to reduce a lot of time that has to spend on testing. To run UI tests you need emulators or remotely accessible devices.    You may aware that running the Android emulator is not currently supported on CircleCI 2.0, since it's not supported by the type of virtualization CircleCI uses on Linux. So they are suggesting to use external service like Firebase TestLab. If you developed your app with Flutter then Firebase TestLab is not an option since Firebase TestLab not supports for flutter test UI execution. For my recent flutter project, I needed to configure CircleCI for Flutter UI test execution. Even CircleCI Linux instance, not support for the android emulator, with MacOS instance we can run the emulator. Since we can build both Android and iOS builds in MacOS instance it's worth givi