An Introduction to Flutter: The Basics

An Introduction to Flutter: The Basics


Welcome to my first tutorial on Flutter. I have never written any post on cross-platform or hybrid app framework but Flutter has changed my mindset.
I’ve been hearing about how amazing Flutter is and I’ve decided to try it out to learn something new. It started by watching, then reading, and then I started coding. It was a good experience. Apps were running, and everything that was written wasn’t hard to understand.I decided that reading the documentation on Dart, Flutter and all of its widgets wouldn’t be a good idea as it would be too time consuming. Also, I didn’t have a lot of time as the purpose was to get to know the new thing, and not to become an expert in the field. I thought at that moment that it would be amazing if there was a short guide on Flutter, that would describe all the necessary concepts to understand the framework and be able to write simple apps, but no more!Now I just started I’ll keep it short, to save your time. For the most curious of you, I’ll put useful links around the text.

About The Platform

What is Flutter?


It is a multi-layered system, such that higher layers are easier to use and allow you to express a lot with little code and lower layers give you more control at the expense of having to deal with some complexity.Flutter Framework is written entirely in Dart. Most of the engine is written in C++, with Android-specific parts written in Java, and iOS-specific parts written in Objective-C. Like React Native, Flutter also provides reactive-style views, but Flutter takes a different approach to avoid performance problems caused by the need for a JavaScript bridge by using a compiled programming language, namely Dart.
High performance and productivity in Flutter are achieved by using several techniques:

    About Dart

    Dart is a programming language that we’ll use to develop our application in Flutter. Learning it isn’t hard if you have experience with Java or JavaScript. You will quickly get it.

    Project Structure

    Let’s first see what’s in the project generated by the Flutter framework:
    • lib/ - just as pub (Dart’s package manager), all the code will be here
    • pubspec.yml - stores a list of packages that are required to run the application, just like package.json does it. You should remember that in Flutter projects you cannot use pub directly, but instead, you will use the Flutter command: flutter pub get <package_name>
    • test/ - I’m sure you know what this is about. Right? You can run them via flutter test
    • ios/ & android/ - the code specific for each platform, including app icons and settings where you set what permissions you’ll need for your application (like access to location, Bluetooth).

    We don’t need to know more about the files in the folder for now. Let’s open the lib/folder where main.dart is waiting for us. As you can guess this one is the entry point of our application. Just like in the C language (or tons of others) the app will be executed by calling the main() function.







    Comments

    Popular posts from this blog

    Working with Geolocation in Flutter

    Fetch data from the Soap Webservice