isValidScriptVersion static method
Returns true
if the given scriptVersion
conforms to the proper regex
pattern.
Regex pattern ^(?!^\.)[0-9]{0,3}([.][0-9]{1,3}){1,2}$
Implementation
static bool isValidScriptVersion(String scriptVersion) =>
RegExp(r"^(?!^\.)[0-9]{0,3}([.][0-9]{1,3}){1,2}$")
.hasMatch(scriptVersion);