invoking 

Send to Kindle
home » snippets » dart » invoking




Run dart in checked mode

Refer enabling checked mode

function dart_checked() {
    # --checked implied both --enable-type-checks and --assert
    # --enable-type-checked ensures assignments are
    #     dynamically checked, and certain violations of the type
    #     system raise exceptions at run time.
    # --assert ensures that assert() expressions are
    #     evaulated and the program terminated on failure.
    exec $DART_SDK/bin/dart --checked "$@"
}

Run Dartium in checked mode

Refer: Dartium: Launching from the Command Line

function dartium_checked() {(
    # --enable-type-checked ensures assignments are
    #     dynamically checked, and certain violations of the type
    #     system raise exceptions at run time.
    # --assert ensures that assert() expressions are
    #     evaulated and the program terminated on failure.
    export DART_FLAGS='--enable-type-checks --enable-asserts'
    open -a Chromium.app
)}