What are Packages and Plugins in Flutter?
Package: Reusable Dart code (e.g.,
http,provider)-
Plugin: Package that also includes platform-specific code (e.g.,
camera,shared_preferences)
Install using:
Import and use:
Package: Reusable Dart code (e.g., http, provider)
Plugin: Package that also includes platform-specific code (e.g., camera, shared_preferences)
Install using:
flutter pub add http
Import and use:
import 'package:http/http.dart' as http;
Comments
Post a Comment