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

Grey overlay over the whole Screen on iOS in Production mode (not in Debug mode)! #34

Closed
securexperts opened this issue Apr 12, 2024 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@securexperts
Copy link

securexperts commented Apr 12, 2024

Hi,
I have used your plugin since a wile. Now I must upgrade it to the latest Version and face an issue on iOS:
Running the App In IDE with Simulator or iOS in debug mode everything works fine and screens are displayed as expected.
As soon I push the App to Production on Apple Store I get a grey screen overlay on top of the Screen. Guestures do not work in this area.

When I set a normal FAB its displaying fine

floatingActionButtonLocation: Platform.isIOS
  ? FloatingActionButtonLocation.centerDocked
  : FloatingActionButtonLocation.centerFloat,
floatingActionButton: FloatingActionButton(
  backgroundColor: _color,
  onPressed: () {
    if (kDebugMode) {
      print('Pressed 999');
    }
    trailsAreLoaded = false;
    trailsProvider.disableActiveTrail();
  },
  child: const Icon(Icons.exit_to_app), // customize the icon as needed
),

IMG_2107

When configuring Circular Menu FAB the Problem comes up to the Screen in production mode:

floatingActionButtonLocation: Platform.isIOS
  ? FloatingActionButtonLocation.centerDocked
  : FloatingActionButtonLocation.centerFloat,
floatingActionButton: CircularMenu(
   //alignment: Alignment.bottomCenter,
   //toggleButtonColor: Theme.of(context).primaryColor.withOpacity(0.6),
   toggleButtonAnimatedIconData: AnimatedIcons.menu_close,
   items: [
     CircularMenuItem(
       color: Colors.transparent,
       onTap: () {}
     ),
     CircularMenuItem(
       icon: Icons.directions_walk,
       color: _color,
       onTap: () {
         setState(() {
           if (_colorIsActive == true){
             _colorIsActive = false;
           } else {
            _colorIsActive = true;
           }
           trackUserLocation = !trackUserLocation;
           if (kDebugMode) {
             print('OnTap_001.1: $trackUserLocation');
           }
         });
       }
     ),
     CircularMenuItem(
       icon: Icons.add_location,
       color: Theme.of(context).primaryColor.withOpacity(0.6),
       onTap: () {
        setState(()  {
          setCameraPosition();
          if (kDebugMode) {
            print('OnTap_001.2');
          }
        });
      }
    ),
    CircularMenuItem(
      color: Colors.transparent,
      onTap: () {}
    ),
  ],
),

IMG_2106

@securexperts securexperts changed the title Grey overlay over the whole Screen Grey overlay over the whole Screen on iOS in Production mode (not in Debug mode)! Apr 12, 2024
@hasan-hm1 hasan-hm1 self-assigned this Apr 13, 2024
@hasan-hm1 hasan-hm1 added the investigating Investigation the issue label Apr 13, 2024
@hasan-hm1
Copy link
Owner

I have tested the Circular Menu FAB on iOS release mode, and it seems to work fine. Have you checked whether the issue is related to something else in your code? @securexperts

@hasan-hm1 hasan-hm1 added the waiting for response Waiting for follow up label Apr 13, 2024
@securexperts
Copy link
Author

securexperts commented Apr 14, 2024

Hi, yes, I have tested and could exclude other modules in my code. The Fact is, that it is not happening when I run the code on my machine or local Phone. It only happens, when I push the code to Apple's TestFlight. Here some additional information about my environment:

Flutter is already up to date on channel beta
Flutter 3.22.0-0.1.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 29babcb32a (10 days ago) • 2024-04-03 17:17:04 -0500
Engine • revision 97550907b7
Tools • Dart 3.4.0 (build 3.4.0-282.1.beta) • DevTools 2.34.2

here the whole function:

Widget showMainLViewUI(ThemeProvider themeProvider, TrailsProvider trailsProvider, SelectedMarkerProvider selectedMarkerProvider) {
    if(Theme.of(context).brightness == Brightness.dark){
      isStyleDark = true;
    }

    if (_colorIsActive == false){
      _color = Theme.of(context).primaryColor.withOpacity(0.5);
    } else {
      _color = Theme.of(context).primaryColor.withOpacity(1.0);
    }
    return Scaffold(
      floatingActionButtonLocation: Platform.isIOS
        ? FloatingActionButtonLocation.centerDocked
        : FloatingActionButtonLocation.centerFloat,
      floatingActionButton: CircularMenu(
        toggleButtonColor: Theme.of(context).primaryColor.withOpacity(0.6),
        toggleButtonAnimatedIconData: AnimatedIcons.menu_close,
        items: [
          CircularMenuItem(
            icon: Icons.add_location_alt,
            iconColor: Colors.transparent,
            color: Colors.transparent,
            onTap: () {}
          ),
          CircularMenuItem(
            icon: Icons.directions_walk,
            color: _color,
            onTap: () {
              setState(() {
                if (_colorIsActive == true){
                  _colorIsActive = false;
                } else {
                  _colorIsActive = true;
                }
                trackUserLocation = !trackUserLocation;
                if (kDebugMode) {
                  print('OnTap_001.1: $trackUserLocation');
                }
              });
            }
          ),
          CircularMenuItem(
            icon: Icons.add_location,
            color: Theme.of(context).primaryColor.withOpacity(0.6),
            onTap: () {
              setState(()  {
                setCameraPosition();
                if (kDebugMode) {
                  print('OnTap_001.2');
                }
              });
            }
          ),
          CircularMenuItem(
              icon: Icons.add_location_alt,
              iconColor: Colors.transparent,
              color: Colors.transparent,
              onTap: () {}
          ),
        ],
      ),

      body: Stack(
        children: [
          MapWidget(
            key: const ValueKey("ZadaMap"),
            styleUri:  isStyleDark
                ? ZadaApp.mapboxMapStyleDark
                : ZadaApp.mapboxMapStyleLight,
            textureView: true,
            cameraOptions: CameraOptions(
                center: Point(coordinates: Position(6.927500, 46.414200)).toJson(),
                zoom: 18,
                pitch: mapPitchValue,
                bearing: 0
            ),
            mapOptions: MapOptions(
              pixelRatio: MediaQuery.of(context).devicePixelRatio,
            ),
            gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>{
              Factory<OneSequenceGestureRecognizer>(
                    () => EagerGestureRecognizer(),
              ),
            },
            onMapCreated: _onMapCreated,
            onStyleLoadedListener: _onStyleLoadedCallback,
            onCameraChangeListener: _onCameraChangeListener,
            onRenderFrameStartedListener: _onRenderFrameStartedListener,
            onScrollListener: _onScrollAction,
          ),
          Positioned(
            bottom: 100.0, // adjust the position as needed
            right: 16.0, // adjust the position as needed
            child: Offstage(
              offstage: !trailsProvider.trailIsActive,
              child: FloatingActionButton(
                backgroundColor: _color,
                onPressed: () {
                  if (kDebugMode) {
                    print('onPressed_001.3');
                  }
                  trailsAreLoaded = false;
                  trailsProvider.disableActiveTrail();
                },
                child: const Icon(Icons.exit_to_app), // customize the icon as needed
              ),
            ),
          ),
        ],
      ),
    );
  }

Pubspec.yaml
environment:
sdk: '>=3.2.0 <4.0.0'

dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
circular_menu: ^3.0.0
cupertino_icons: ^1.0.6
easy_localization: ^3.0.5
equatable: ^2.0.5 # used by easy_localization
flutter_compass: ^0.8.0
hive_flutter: ^1.1.0
hive: ^2.2.3
intl: ^0.19.0
json_annotation: ^4.8.1
lottie: ^3.1.0
mapbox_maps_flutter: ^1.1.0
modal_bottom_sheet: ^3.0.0
palette_generator: ^0.3.3+3
permission_handler: ^11.3.1

dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^2.4.9
flutter_lints: ^3.0.2
hive_generator: ^2.0.1
json_serializable: ^6.7.1

@hasan-hm1
Copy link
Owner

Hi, would you mind trying the Flutter stable channel and see if the issue persists? since the beta channel is not recommended for production.
@securexperts

@securexperts
Copy link
Author

securexperts commented Apr 15, 2024

Stable channel with intl : 0.18.1 is OK! So we have a problem with the Beta channel Version.
We could Close this Issue but need to keep an eye to the Beta Branch.

@hasan-hm1
Copy link
Owner

I'm glad to hear it worked. There may be an issue with the beta branch, but it's likely to be resolved before merging with the stable branch. I'll close this issue for now.

@hasan-hm1 hasan-hm1 removed investigating Investigation the issue waiting for response Waiting for follow up labels Apr 15, 2024
@securexperts
Copy link
Author

Hello,

I like to reopen this issue. As of today the new flutter / Dart version in Stable has been promoted the issue is now also on Productive Stable release. Please fix this as soon as possible.
Many Thanks

Roman

@hasan-hm1 hasan-hm1 reopened this May 15, 2024
@hasan-hm1 hasan-hm1 added investigating Investigation the issue bug Something isn't working labels May 15, 2024
@securexperts
Copy link
Author

Hi,

I should go live with intl 19.x because of an other error on localization which has been fixed there but have now been blocked on this Issue.

Any news for me?

Thanks a lot

Roman

@hasan-hm1
Copy link
Owner

Hi @securexperts ,

Thank you for your patience. I understand your need to move to intl 19.x due to the localization error. However, I have not yet been able to reproduce the issue you're experiencing. Could you please provide more details to assist further? It would be helpful if you could connect your iPhone, run the app in release mode (without uploading to TestFlight), and see if the issue still occurs. Please share any relevant logs.

Thanks again for your cooperation.

@securexperts
Copy link
Author

OK I have build and run it on production mode: The output is pretty the same I get the following error message in the output:

Flutter run key commands.
h List all available interactive commands.
c Clear the screen
q Quit (terminate the application on the device).
[IMPORTANT:flutter/shell/common/shell.cc(454)] [Action Required] The application opted out of Impeller by either using the --no-enable-impeller flag or FLTEnableImpeller=false plist flag. This option is going to go away in an upcoming Flutter release. Remove the explicit opt-out. If you need to opt-out, report a bug describing the issue.
[IMPORTANT:flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalSkia.mm(66)] Using the Skia rendering backend (Metal).
flutter: startingAngleInRadian and endingAngleInRadian can not be null
flutter: #0 CircularMenuState._configure (package:circular_menu/src/circular_menu.dart:182)
flutter: #1 CircularMenuState.initState (package:circular_menu/src/circular_menu.dart:101)
flutter: #2 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5618)
flutter: #3 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463)
flutter: #4 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #5 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #6 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6769)
flutter: #7 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #8 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #9 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6769)
flutter: #10 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #11 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #12 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512)
flutter: #13 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5650)
flutter: #14 Element.rebuild (package:flutter/src/widgets/framework.dart:5203)
flutter: #15 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5469)
flutter: #16 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5641)
flutter: #17 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463)
flutter: #18 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #19 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #20 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6769)
flutter: #21 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #22 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #23 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512)
flutter: #24 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5650)
flutter: #25 Element.rebuild (package:flutter/src/widgets/framework.dart:5203)
flutter: #26 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5469)
flutter: #27 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5641)
flutter: #28 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463)
flutter: #29 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #30 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6904)
flutter: #31 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6916)
flutter: #32 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #33 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #34 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512)
flutter: #35 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5650)
flutter: #36 Element.rebuild (package:flutter/src/widgets/framework.dart:5203)
flutter: #37 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5469)
flutter: #38 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5641)
flutter: #39 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463)
flutter: #40 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #41 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #42 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512)
flutter: #43 Element.rebuild (package:flutter/src/widgets/framework.dart:5203)
flutter: #44 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5469)
flutter: #45 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463)
flutter: #46 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #47 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #48 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512)
flutter: #49 Element.rebuild (package:flutter/src/widgets/framework.dart:5203)
flutter: #50 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5469)
flutter: #51 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463)
flutter: #52 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #53 MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:6904)
flutter: #54 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6916)
flutter: #55 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #56 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #57 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512)
flutter: #58 Element.rebuild (package:flutter/src/widgets/framework.dart:5203)
flutter: #59 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5469)
flutter: #60 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463)
flutter: #61 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #62 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #63 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512)
flutter: #64 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5650)
flutter: #65 Element.rebuild (package:flutter/src/widgets/framework.dart:5203)
flutter: #66 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5469)
flutter: #67 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5641)
flutter: #68 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463)
flutter: #69 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #70 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #71 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512)
flutter: #72 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5650)
flutter: #73 Element.rebuild (package:flutter/src/widgets/framework.dart:5203)
flutter: #74 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5469)
flutter: #75 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5641)
flutter: #76 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463)
flutter: #77 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #78 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #79 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512)
flutter: #80 Element.rebuild (package:flutter/src/widgets/framework.dart:5203)
flutter: #81 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5469)
flutter: #82 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463)
flutter: #83 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #84 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #85 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512)
flutter: #86 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5650)
flutter: #87 Element.rebuild (package:flutter/src/widgets/framework.dart:5203)
flutter: #88 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5469)
flutter: #89 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5641)
flutter: #90 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463)
flutter: #91 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #92 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #93 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6769)
flutter: #94 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4340)
flutter: #95 Element.updateChild (package:flutter/src/widgets/framework.dart:3849)
flutter: #96 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5512)
flutter: #97 Element.rebuild (package:flutter/src/widgets/framework.dart:5203)
flutter: #98 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5469)
flutter: #99 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5463)
flutter: Another exception was thrown: Instance of 'DiagnosticsProperty'
flutter: Another exception was thrown: Instance of 'DiagnosticsProperty'
flutter: Another exception was thrown: Instance of 'DiagnosticsProperty'
flutter: Another exception was thrown: Instance of 'DiagnosticsProperty'
flutter: Another exception was thrown: Instance of 'DiagnosticsProperty'
flutter: Another exception was thrown: Instance of 'DiagnosticsProperty'
flutter: Another exception was thrown: Instance of 'DiagnosticsProperty'
flutter: Another exception was thrown: Instance of 'DiagnosticsProperty'
flutter: Another exception was thrown: Instance of 'DiagnosticsProperty'
flutter: Another exception was thrown: Instance of 'DiagnosticsProperty'

@hasan-hm1
Copy link
Owner

Hi @securexperts,

Thank you for your cooperation. The issue has been addressed in the updated version circular_menu: ^4.0.0. Please check this version and confirm whether everything is working fine so we can close this issue.

@securexperts
Copy link
Author

Great Support, Bug has gone! Thanks a log for fixing.

@hasan-hm1 hasan-hm1 removed the investigating Investigation the issue label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants