presentation-displays icon indicating copy to clipboard operation
presentation-displays copied to clipboard

Issue on get display function

Open Saad-Rajpoot opened this issue 1 year ago • 6 comments

Future<List<Display>?> getDisplays({String? category}) async { List origins = await jsonDecode((await _displayMethodChannel ?.invokeMethod(_listDisplay, category))) ?? []; List<Display> 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..

Saad-Rajpoot avatar Jan 11 '24 10:01 Saad-Rajpoot

imgpsh_fullsize_anim

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

patelnirav48 avatar Mar 21 '24 12:03 patelnirav48

Any solution? Please let me know

sivaneshc avatar Mar 26 '24 17:03 sivaneshc

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

patelnirav48 avatar Apr 30 '24 13:04 patelnirav48

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.

ManuelAcBl avatar May 16 '24 22:05 ManuelAcBl

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

patelnirav48 avatar May 17 '24 16:05 patelnirav48

imgpsh_fullsize_anim

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

I have solved & Added Custom Methods Go & check https://github.com/MUSA-19542/FlutterCustom/tree/main

MUSA-19542 avatar Aug 10 '24 21:08 MUSA-19542