How to Import intl Library in Flutter? Last Updated : 20 Feb, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report Flutter supports using shared packages contributed by other developers to the Flutter and Dart ecosystems. This allows the developers to quickly build an app without having to develop everything from scratch. One such very helpful and Flutter Favourite package is the intl package published by the dart.dev. To use the intl package as a library in our Flutter project we need to add the package as a dependency in our project which can be done in two ways as listed below. Method 1: Adding intl package with a terminal command Navigate to the terminal with its scope set to the root of the Flutter project and run the command given below, flutter pub add intl Method 2: Adding intl package manually via pubspec.yaml The previous method automatically adds the package in pubspec.yaml, however you can do the same manually as well. You need to also add the package inside the pubspec.yaml file under the dependencies field as shown below: dependencies: intl: <Package Version> For example, intl: ^0.17.0 After writing the package details in the dependencies section in pubspec.yaml run the flutter pub get command in the terminal. When running flutter pub get for the first time after adding a package, Flutter saves the concrete package version found in the pubspec.lock lockfile. This ensures that you get the same version again if you, or another developer on your team, run flutter pub get. After adding the package in pubspec.yaml whenever you are required to use the package add the below-shown import statement in the file. import 'package:intl/intl.dart'; Now you can easily use the functions and widgets provided by the intl package in your Flutter project. Comment More infoAdvertise with us Next Article How to Import intl Library in Flutter? H hemangdtu Follow Improve Article Tags : Dart Flutter Geeks Premier League Geeks-Premier-League-2022 Similar Reads How to Import Local Package in Flutter? Flutter is a framework that is used for developing cross-platform applications for Android, iOS, Linux, macOS, Windows, and other web applications using a single source code and it was developed by Google. Flutter is a free and open-source software development kit for developing mobile applications. 4 min read How to Install HTTP Package in Flutter? Flutter is Googleâs Mobile SDK to build native iOS and Android apps from a single codebase. When building applications with Flutter everything towards Widgets â the blocks with which the flutter apps are built. The User Interface of the app is composed of many simple widgets, each of them handling o 2 min read How to Install Flutter in Eclipse? Flutter is a framework for building cross-platform applications (android, ios, web) which use Dart as its programming language. Before IDEs like Android Studio and VS code became popular, Eclipse used to be heavily used by developers. Now we can install dart inside our Eclipse IDE with the help of t 2 min read How to Install Flutter on Linux? In this article, we will learn how to install Flutter in Linux Flutter is an open-source UI software development kit created by Google. It is used to develop cross-platform applications for Android, iOS, Linux, Mac, Windows, Google Fuchsia, and the web from a single codebase. Installing Flutter on L 2 min read How to Install Shared Preferences in Flutter? Shared preferences in flutter applications are used to store data in Local Storage. Shared Preferences store the data in a key-value pair. and we can also get data in a key-value pair using inbuilt functions. We can save large data in local storage or our Phone storage with the help of SQLite databa 2 min read Like