Search
 
SCRIPT & CODE EXAMPLE
 

DART

detect os in flutter

import 'dart:io' show Platform, stdout;

void main() {
  // Get the operating system as a string.
  String os = Platform.operatingSystem;
  // Or, use a predicate getter.
  if (Platform.isMacOS) {
    print('is a Mac');
  } else {
    print('is not a Mac');
  }
}
Comment

PREVIOUS NEXT
Code Example
Dart :: flutter clear all text in textfield 
Dart :: dart timer repeat 
Dart :: how to hide notficition bar in flutter 
Dart :: close keyboard on button click flutter 
Dart :: dart shuffle list 
Dart :: flutter snackbar color 
Dart :: dart parse boolean from string 
Dart :: flutter listtile minverticalpadding 
Dart :: BoxShadow in DrawerHeader flutter 
Dart :: raisedbutton flutter 
Dart :: dart string interpolation 
Dart :: flutter compare dates 
Dart :: flutter AnimatedOpacity 
Dart :: inheritance in dart 
Dart :: flutter column main axis alignment 
Dart :: flutter duration to string 
Dart :: flutter radio buttons in alert dialoug 
Dart :: get one document firestore flutter dart 
Dart :: flutter datetime add year 
Dart :: flutter widget for space 
Dart :: show dialog close flutter 
Dart :: set orientation to landscape flutter 
Dart :: Flutter(Dart) Find String Length 
Dart :: how to make my app scrollable in flutter 
Dart :: dart inline if else 
Dart :: aws ec2 upload file 
Dart :: remove first and last character from string dart 
Dart :: text substring dart 
Dart :: flutter phone direct caller 
Dart :: contains in flutter 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =