Posts

Showing posts from March, 2020

Adding the custom fonts in Flutter

For download the fonts, use google fonts . you can get huge collection of fonts here. Create the folder under your project: Example: flutter_project -> File -> New -> Directory -> create the directory named as "fonts". paste the fonts, which you download from google fonts or other sources. rename the fonts, It makes you easier name to remember, If you want. Just optional. As I'm already informed you pubspec.yaml is manifest for the flutter projects. Go to pubspec.yaml write the following example code: flutter:   uses-material-design: true   assets:     - images/   fonts:     - family: serif       fonts:         - asset: fonts/serif-regular.ttf     - family: arial       fonts:         - asset: fonts/arial-bold.ttf Afterwards, don't forget to do packages upgrade and packages get. then in your text widget, Text("I'm right here",                 style: TextStyle(                     fontSize: 22,            

change the app icon in flutter - part 2

Previously, I already given an idea  about how to change the app icon. Now this is new way, Please be choose high resolution icon, at least of 256*256 size. Drag your app icon into appicon.co there choose the icon for iphone and android devices, It's automatically generate the icons for android and icons as complete zip file. For android, you can collectively get the mipmap folder, replace it in android folder in your flutter project. In AndroidManifest.xml apply app icon. For IOS, AppIcon.appiconset folder, paste the entire directory into your flutter project -> ios -> Runner -> Assets.xcassets If any of app directory already exists in android or ios folders, please remove or replace it with our new icons sets which we got from appicon.co. 

Flutter Tips - 01

If you want to remove the debug on from your emulator/Simulator In Android Studio Open -> Flutter inspector -> More actions -> Hide debug mode banner In Flutter, we don't define all images in pubspec.yaml file. flutter:   uses-material-design: true   assets:     - images/ because from images folder, you access all images from there.  Also don't forget, In .yaml make a string intent very careful. every two space of next line should be considered as child. yaml is human readable data serialization language, not markup language. It's usually used on configure the files. 

Change the app icon in flutter.

This is second new assignment to change the app icon in flutter. use "flutter_launcher_icons" in command tool. in pubspec.yaml add the following line: dev_dependencies:   flutter_test:     sdk: flutter   flutter_launcher_icons 0.7.4 flutter_icons:   image_path: "icon/icon.png"    android: true   ios: true push your icon on specific path then run on command: $ flutter pub get $ flutter pub pub run flutter_launcher_icons:main the file list will shown after the command execution. Flutter launcher icons link: https://pub.dev/packages/flutter_launcher_icons

Change the application name in Flutter

Hi, It's my first post in 2020. Oh!! world is full of corana virus thread and peoples are worrying about to go outside, Hope It's solve soon. Will pray the god for give a strength to us and protect from all disease. Hope we're blessed. Let's kick start the flutter, World talking about flutter over last few years, now It's almost got so stable and good. First of all, we need to change the application name. For android and IOS, mostly peoples know, where to change. In Flutter, It's bit different and not difficult. To changing the app name, For Android: Open AndroidManifest.xml -> from android folder and change the label name. For IOS: Open info.plist -> located at ios/Runner Don't forget to run flutter clean