DiaUtils class

This class provides some simple utility functions for the dialog package.

Constructors

DiaUtils()

Properties

hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited

Static Properties

FALSE → String
A frequently used separator and String booleans
final
SEP_STAN → String
A frequently used separator and String booleans
final
TRUE → String
A frequently used separator and String booleans
final
UNICODE_COMBO_BOX → String
Some unicodes
final
UNICODE_DELETE_CROSS → String
Some unicodes
final

Static Methods

appendHtml2(Element el, String htmlText) → void
Append htmlText to el. Currently we trust all html tags inside htmlText. TODO: Instead of using "trusted" for each element, use a NodeTreeSanitizer with a NodeValidator which for example allows each element, but only certain attributes in the text, e.g. .
getBoolFromString(String s) → bool
Returns true if s = TRUE, otherwise false (even for s=null).
getTouchPoint(UIEvent e) → Point<int>
  • [...]
    getTouchPoints(UIEvent e) → List<Point<int>>
    Gets the x,y positions in pixels from a touch event e. If several fingers touched, the returned list is > 1. The returned x,y list is relative to the page. Return null if e is not touch event or the number of touches is 0.
    hasMouse() → bool
    Get Apple OS version (major and minor). try to find something like "CPU OS 9_0 or CPU OS 9_0_1", which is typical for iOS (also OS X ??) Return e.g. 9, 0 or [9, 0, 1. This was tested on iPad for iOS 9.0.1. Return null if no proper format found. / InfoDialog.noModal(window.navigator.userAgent, null); / InfoDialog.noModal("2=${versionString} ${index}", null); / InfoDialog.noModal("3=${versionString} ${index}", null); / InfoDialog.noModal("4=${temp}", null); Get Chrome version, works for Window, Android, .. (so far major). try to find something like "Chrome/48.0.2564.195.567". Return e.g. 48, 0 or 48, 0, 2564. Return null if no proper format found. / InfoDialog.noModal(window.navigator.userAgent, null); / InfoDialog.noModal("2=${versionString} ${index}", null); / InfoDialog.noModal("4=${temp}", null); Returns true if SpecPad is operated via mouse rather than finger. Currently identical to isTablet(). TODO: Event if tablet: mouse could be present, detect that.
    isPhone() → bool
    Returns true if Android OS is active. Returns true if device is an iPhone. A phone is also a tablet, but if a tablet is a phone additionally, layout specifics will apply.
    isSafariIOS() → bool
    Returns true iOS Safari is active.
    isTablet() → bool
    Returns true if we are on a tablet (based on the browser's user agent). User agent has been found to be the following: [...]
    removePx(String cssAttr) → double
    Returns the rounded integer value assuming cssAttr is given in pixels, "10", or "10.5px",