Skip to main content

Posts

Showing posts from July, 2019

How I Reduced the Size of My React Native App by 85%

How and Why You Should Do It I borrowed 25$ from my friend to start a Play Store Developer account to put up my first app. I had already created the app, created the assets and published it in the store. Nobody wants to download a todo list app that costs 25mb of bandwidth and another 25 MB of storage space. So today I am going to share with you how I reduced the size of Tet from 25 MB to around 3.5 MB. Size Matters Like any beginner, I wrote my app using Expo, the awesome React Native platform that makes creating native apps a breeze. There is no native setup, you write javascript and Expo builds the binaries for you. I love everything about Expo except the size of the binaries. Each binary weighs around 25 MB regardless of your app. So the first thing I did was to migrate my existing Expo app to React Native. Migrating to React Native react-native init  a new project with the same name Copy the  source  files over from Expo project Install all de...

Parsing JSON in Flutter

For those of you who do not know what is Flutter then Flutter is an open-source mobile application development SDK created by Google. It is used to develop applications for Android and iOS. or you can visit  https://flutter.dev let's talk about JSON parsing in flutter. I know it is really confusing for beginners to understand how to parse JSON data. Let’s Start with a JSON example Suppose I want to access the articles list but the articles have many attributes and we need to parse the article array into our app. Let's see what we have in the article So How we are going to do that? Step 1: Create a PODO First of all, we have to create a  PODO (Plain Old Dart Object)  for a particular article. To access source in the Article we also have to create a  PODO  for Source. class Article { Source source; String author; String title; String description; String url; String urlToImage; String publi...