systemName static method

String systemName({
  1. required BuildContext context,
})

System Name(android iOS ...)

Implementation

static String systemName({
  required BuildContext context,
}) {
  String systemName = "";
  TargetPlatform targetPlatform = Theme.of(context).platform;
  switch (targetPlatform) {
    case TargetPlatform.android:
      systemName = "android";
      break;
    case TargetPlatform.iOS:
      systemName = "iOS";
      break;
    case TargetPlatform.fuchsia:
      systemName = "fuchsia";
      break;
    case TargetPlatform.linux:
      systemName = "linux";
      break;
    case TargetPlatform.macOS:
      systemName = "macOS";
      break;
    case TargetPlatform.windows:
      systemName = "windows";
      break;
  }

  return systemName;
}