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.

304 questions
130
votes
18 answers

Check whether there is an Internet connection available on Flutter app

I have a network call to be executed. But before doing that I need to check whether the device have internet connectivity. This is what i have done so far: var connectivityResult = new Connectivity().checkConnectivity();// User defined class …
Rissmon Suresh
  • 8,535
  • 5
  • 26
  • 33
36
votes
4 answers

Update flutter dependencies in /.pub-cache

I erased in my folder .pub-cache/hosted/pub.dartlang.org/this_plugin What is the command to update the dependencies inside pubsec.yaml? I believe it is flutter packages get The folder under .pub-cache is still not up to date. Note: there was a…
Raymond Chenon
  • 8,990
  • 10
  • 64
  • 97
26
votes
6 answers

How to enable Swift support for existing project in flutter

I want to know if there is a way to enable swift support for flutter project. I only enabled Kotlin support while creating the project. I need to enable Swift too. Is there a command I can execute or any setting in flutter plugin for Android studio…
Shashi Kiran
  • 709
  • 1
  • 12
  • 20
19
votes
4 answers

Invoke Flutter (Dart) code from native Android home screen widget

I added a native Android home screen widget to my Flutter application. In my AppWidgetProvider implementation, I'd like to call dart code in my onUpdate() method using a platform channel. Is this possible? If so, how can this be achieved? My current…
Westy92
  • 11,877
  • 2
  • 53
  • 44
16
votes
3 answers

How to use local aar inside flutter plugin?

I've create a flutter plugin with: flutter create --template plugin flutter_plugin I've put my aar file inside flutter_plugin/android/src/main/libs folder I've modified flutter_plugin/android/build.gradle and changed rootProject.allprojects section…
Vladimir
  • 367
  • 3
  • 8
13
votes
1 answer

How to access camera frames in flutter quickly

I would like to implement near real-time OCR on the camera feed of my flutter app. To do this I would like to access the camera data in a speedy manner. As far as I can tell I have two options, and have hit roadblocks with both: Take a screenshot…
EduardKieser
  • 361
  • 3
  • 11
11
votes
2 answers

Scrolling priority when combining horizontal scrolling with WebView

I have a vertically scrolling WebView inside a horizontally scrolling PageView. Something like this: PageView.builder( itemCount: 5, itemBuilder: (context, index) { return WebView( initialUrl: 'https://flutter.dev/docs', …
Ludwik Trammer
  • 21,961
  • 6
  • 61
  • 86
11
votes
1 answer

Is there any support for using Facebook SDK in Flutter?

I would like to add the Facebook app-events to my Flutter project : https://developers.facebook.com/docs/app-events/android https://developers.facebook.com/docs/app-events/ios It relies on the Facebook SDK. However, it seems that there is no…
h19881103
  • 303
  • 3
  • 9
9
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…
negative_zero
  • 883
  • 1
  • 8
  • 21
9
votes
2 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
  • 3,264
  • 1
  • 12
  • 30
8
votes
2 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
  • 1,895
  • 16
  • 31
8
votes
0 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
  • 3,343
  • 7
  • 41
  • 94
8
votes
4 answers

flutter_facebook_login CocoaPods dependency error

I am try add facebook login to Flutter app. I am use flutter_facebook_login. But when I try build for iOS give error: Resolving dependencies of `Podfile` [!] CocoaPods could not find compatible versions for pod "FBSDKLoginKit": In…
FlutterFirebase
  • 1,379
  • 1
  • 15
  • 38
7
votes
2 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
  • 213
  • 3
  • 6
6
votes
4 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
  • 1,459
  • 1
  • 23
  • 47
1
2 3
20 21