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

Issue on get display function #43

Open
Saad-Rajpoot opened this issue Jan 11, 2024 · 5 comments
Open

Issue on get display function #43

Saad-Rajpoot opened this issue Jan 11, 2024 · 5 comments

Comments

@Saad-Rajpoot
Copy link

Future<List?> getDisplays({String? category}) async {
List origins = await jsonDecode((await _displayMethodChannel
?.invokeMethod(_listDisplay, category))) ??
[];
List displays = [];
for (var element in origins) {
final map = jsonDecode(jsonEncode(element));
displays.add(kReleaseMode
? displayReleaseFromJson(map as Map<String, dynamic>)
: displayFromJson(map as Map<String, dynamic>));
}
return displays;
}

when my app is on release mode then its shows null display id's but when debug mode its working...

  displays.add(kReleaseMode
  ? displayReleaseFromJson(map as Map<String, dynamic>)
   : displayFromJson(map as Map<String, dynamic>));
   
   here issue arrises..
   please fix it..
@patelnirav48
Copy link

imgpsh_fullsize_anim

Getting null null in get display when i make release build. no issue when check with debug build.

@sivaneshc
Copy link

Any solution? Please let me know

@patelnirav48
Copy link

@VNAPNIC Could you please help here. When we test using release apk its not working

@ManuelAcBl
Copy link

I had the same problem. When I tested my application in debug mode it worked perfectly. But when I created a release version it stopped working. The solution was to add the following permissions to the 'AndroidManifest.xml': CHANGE_WIFI_STATE, ACCESS_WIFI_STATE and ACCESS_NETWORK_STATE. I guess I'll also have to add the permissions to the iOS version.

@patelnirav48
Copy link

@ManuelAcBl Tried that but not working, its not discovering.

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

4 participants