Answers for "check device in flutter"

1

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;
    }
  }
Posted by: Guest on September-28-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language