The Flutter adding external packages development tutorial describes how to install third-party libraries to you flutter application.
Disclaimer: Note this is my first time on using the flutter development environment and dart programming language. So let’s learn flutter together and join me on my journey on where I learn how to create flutter applications using the dart programming language.
The flutter tutorial follows on from the hello world tutorial.
Pre-requisites
Knowledge of the dart programming language is not required, but the experience of an object orientated programming language is recommended. Such as Java, C++, Kotlin, Swift to name a few.
Introduction
In this flutter development tutorial we will cover:
- How to install third party packages
- How to import third part libraries in dart source code
- Creating an immutable class instance
- Calling a dart class method
Episodes
- Installing Flutter
- Downloading flutter project from GitHub
- The Hello World App
- Adding External Packages
- Stateful Widget
- Infinite Scrolling List
- Adding user interaction
- Switching screens
Conclusion
In this flutter tutorial we learned how to install and import an external package.
The example we used was the english_words library.
We also demonstrated how to create an immutable value using the dart keyword Final. The value of type WordPair was generated by calling the WordPair class random method.
We then replaced the Hello World text with wordPair value.
In the following flutter tutorial, we describe how to use the stateful widget for creating widgets which can have mutable properties.