Questions tagged [flutter-plugin]

Use this tag for questions related to the creation or modification of plugins in flutter. For the use of, or issues with, plugins as dependencies, use [flutter-dependencies] instead.

Flutter plugins make the functionality of native code available to Flutter. This can be done through the use of platform channels.

See Developing plugin packages for more information.

492 questions
13
votes
3 answers

How to open flutter plugins at Xcode?

I want make some changes in plugin. For android part everything is clear. But how can I open iOs part of plugin? There are no Xcode project just several .h and .m files. How to open iOs plugin at…
otopba
  • 214
  • 1
  • 6
  • 14
13
votes
7 answers

Flutter open facebook link in facebook app android & ios

In my app i have stored Facebook url's. I want to open them in facebook app not in browser. I tried using flutter_url_launcher package but it open the link in default browser ... What i want is to open the link directly into the facebook app . Can…
Atif Siddiqui
  • 325
  • 2
  • 4
  • 9
12
votes
1 answer

Flutter: facebook_app_events iOS 14 compliance (setAdvertiserTrackingEnabled)

Reading through the Facebook App Events Documentation and general iOS 14 guidelines, it looks like we need to check for ask users for consent for Advertiser tracking any time information is sent to Facebook. I don't see an API endpoint for the…
beechan
  • 121
  • 3
12
votes
5 answers

Get activity reference in flutter plugin

When I created a flutter plugin, there are two methods in the plugin class by default: override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) and fun registerWith(registrar: Registrar) The comment on the file…
Neeraj
  • 2,376
  • 2
  • 24
  • 41
12
votes
2 answers

Unit Testing for Providers in Flutter

We have started a new project on Flutter in the TDD approach. I am using providers for State Management. While trying to write the Widget Testing we are facing the issue to test the providers. Can you please suggest with an example to write the unit…
12
votes
2 answers

Unable to add iOS dependency to Flutter plugin

I am creating a Flutter plugin. But when I am trying to add a dependency to iOS part of the plugin I am not finding any proper guideline for this. I declared the dependency in the podspec file of my plugin. But the dependency is only available in…
sagar suri
  • 4,351
  • 12
  • 59
  • 122
11
votes
1 answer

Add plain Android library to a Flutter plugin

This might be a duplicate of this question. But it has no answer and I will give some details here. I have created a module with File->New Module->Android Library inside my Flutter plugin's android project. And now I have a structure like…
Sait Banazili
  • 1,263
  • 2
  • 12
  • 27
10
votes
2 answers

Are there any possibilities to add an image on text in Flutter?

I have been searching for possibilities to use an image as the background of Text widget in Flutter for very long, and I am tired of getting some HTML/CSS solutions on the internet. cut-out text effect is little similar, but it's not the thing I…
Kavin-K
  • 1,948
  • 3
  • 17
  • 48
10
votes
5 answers

Flutter -PDF -- Error - This widget created more than 20 pages. This may be an issue in the widget or the document

I am creating a PDF document that has a large content. However, I am not able to show the PDF and I get the error "This widget created more than 20 pages. This may be an issue in the widget or the document." I know the text is too large but I…
user2570135
  • 2,669
  • 6
  • 50
  • 80
10
votes
3 answers

How to debug iOS native code in a flutter plugin?

I'm wonder how to debug flutter iOS code in a plugin? I can open the example app that's generated whenever you create a plugin but I see the plugin code as binary framework, therefore I can't debug it. For android it's fairly easy, I just open the…
Shehabic
  • 6,787
  • 9
  • 52
  • 93
10
votes
3 answers

Flutter plugin `geolocator-Swift.h` file not found

I have created a small Flutter plugin which can be used to monitor location changes in you Flutter application (source: https://github.com/baseflowit/flutter-geolocator). After extensive testing using the example project that is part of the project…
Maurits van Beusekom
  • 5,579
  • 3
  • 21
  • 35
9
votes
1 answer

Implement In app promotion on subscription with promo code in flutter using in_app_purchases official library

I recently implemented the in-app subscription into my app. Now I am working on adding the promo codes for a subscription. People with promo code can have 15 days trial and after that, they'll be…
9
votes
4 answers

Why does ApplicationsDocumentsDirectory return null for unit test?

I'm using flutter "path_provider" plugin. I needed an SQLite operation. My error test class doesn't find "getApplicationDocumentsDirectory" and return null. The application runs for simulator/real device any working no problem. Looking for provider…
vb10
  • 641
  • 5
  • 14
9
votes
8 answers

Flutter iOS build fail on running pod install

I'm trying to make a flutter plugin, so I created a plugin by steps provided on https://flutter.dev/docs/development/packages-and-plugins/developing-packages. I'm getting an error when I try to run an ios example. Below is the log I'm getting while…
Amol Gangadhare
  • 1,059
  • 2
  • 11
  • 24
8
votes
1 answer

Flutter plugin: Send data from Android BroadcastReceiver to Flutter code

I'm developing a Flutter plugin (for Android only) that automatically executes a Flutter task when the device connects to a specific bluetooth device. Here is what I do in the Android side of the plugin: In the manifest, I register a…
Valentin
  • 5,379
  • 7
  • 36
  • 50
1
2
3
32 33