Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 640 Vote(s) - 3.49 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider

#11
You just need to reinstall app

OR

You can manage permissions using

[To see links please register here]

runtime

generally when you mention permissions in AndroidManifest.xml file it asks for permission when app starts for first time that's why you need to reinstall app or give permissions from permission manager or you can handle it from your app dynamically using above package
Reply

#12
If your package depends on [flutter_facebook_auth][1], you need to make sure you have performed the setup for [Android][2] and iOS to get rid of the error. I was using Hive and Facebook login and surprisingly, the missing Facebook setup was causing Hive.initFlutter() to throw this error.

This fix will work even if you don't actually have the Facebook app setup on your Facebook Developers account.


[1]:

[To see links please register here]

[2]:

[To see links please register here]

Reply

#13
Had this error while using **cached_network_image** on a **Flutter MacOS desktop app** - think it was caused by the 2.0.0 update of path_provider package:

[![Screenshot of path_provider changelogs for 2.0.0][1]][1]


I think because the path_provider function that cached_network_image uses (`getTemporaryDirectory()`) doesn't have paths defined on desktop, this causes it to throw the error.

[![Screenshot from path_provider package docs][2]][2]


To solve this (in my case), I imported the path_provider_macos package (

[To see links please register here]

) and registered it in main before my app started up.

```dart
void main() {
PathProviderMacOS.registerWith();
runApp(MyApp());
}
```

I haven't tested other platforms but packages exist for linux (

[To see links please register here]

) and windows (

[To see links please register here]

) so should hopefully fix the issue on these platforms as well.


[1]:

[2]:

[3]:


Reply

#14
As the Flutter team working on [Dart plugin registration doesn't run in background isolates #98591][1] for adopting in-package platform channels in more 1P plugins, which requires Dart plugin registration, the plugins do not work in `Isolates` out of the box, The work is still in the progress after the completion you'll need to initialize `DartPluginRegistrant.ensureInitialized()` as `WidgetsFlutterBinding.ensureInitialized()` before.

Until then there is a workaround for it. [#99155][2]

The workaround described there will work for `path_provider` as well:

Add dependencies on `path_provider_android` and `path_provider_ios`.
At the beginning of your background isolate entry point, add something like:
```dart
if (Platform.isAndroid) PathProviderAndroid.registerWith();
if (Platform.isIOS) PathProviderIOS.registerWith();
```


[1]:

[To see links please register here]

[2]:

[To see links please register here]

Reply

#15
With these codes, I got same error with web. It works for Windows.

import 'package:path_provider/path_provider.dart';
...
final document = await getApplicationDocumentsDirectory();
Hive.init(document.path);


Replacing it with Hive.initFlutter() looks cover it all (Windows, web, and Android):

import 'package:hive_flutter/hive_flutter.dart';
...
await Hive.initFlutter();

PS: I haven't tried on iOS, but should work too.
Reply

#16
I had this error ("MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider)") in an old app that I had to run with `flutter run --ignore-deprecation`, because it was using an old Android embedding and I didn't want to migrate it just now.

But it worked out, because I removed this line from my `app/src/main/AndroidManifest.xml` file:
```
android:name="io.flutter.app.FlutterApplication"
```
and magically, the error disappeared! 🙂

Hope it helps someone else, as well.
Reply

#17
1.

import 'package:path_provider/path_provider.dart';

Future<Directory?>? _externalDocumentsDirectory;

void _requestAppDocumentsDirectory() {
setState(() {
_externalDocumentsDirectory = getExternalStorageDirectory();
});
}

Widget _buildDirectory(
BuildContext context, AsyncSnapshot<Directory?> snapshot) {
Text text = const Text('');
if (snapshot.connectionState == ConnectionState.done) {
if (snapshot.hasError) {
text = Text('Error: ${snapshot.error}');
} else if (snapshot.hasData) {
text = Text('path: ${snapshot.data!.path} ');

print(snapshot.data!.path); //
createExcel(snapshot.data!.path); // I send a string with the route
} else {
text = const Text('path unavailable');
}
}
return Padding(padding: const EdgeInsets.all(16.0), child: text);
}
2.

ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(
const Color.fromARGB(255, 39, 136, 42),
),
),
onPressed: _requestAppDocumentsDirectory,
child: const Text(
'Exportar contraseñas',
),
),
FutureBuilder<Directory?>(
future: _externalDocumentsDirectory,
builder: _buildDirectory,
),



[enter image description here][1]

More information in the library documentation:

[To see links please register here]



[1]:

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through