Posts

#2 Android Studio - Working with Assets

Image
Tutorial on how to add an image from PC into our App Step 1 : In order to add images from our laptop, we have to create a separate directory in Android Studio to add the image.For this select New - Directory - Type Images and copy the image to the directory 'Images' under your ****_app file . You can download the image using this link : Diamond.png Step 2 : Now open pubspec.yaml file from 'test' and you can see Flutter : assets engraved in green color(commented).Inorder to uncomment select from assets: to .jpeg and press Ctrl + / .Now erase all other comments which are not required(green colored text). Note : In .yaml file we comment using # Make sure your code looks like this and then press pub get dispalyed on the top.   Note : You name,version,environment nad cuprttino_icons values might change prior to the version used Step 3 : Now go back to main.dart and type the code.The only difference from the #1 Android Studio - Scaffold code is that we have chan...

#1 Android Studio - Scaffold

Image
Tutorial on How to make a simple app using Android Studio (Add Image to an App from google) This is a simple app portraying an image of your choice in which you can change the background color and the App-bar color.The picture used in this code is taken from google using the command 'NetworkImage' . The whole code is placed inside a class for Hot Reload(you need not execute the code every time you change) which helps us to execute the code in an easy way.We are using the command 'Scaffold' for placing the image and app-bar and it is embedded in 'MaterialApp' which is the background widget for placing items. *select the image to increase visibility You can notice all the codes are inside widgets and android studio automatically helps you to program in simple and easy manner.The picture in the right displays the code opened in the emulator. Code : import 'package:flutter/material.dart' ; void main () { runApp( MyApp ()) ; } class MyApp ex...