Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
180 votes
8 answers
97k views

How to add a package from GitHub in Flutter?

I need to use the latest source code of a package and the latest source hasn't been published yet. What should I write into pubspec.yaml to get a package in Github? The code below doesn't work. It ...
Kostya Vyrodov's user avatar
33 votes
13 answers
120k views

flutter packages get failed depends on flutter_test any from sdk which requires SDK version <2.0.0, version solving failed

I create a flutter project, and run flutter packeages get,the output as below: [second] flutter packages get Waiting for another flutter command to release the startup lock... Running "flutter ...
david yang's user avatar
32 votes
3 answers
26k views

How to add a package from command line in flutter?

npm (and so yarn) has a great feature that you can add needed packages just by knowing the package name (like yarn add xxx_yyy) and it adds the latest stable release to your project. Does flutter have ...
Alireza Akbari's user avatar
24 votes
4 answers
12k views

Dart Package - How to hide internal methods and classes?

I am developing a package for Flutter Apps There are methods and classes that are useful only for the package itself, and not for the programmer who will import my package, is possible to hide this ...
Rodrigo João Bertotti's user avatar
22 votes
1 answer
21k views

Flutter App is not working after changing package name

I am trying to release my apk and just changed the com.example package name to my own com.[companynamehere].[appname] in the AndroidManifest.xml file and app/build.gradle file, however now my app ...
Darwish Al-Neyadi's user avatar
18 votes
5 answers
6k views

The function '$initGetIt' isn't defined while using injectable pub package

I am trying to implement stacked architecture by following this video uploaded by FilledStacks. I encountered a problem while using injectable pub package https://pub.dev/packages/injectable My ...
Faizan Kamal's user avatar
  • 2,062
16 votes
2 answers
18k views

What is the difference between flutter plugin and flutter module?

I am new to flutter plugin development, I have read Developing packages & plugins and Writing a good Flutter plugin, but I am confused as a beginner, I have developed Flutter Application based on ...
Shahzad Akram's user avatar
13 votes
5 answers
39k views

Unhandled Exception: MissingPluginException(No implementation found for method check on channel plugins.flutter.io/connectivity)

I already added connectivity plugin on my pubspec.yaml. connectivity: ^0.4.6 But still getting this error: E/flutter ( 4789): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: ...
Gian Almada's user avatar
13 votes
7 answers
20k views

The Google Fonts Package in Flutter app is not working

First, I added the google_fonts package to your pubspec dependencies. dependencies: flutter: sdk: flutter cupertino_icons: ^0.1.2 google_fonts: ^0.2.0 Then import 'package:google_fonts/...
Tofiq Samali's user avatar
12 votes
4 answers
36k views

Flutter | Dart : Target of URI does not exist

I am making my first Application to build an Android App with Flutter. I am using Android Studio as IDE. The problem is when I import the http package: import 'package:http/http.dart' as http; I ...
MasterSinge's user avatar
11 votes
1 answer
5k views

How to do deep linking in flutter without firebase?

I have got a Netflix model app and I want to share the movie contents to others, and if the receiver has that app, then the content should open up in his/her app or if app not present, got to the ...
Amitha Mohanan's user avatar
11 votes
3 answers
755 views

Null safety migration error: package has unmigrated dependencies. But all my dependencies declare support for null-safety

Im trying to migrate dart null safety but I get the following error when I run dart migrate Bad state: Error: package has unmigrated dependencies. Before migrating your package, we recommend ensuring ...
Dalon's user avatar
  • 640
10 votes
1 answer
5k views

How to reference packages from repository in Flutter?

I'm trying to modify an existing package on pub.dev. I need to update one of the dependencies in the package. I've seen how to do this from here dependencies: flutter: sdk: flutter ...
flutter's user avatar
  • 6,626
10 votes
5 answers
3k views

How to exclude files from pub publish for Dart packages?

Is there any way to exclude certain files or directories from pub publish for dart packages? I am publishing a package that has so many screenshots. I want them to upload on GitHub but not on Pub.Dev....
Shahzad Akram's user avatar
9 votes
4 answers
2k views

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: ...
Mary's user avatar
  • 19.9k
9 votes
1 answer
1k views

Flutter - Animated text kit, how to stop animation, so it only fades in and shows the text, instead of fading in and out and gone?

So I installed an animated text kit but I'm running into some issue that I can't solve it, the animation fades in, scales in, then fades out and scales out. I want it to just fade and scale in and ...
Bn Minki's user avatar
  • 175
8 votes
2 answers
3k views

new_version package in flutter returns RangeError (index): Invalid value: Valid value range is empty: 1

I am using new_vesrion ^0.3.1 package in flutter to display alert dialog for showing to update the app if new version is available on store of flutter app but I am getting below written exception: [...
Ganesh's user avatar
  • 99
8 votes
0 answers
384 views

Is there a way to convert flutter package to plugin?

I have a Package made a while ago but I want to add some Android specific code (Java, but this doesn't matter). The only approach I currently have is just creating a new Plugin and moving things ...
Aviv Profesorsky's user avatar
7 votes
4 answers
18k views

Update to/install latest Flutter packages (pubspec.yaml)

I want to install latest Flutter packages in my android studio project. In npm, npm install <package name> installs latest packages automatically and npm update updates all packages ...
suyashsingh234's user avatar
7 votes
1 answer
3k views

How can I add a private package from GitHub with my user and password to my pubspec.yaml?

My question is simple. I can clone a private git repository using git clone https://my_user_name:[email protected]/my_account/my_package.git now, How can I add a private package from GitHub ...
abnerh69's user avatar
  • 654
7 votes
1 answer
1k views

What does pub in flutter stands for

the title basically says it! What does pub in flutter stands for? the rest of this sentence is just top meet the question minimum characters
alkhatim's user avatar
  • 363
7 votes
1 answer
3k views

Run some Javascript file like index.js in Flutter Webview

how I can run Javascript file in the flutter_webview_plugin. I try it with this. flutterWebViewPlugin.evalJavascript("require('./index.js');"); But nothing happens. when I try to run flutter code ...
Kashif Ahmed's user avatar
6 votes
4 answers
14k views

Flutter how to manually install packages

Is there no way to manually download a package and install it? It's so frustrating using their package manager which this time downloads in 0.4 seconds but the next cannot download ever after multiple ...
Hasen's user avatar
  • 12.2k
6 votes
1 answer
6k views

When should I use BLoC pattern in Flutter?

I've recently read about BLoC (Business Logic Component), and I'm building an app to retrieve data from api, I'm wondering when should I create a bloc and when I shouldn't, using the Flutter_BLoC ...
Wail Hayaly's user avatar
  • 1,177
6 votes
0 answers
1k views

How to handle noise reduction in Flutter application

Using flutter_sound to record audio in flutter application. The recorded audio was not clear, background noise was more. How to remove the noise in mic recording. Is there any packages available / ...
Selvakumar's user avatar
5 votes
2 answers
10k views

Flutter Packages Get in VS Code failing

Recently got started with Flutter 1.0.0. flutter doctor -v no issues Been deploying to an iOS device no worries. Problem started when I tried to add Dart Packages via the pubspec.yaml file. No ...
Mike Soertsz's user avatar
5 votes
3 answers
2k views

Assets in Flutter package are not visible in the app

I've created a package, which uses some assets (sf2 file, ttf files, etc). Assets don't seem to load. I can fix this by including these files in the assets folder of my main project (so now, every ...
Alb's user avatar
  • 1,131
5 votes
1 answer
1k views

How to develop for multiple platforms in flutter when some packages are not compatible with some platforms?

I am trying to migrate my existing Flutter app to web. The problem is that certain packages are not compatible with Web, (e.g. path_provider and many others). I don’t really want to build a whole new ...
ouzari's user avatar
  • 427
5 votes
1 answer
2k views

Developing Flutter iOS plugin packages - Pods folder in Xcode project is empty

I am developing a plugin package for Flutter. I follow the instructions exactly as written in a tutorial here: Step-2c-add-ios-platform-code-hmswift. It says to open hello/example/ios/Runner....
2beens's user avatar
  • 773
5 votes
2 answers
1k views

How to return a widget from flutter plugin native code?

I am trying to learn flutter plugin development as I will need it anyway to act seriously with porting native SDKs. The point is, I don't really know how to return an Android Activity as a Widget ...
Bartłomiej Sobieszek's user avatar
5 votes
0 answers
431 views

Can't share an mp3 file. share_plus

I am trying to share a mp3 file with share_plus package. But whenever I try to press the share button, I am getting this error: E/flutter ( 5629): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] ...
OnurParlak's user avatar
4 votes
1 answer
2k views

Umbrella Imports with Dart/Flutter

I am developing a plugin for Dart (Flutter). I have split up the source into many different implementation files to keep things clean and avoid having one massive file. The problem is, I don't want ...
Brad Hesse's user avatar
4 votes
2 answers
1k views

No implementation found for method getAll on channel dev.fluttercommunity.plus/package_info

I'm trying to debug a project for windows, and I'm having this problem: It runs and stops at Parse().initialize giving the error [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: ...
Guilherme de Souza's user avatar
4 votes
2 answers
605 views

How to draw an object freehand on an image and move it in Flutter

Free hand drawing on an image I want to draw freehand object on an image and also move it. Now I am using flutter painter package from flutter, with it I can only draw an object but I cannot move it.
Ahmed Jahin Akif's user avatar
4 votes
3 answers
3k views

Flutter pub.get stopped working, even on vanilla install : socket error trying to find package xxx

First of all, I have been working with Flutter for more than 3 years, and am a reasonably seasoned dev. Yet this baffles me, and I can’t find a solution online. Since this morning, I systematically ...
Serge B.'s user avatar
  • 822
4 votes
0 answers
306 views

How to set an initialOffset to linked ScrollControllers (aka LinkedScrollControllerGroup)

I'm using this great package https://pub.dev/packages/linked_scroll_controller , and following this amazing tutorial on how to set up bidirectional scrolling table : https://crizantlai.medium.com/...
Jerbs's user avatar
  • 153
4 votes
1 answer
991 views

Create a gantt chart in flutter application

I wanted to add a Gantt chart in my flutter application based on the start and end date of any events from the google calendar. But I did not find any articles or packages which can help me to create ...
Rojan Shrestha's user avatar
4 votes
2 answers
1k views

Why is my Flutter package suddenly warning me that it doesn't depend on its example app?

I'm doing flutter packages pub publish --dry-run to publish an update to my package, GroovinMaterialIcons, and I'm getting warnings that it doesn't depend on the example app: Suggestions: * line 3, ...
GroovinChip's user avatar
3 votes
2 answers
1k views

What happened with HTTP package in Dart 2.1?

With dart 2.0 and lower I was able to import the HTTP package directly without modifying my pubspec.yaml file. I've opened an old project and I've got the error: "Your application could not be ...
Allex Radu's user avatar
  • 1,430
3 votes
1 answer
5k views

Flutter Injectable factory not registered error

I'm having an issue while using the Injectable package for Flutter: https://pub.dev/packages/injectable I'm getting an error telling me that I don't have a factory registered, but I'm trying to get it ...
Migalv's user avatar
  • 682
3 votes
2 answers
4k views

Flutter - Error: The language version override has to be the same in the library and its part(s)

I was update my Flutter SDK version from dev channel (1.14.5) to stable channel (2.0.1). My codes was works perfectly but now i get this error. I think the problem is at slide_countdown_clock but im ...
Ergün Yunus Cengiz's user avatar
3 votes
3 answers
7k views

How do i resolve these depreciation errors in flutter?

This package is used in code, but the package was not updated for last 3 years so need to replace package. if any one Used this package or replace this package pls inform me. error exactly is :- ...
Nachiket Ghelani's user avatar
3 votes
3 answers
3k views

How to refactor file names in Android Studio in Dart or Flutter project?

When using android studio's refactoring tool refactoring -> rename to change file names or file paths it does not change the corresponding imports. In Android projects this happens automatically, but ...
Joel Broström's user avatar
3 votes
1 answer
3k views

IOS and Android package name

I created demo project in Flutter, and the package name: iOS : com.example.flutterAppTest Android : com.example.flutter_app_test Why they are different? Should they need to be different? What is the ...
Pavel Poley's user avatar
  • 5,459
3 votes
1 answer
348 views

How to fix Flutter package flutter_video_cast breaking iOS simulator build on Apple Silicon Mac (M1 or M2)

My issue: Adding flutter_video_cast package to my project stops it building for arm64 on Apple Silicon Mac. Error (Xcode): In /<path>/ios/Pods/google-cast-sdk-no-bluetooth/GoogleCastSDK-ios-4.6....
Dave's user avatar
  • 5,386
3 votes
1 answer
331 views

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 stuff) |...
Francesco Iapicca's user avatar
3 votes
3 answers
2k views

Flutter Autocomplete with custom value if there is no option

Newbie here. For the last couple days, I tried to find a way to make an autocomplete form which we can also input custom value if no option is in exact match. Any suggestions? Thanks. Autocomplete<...
Mafaza SP's user avatar
3 votes
2 answers
2k views

“Could not resolved the package” every install new packages inside my own package

I have some problem about installing new package from pub.dev. I split my architecture using package for implemented modularization. This is my packages (core and shared) inside my project. I create ...
R Rifa Fauzi Komara's user avatar
3 votes
2 answers
9k views

Zoom in Flutter with flutter_inappwebview

I use the Code from one answer webview_flutter "Failed to validate the certificate chain" SSL handshake failed error import 'package:flutter/material.dart'; import 'package:...
miwa's user avatar
  • 69
3 votes
0 answers
211 views

access to camera via USB in web flutter app

I make a web application using flutter and I have external camera connected via USB, any solution for access it I tried USB_device package, but I don't know how can open the external camera and take a ...
Abdallah Reda's user avatar

1
2 3 4 5
8