Permission handler – Not working in this prject

Hey I am trying to run permission handler.

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

class PermissionHEHE extends StatefulWidget {
  const PermissionHEHE({super.key, required this.title});

  final String title;

  @override
  State<PermissionHEHE> createState() => _PermissionHEHEState();
}

class _PermissionHEHEState extends State<PermissionHEHE> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
              onPressed: () async {
                PermissionStatus cameraStatus =
                    await Permission.camera.request();
                print('Camera permission status: $cameraStatus');

                if (cameraStatus.isGranted) {
                  ScaffoldMessenger.of(context).showSnackBar(
                    const SnackBar(content: Text("Camera permission granted")),
                  );
                } else if (cameraStatus.isDenied) {
                  ScaffoldMessenger.of(context).showSnackBar(
                    const SnackBar(content: Text("Camera permission denied")),
                  );
                } else if (cameraStatus.isPermanentlyDenied) {
                  ScaffoldMessenger.of(context).showSnackBar(
                    const SnackBar(
                        content: Text("Camera permission permanently denied")),
                  );
                  openAppSettings(); // Open app settings
                }
                print('camera');
              },
              child: const Text('camera'),
            ),
            const SizedBox(height: 16),
            ElevatedButton(
              onPressed: () async {
                PermissionStatus storageStatus =
                    await Permission.storage.request();
                print('Storage permission status: $storageStatus');

                if (storageStatus.isGranted) {
                  ScaffoldMessenger.of(context).showSnackBar(
                    const SnackBar(content: Text("Storage permission granted")),
                  );
                } else if (storageStatus.isDenied) {
                  ScaffoldMessenger.of(context).showSnackBar(
                    const SnackBar(content: Text("Storage permission denied")),
                  );
                } else if (storageStatus.isPermanentlyDenied) {
                  ScaffoldMessenger.of(context).showSnackBar(
                    const SnackBar(
                        content: Text("Storage permission permanently denied")),
                  );
                  openAppSettings(); // Open app settings
                }
                print('storage');
              },
              child: const Text('storage'),
            ),
            const SizedBox(height: 16), // Add some space between buttons
            ElevatedButton(
              onPressed: () async {
                PermissionStatus locationStatus =
                    await Permission.location.request();
                print('Location permission status: $locationStatus');

                if (locationStatus.isGranted) {
                  ScaffoldMessenger.of(context).showSnackBar(
                    const SnackBar(
                        content: Text("Location permission granted")),
                  );
                } else if (locationStatus.isDenied) {
                  ScaffoldMessenger.of(context).showSnackBar(
                    const SnackBar(content: Text("Location permission denied")),
                  );
                } else if (locationStatus.isPermanentlyDenied) {
                  ScaffoldMessenger.of(context).showSnackBar(
                    const SnackBar(
                        content:
                            Text("Location permission permanently denied")),
                  );
                  openAppSettings(); // Open app settings
                }
                print('location');
              },
              child: const Text('location'),
            ),
          ],
        ),
      ),
    );
  }
}

and it is giving me this errors.

Launching libmain.dart on RMX2156 in debug mode... √ Built buildappoutputsflutter-apkapp-debug.apk. E/flutter ( 3667): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: com.pichillilorenzo/flutter_inappwebview E/flutter ( 3667): at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:513) E/flutter ( 3667): at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsController.java:169) E/flutter ( 3667): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:105) E/flutter ( 3667): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:55) E/flutter ( 3667): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267) E/flutter ( 3667): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292) E/flutter ( 3667): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/flutter ( 3667): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/flutter ( 3667): at android.os.Handler.handleCallback(Handler.java:938) E/flutter ( 3667): at android.os.Handler.dispatchMessage(Handler.java:99) E/flutter ( 3667): at android.os.Looper.loopOnce(Looper.java:233) E/flutter ( 3667): at android.os.Looper.loop(Looper.java:344) E/flutter ( 3667): at android.app.ActivityThread.main(ActivityThread.java:8249) E/flutter ( 3667): at java.lang.reflect.Method.invoke(Native Method) E/flutter ( 3667): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:589) E/flutter ( 3667): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1071) E/flutter ( 3667): , null, null) E/flutter ( 3667): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7) E/flutter ( 3667): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18) E/flutter ( 3667): <asynchronous suspension> E/flutter ( 3667): #2 ExpensiveAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1115:5) E/flutter ( 3667): <asynchronous suspension> E/flutter ( 3667): #3 AndroidViewController.create (package:flutter/src/services/platform_views.dart:838:5) E/flutter ( 3667): <asynchronous suspension> E/flutter ( 3667): E/ion ( 3667): ioctl c0044901 failed with code -1: Invalid argument D/hw-ProcessState( 3667): Binder ioctl to enable oneway spam detection failed: Invalid argument D/SurfaceComposerClient( 3667): VRR [FRTC] client handle [bufferId:18446744073709551615 framenumber:0] [ffffffff, ffffffff] E/BLASTBufferQueue( 3667): [SurfaceView[com.example.pos/com.example.pos.MainActivity]#1](f:0,a:2) isEGL=1, mPendingRelease.size()=1, mMaxAcquiredBuffers=4, currentMaxAcquiredBufferCount=2 E/OpenGLRenderer( 3667): fbcNotifyFrameComplete error: undefined symbol: fbcNotifyFrameComplete E/OpenGLRenderer( 3667): fbcNotifyNoRender error: undefined symbol: fbcNotifyNoRender D/ViewRootImpl[MainActivity]( 3667): debugCancelDraw cancelDraw=false,count = 187,android.view.ViewRootImpl@a09a216 D/SurfaceComposerClient( 3667): VRR [FRTC] client handle [bufferId:18446744073709551615 framenumber:0] [ffffffff, ffffffff] I/ExtensionsLoader( 3667): VRR [FRTC] client update frtcRate from 0 to 0x3c D/SurfaceComposerClient( 3667): VRR [FRTC] client handle [bufferId:18446744073709551615 framenumber:60] [ffffffff, ffffffff] E/BLASTBufferQueue( 3667): [SurfaceView[com.example.pos/com.example.pos.MainActivity]#1](f:0,a:4) isEGL=1, mPendingRelease.size()=2, mMaxAcquiredBuffers=4, currentMaxAcquiredBufferCount=2 I/GED ( 3667): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 42, oppidx_max 42, oppidx_min 0 D/OplusSystemUINavigationGesture( 3667): [GESTURE_BUTTON] swipe from 0 D/OplusSystemUINavigationGesture( 3667): [GESTURE_BUTTON] Hit Gesture Region ! D/Activity( 3667): dispatchKeyEvent to com.example.pos.MainActivity@9626633 will call onBackPressed I/GED ( 3667): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 42, oppidx_max 42, oppidx_min 0 I/GED ( 3667): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 42, oppidx_max 42, oppidx_min 0 I/GED ( 3667): ged_boost_gpu_freq, level 100, eOrigin 2, final_idx 42, oppidx_max 42, oppidx_min 0 Connecting to VM Service at ws://127.0.0.1:52091/IwwAjifnDcI=/ws E/flutter ( 3667): [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 ( 3667): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7) E/flutter ( 3667): <asynchronous suspension> E/flutter ( 3667): #1 MethodChannelPermissionHandler.requestPermissions (package:permission_handler_platform_interface/src/method_channel/method_channel_permission_handler.dart:80:9) E/flutter ( 3667): <asynchronous suspension> E/flutter ( 3667): #2 PermissionActions.request (package:permission_handler/permission_handler.dart:109:10) E/flutter ( 3667): <asynchronous suspension> E/flutter ( 3667): #3 _PermissionHEHEState.build.<anonymous closure> (package:pos/screens/PermissionHandler/permission_hehe.dart:27:21) E/flutter ( 3667): <asynchronous suspension> E/flutter ( 3667): E/flutter ( 3667): [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 ( 3667): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:332:7) E/flutter ( 3667): <asynchronous suspension> E/flutter ( 3667): #1 MethodChannelPermissionHandler.requestPermissions (package:permission_handler_platform_interface/src/method_channel/method_channel_permission_handler.dart:80:9) E/flutter ( 3667): <asynchronous suspension> E/flutter ( 3667): #2 PermissionActions.request (package:permission_handler/permission_handler.dart:109:10) E/flutter ( 3667): <asynchronous suspension> E/flutter ( 3667): #3 _PermissionHEHEState.build.<anonymous closure> (package:pos/screens/PermissionHandler/permission_hehe.dart:27:21) E/flutter ( 3667): <asynchronous suspension> E/flutter ( 3667):

It is working fine when I try to run it in another project in the exact same way.
Dependencies:

name: pos
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1

environment:
  sdk: '>=3.3.4 <4.0.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
  flutter:
    sdk: flutter
  permission_handler: ^11.3.1
  flutter_inappwebview: ^6.0.0
  youtube_player_flutter: ^9.0.1
  simple_barcode_scanner: ^0.0.8
  flutter_barcode_scanner: ^2.0.0
  mobile_scanner: ^5.0.1
  camera: ^0.10.5+9
  flutter_svg: ^2.0.10+1

  flutter_web_plugins:
    sdk: flutter
  plugin_platform_interface: ^2.0.2  
  web: ^0.5.1
  image_picker: ^1.1.0
  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.6

dev_dependencies:
  flutter_test:
    sdk: flutter
  lint: ">=1.10.0 <3.0.0"
  # The "flutter_lints" package below contains a set of recommended lints to
  # encourage good coding practices. The lint set provided by the package is
  # activated in the `analysis_options.yaml` file located at the root of your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^3.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:
  plugin:
    platforms:
      android:
        package: dev.steenbakker.mobile_scanner
        pluginClass: MobileScannerPlugin
      ios:
        pluginClass: MobileScannerPlugin
      macos:
        pluginClass: MobileScannerPlugin
      web:
        pluginClass: MobileScannerWeb
        fileName: src/web/mobile_scanner_web.dart
  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/backgrounds/
    - assets/images/
  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

Androidmanifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.pos">

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:label="pos"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
        
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            
            <meta-data
                android:name="io.flutter.embedding.android.NormalTheme"
                android:resource="@style/NormalTheme" />
                
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>

    <queries>
        <intent>
            <action android:name="android.intent.action.PROCESS_TEXT" />
            <data android:mimeType="text/plain" />
        </intent>
    </queries>
</manifest>

I tried to make another project and do the same thing there it worked fine there. I ran flutter clean didn’t work. I also tried running flutter clean and building it again didn’t work:(

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật