Here is how to convert String to int and int to String in Flutter or Dart. String to int You can use int.parse(data) to convert String to int. Flutter String to int Example : main () { var one = int.parse('1'); print(one == 1); // prints true } Int to String You can use […]
Category: Mobile
How to change application launcher icon in Flutter
We can change the app launcher icon using following approaches : 1. Native approach to change launcher icon: Create the icons : You can either create the icons urself or use a website like https://appicon.co/ Changing app launcher icon for Android Replace the midmap* icons in android/app/arc/main/res folder with the generated ones in android […]
Flutter error – xcode_backend.sh: No such file or directory
Error message : xcode_backend.sh: No such file or directory Solution: xcode_backend.sh exists in flutter SDK location. In Project Target, add User-Defined Setting with key name FLUTTER_ROOT with the value of your flutter SDK location. Create FLUTTER_ROOT key in Runner -> Build Settings as follows : If you don’t remember where you have installed flutter sdk try this […]
Flutter error with Xcode : Connecting to the VM Service is taking longer than expected
I’ve faced the flutter error “Connecting to the VM service taking longer than expected” several times during developing flutter apps. This seems to be a common error and more information can be obtained from the Xcode logs about the exact error message. This is how the error looks : Connecting to the VM […]
Flutter Least Common Multiple (LCM)
For finding LCM, we need to use the gcd function that Dart provides : int gcd(int other); LCM can be calculated as follows: int getLCM(int a, int b) { return (a * b) ~/ gcd(a, b); } Here is the complete code : void main() { int a = 10, b = 25; int […]