Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check device in flutter

  import 'dart:io' show Platform;
  
  Widget getWidget() {
    if (Platform.isAndroid) {
      return YOUR_ANDROID_WIDGET;
    } else if (Platform.isIOS) {
      return YOUR_IOS_WIDGET;
    }
  }
 
PREVIOUS NEXT
Tagged: #check #device #flutter
ADD COMMENT
Topic
Name
2+6 =