isAndroid function

bool isAndroid({
  1. required bool supportWeb,
  2. TargetPlatform? platform,
  3. bool? overrideIsWeb,
})

supportWeb is a parameter that ask you if we should care about web support if the value is true then we will return the result no matter if we are on web or using a native app to run the flutter app

Implementation

bool isAndroid({
  required bool supportWeb,
  TargetPlatform? platform,
  bool? overrideIsWeb,
}) {
  if (isWeb(overrideIsWeb: overrideIsWeb) && !supportWeb) return false;
  platform ??= defaultTargetPlatform;
  return TargetPlatform.android == platform;
}