Questions tagged [dart-packages]

42 questions
17
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
  • 373
  • 2
  • 3
  • 9
8
votes
1 answer

How can I use dart:ui in a command line Dart application?

I know that dart:ui contains "Built-in types and core primitives for a Flutter application". I'd like to use Color and other functionality from this package (computeLuminance) in a command-line (Dart) application that converts some data files. (I…
TechAurelian
  • 5,561
  • 5
  • 50
  • 65
6
votes
2 answers

How to get the file path to an asset included in a Dart package?

I am writing a Dart package (not Flutter). I have included a few bitmap images as public assets, e.g., lib/assets/empty.png. When this package is running as a command-line app for an end-user, how can I get the file path to these assets on the…
6
votes
4 answers

Font from a package (library) not showing up in Flutter app?

I have a package named Handwriter. It writes text in a custom font. I have the .ttf saved in lib/third_party/. In its pubspec.yaml, I add the font: flutter: uses-material-design: true fonts: - family: FancyHandwriting fonts: …
Mary
  • 18,347
  • 23
  • 59
  • 76
6
votes
6 answers

Create a package in dart

How do I create a package in the new Dart Editor? There is no "Add Pub support" checkbox? Also how to create "packages" with the new editor? Is a tutorial out there that describes the process with the new Editor?
mc_fish
  • 493
  • 3
  • 10
5
votes
7 answers

The method 'play' isn't defined for the type 'AudioCache'

issue The method 'play' isn't defined for the type 'AudioCache'. import 'package:flutter/material.dart'; import 'package:audioplayers/src/audio_cache.dart'; void main() { runApp(XylophoneApp()); } class XylophoneApp extends StatelessWidget…
Raj
  • 51
  • 1
  • 1
  • 2
5
votes
3 answers

Facebook for Flutter App Crashes on IOS and works fine on Android

App for unknown Reasons Crashes on pressing on facebook login button for IOS but it's working perfectly on android for unknown reasons ,, if anyone faced this problem please tell how to you solved it here is the error *** First throw call stack: ( …
Saifallak
  • 1,234
  • 2
  • 13
  • 28
4
votes
3 answers

Manually deleted package in External Libraries/Dart Packages not reappearring (Android Studio)

I manually deleted a package in External libraries/dart packages. Now I tried to run packages get again. The package(tesseract_ocr) did not appear in External libraries/dart packages. I tried removing it in pubspec.yaml and re-adding it but did not…
This123
  • 41
  • 3
4
votes
4 answers

How to access Internal Storage of Android in Flutter

In android we use getFileDir() and getCacheDir() for accessing the Internal Storage. I can see that there's a path_provider plugin that I can use but I can only figure out getTemporaryDirectory() which is analogous to getCacheDir() of android. So is…
Shubhamhackz
  • 7,333
  • 7
  • 50
  • 71
3
votes
2 answers

Dart Error: Dart_LookupLibrary: library 'package:home_widget/home_widget_callback_dispatcher.dart' not found

A very strange issue. I am using https://pub.dev/packages/home_widget and I am trying to use the backgroundCallback to refresh my widget by pressing an image on the widget. It works fine on debug mode, however when I build apk or run flutter run…
1210saad
  • 37
  • 5
3
votes
1 answer

How to correctly organize multiple examples on a dart package

Given a dart package organized as follow /example |_______/foo |________________/pubspec.yaml (and stuff) |________________/main.dart |_______/baz |________________/pubspec.yaml (and…
Francesco Iapicca
  • 2,618
  • 5
  • 40
  • 85
3
votes
1 answer

Can we create shared library or assembly like .dll in flutter package project?

I'm getting problem with flutter/dart. I created one flutter-package using dart lang, there is so many dart files. But i didn't get any option to make single lib file or assembly like dll (dll in Xamarin). I want to use that API in flutter mobile…
3
votes
2 answers

Any Flutter Package that fetchs GoogleCredential Access Token

In Flutter(Dart) is there any package to get GoogleCredential Accesstoken (This below sample is for getting Access Token in Java) private static String getAccessToken() throws IOException { GoogleCredential googleCredential = GoogleCredential …
Ashok Varma
  • 3,489
  • 3
  • 28
  • 43
2
votes
0 answers

How to include files in dart package

I've a package which ships with some lib's(*.so and *.dll), when i try accessing them from my a project, it always returns no such file or directory. I think whenever a plugin is being used, the working directory is pointing at the directory of…
Frank nike
  • 330
  • 5
  • 12
2
votes
3 answers

I have an error for import package in flutter

Tips: (Sorry for mistakes. English isn't my native language) (I'm new in flutter) I have many errors in my flutter project. I think that's because of packages. when I write: import 'package:flutter/material.dart';, android studio draw a red line…
1
2 3