Answers for "flutter if platform ios"

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

Code answers related to "flutter if platform ios"

Browse Popular Code Answers by Language