Answers for "check the widt of device flutter"

0

flutter get device width

double width = MediaQuery.of(context).size.width;
Posted by: Guest on November-14-2021
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 "Dart"

Browse Popular Code Answers by Language