Answers for "get platform in flutter"

2

check if is android flutter

import 'dart:io' show Platform;

if (Platform.isAndroid) {
  // Android-specific code
} else if (Platform.isIOS) {
  // iOS-specific code
}
Posted by: Guest on September-09-2020
1

flutter check ios or android

bool isIOS = Theme.of(context).platform == TargetPlatform.iOS;
bool isAndroid = Theme.of(context).platform == TargetPlatform.android;
Posted by: Guest on July-30-2020
0

flutter get platform type

import 'dart:io' show Platform;

Platform.isAndroid;
Platform.isFuchsia;
Platform.isIOS;
Platform.isLinux;
Platform.isMacOS;
Platform.isWindows;
Posted by: Guest on April-05-2021

Code answers related to "get platform in flutter"

Browse Popular Code Answers by Language