Logo

Programming-Idioms

History of Idiom 123 > diff from v35 to v36

Edit summary for version 36 by Manu:
[Dart] missing semicolon at the end of statement

Version 35

2021-08-17, 00:17:05

Version 36

2022-03-15, 11:23:26

Idiom #123 Assert condition

Verify that predicate isConsistent returns true, otherwise report assertion violation.
Explain if the assertion is executed even in production environment or not.

Idiom #123 Assert condition

Verify that predicate isConsistent returns true, otherwise report assertion violation.
Explain if the assertion is executed even in production environment or not.

Variables
isConsistent
Variables
isConsistent
Extra Keywords
debug testing test
Extra Keywords
debug testing test
Code
assert(isConsistent)
Code
assert(isConsistent);
Comments bubble
Needs to be executed with "--enable-asserts" flag with dart and dart2js commands.
In Flutter it will execute only in debug mode.
dartdevc (development compiler) will execute it by default.
Comments bubble
Needs to be executed with "--enable-asserts" flag with dart and dart2js commands.
In Flutter it will execute only in debug mode.
dartdevc (development compiler) will execute it by default.
Doc URL
https://dart.dev/guides/language/language-tour#assert
Doc URL
https://dart.dev/guides/language/language-tour#assert