Is there any way to add a plugin only for a particular platform (like just for iOS) in pubspec.yaml
file?
Something like this.
dependencies:
flutter:
sdk: flutter
isIos ? http: ^1.0 : null
PS: I also know I can import the plugin normally and in code, I can make changes but I don't want this solution.
if (Theme.of(context).platform != TargetPlatform.iOS) {
// don't use that plugin part
}
I simply don't want to add plugin in my pubspec.yaml
for a particular platform. Possible?