isValidScriptVersion static method

bool isValidScriptVersion(
  1. String scriptVersion
)

Returns true if the given scriptVersion conforms to the proper regex pattern.

Regex pattern ^[1-9]?[0-9]{0,2}([.][0-9]{1,3}){1,2}

Implementation

static bool isValidScriptVersion(String scriptVersion) =>
    RegExp(r"^[1-9]?[0-9]{0,2}([.][0-9]{1,3}){1,2}").hasMatch(scriptVersion);