Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Exception: MissingPluginException(No implementation found for method requestPermissions on channel flutter.baseflow.com/permissions/methods) #1250

Closed
3 of 5 tasks
JagritParakh opened this issue Dec 22, 2023 · 3 comments

Comments

@JagritParakh
Copy link

JagritParakh commented Dec 22, 2023

Please check the following before submitting a new issue.

Please select for which platform(s) you need help

  • Android
  • iOS
  • Windows

Your question

Full error:

E/flutter (21747): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method requestPermissions on channel flutter.baseflow.com/permissions/methods)
E/flutter (21747): #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:320:7)
E/flutter (21747): <asynchronous suspension>
E/flutter (21747): #1      MethodChannelPermissionHandler.requestPermissions (package:permission_handler_platform_interface/src/method_channel/method_channel_permission_handler.dart:79:9)
E/flutter (21747): <asynchronous suspension>
E/flutter (21747): #2      PermissionActions.request (package:permission_handler/permission_handler.dart:109:10)
E/flutter (21747): <asynchronous suspension>
E/flutter (21747): #3      _MyAppState.initState.<anonymous closure> (package:file_explorer/main.dart:21:7)
E/flutter (21747): <asynchronous suspension>
E/flutter (21747): 

My code:

import 'dart:io';

import 'package:file_manager/file_manager.dart';
import 'package:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';

void main() => runApp(const MyApp());

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState(){
    super.initState();
    ()async{
      await Permission.storage.request();
      setState(() {
      });
    }
    ();
  }
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      themeMode: ThemeMode.dark,
      theme: ThemeData(useMaterial3: true),
      darkTheme: ThemeData(useMaterial3: true, brightness: Brightness.dark),
      home: HomePage(),
    );
  }
}

Version

11.1.0

@bach287
Copy link

bach287 commented Feb 16, 2024

Can you please tell me how to fix this issue?
Thank you!

@JagritParakh
Copy link
Author

I am still unaware of a fix to this issue. If you come up with any, please let me know as well

@nppull
Copy link

nppull commented Jan 18, 2025

i get this error on ios

[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: MissingPluginException(No implementation found for method requestPermissions on channel flutter.baseflow.com/permissions/methods)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7)

#1 MethodChannelPermissionHandler.requestPermissions (package:permission_handler_platform_interface/src/method_channel/method_channel_permission_handler.dart:80:9)

#2 PermissionActions.request (package:permission_handler/permission_handler.dart:109:10)

#3 _MyHomePageState.build.requestPermission (package:my_project/main.dart:221:31)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants