TouchSupportDetector class
Dectector for browser support for touch events.
class TouchSupportDetector { bool _isSupported; bool isSupported() { return _isSupported; } TouchSupportDetector() { _isSupported = detectTouchSupport(); } bool detectTouchSupport() { dart_html.DivElement elem = new dart_html.DivElement(); try { elem.onTouchStart.listen((dart_html.Event evt){ return; }); } on Exception catch(e) { return false; } return true; } }
Subclasses
Constructors
Methods
bool detectTouchSupport() #
bool detectTouchSupport() { dart_html.DivElement elem = new dart_html.DivElement(); try { elem.onTouchStart.listen((dart_html.Event evt){ return; }); } on Exception catch(e) { return false; } return true; }
bool isSupported() #
bool isSupported() { return _isSupported; }