2 1 What are Flutter Dart Packages

139 Просмотры
Издатель
Package introduction
Packages enable the creation of modular code that can be shared easily. A minimal package consists of the following:

pubspec.yaml
A metadata file that declares the package name, version, author, and so on.
lib
The lib directory contains the public code in the package, minimally a single "package-name".dart file.

Package types
Packages can contain more than one kind of content:

Dart packages
General packages are written in Dart, for example, the path package. Some of these might contain Flutter specific functionality and thus have a dependency on the Flutter framework, restricting their use to Flutter only, for example, the fluro package.
Plugin packages
A specialized Dart package that contains an API written in Dart code combined with one or more platform-specific implementations.
Plugin packages can be written for Android (using Kotlin or Java), iOS (using Swift or Objective-C), web, macOS, Windows, or Linux, or any combination thereof.

A concrete example is the url_launcher plugin package. To see how to use the url_launcher package, and how it was extended to implement support for the web, see the Medium article by Harry Terkelsen

THANKS FOR WATCHING AND DON'T FORGET TO LIKE, COMMENTS, SUBSCRIBE AND HIT THE BELL ICON TO WATCH LATEST VIDEO!

#edudreams #Flutter#flutter tutorial#flutterdev
Категория
Язык программирования Dart
Комментариев нет.