{"id":3608,"date":"2022-05-20T11:25:40","date_gmt":"2022-05-20T11:25:40","guid":{"rendered":"https:\/\/mdr.foobrdigital.com\/?p=3608"},"modified":"2022-05-20T11:25:40","modified_gmt":"2022-05-20T11:25:40","slug":"dart-boolean","status":"publish","type":"post","link":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/2022\/05\/20\/dart-boolean\/","title":{"rendered":"Dart Boolean"},"content":{"rendered":"\n<p>Dart Boolean data type is used to check whether a given statement\u00a0<strong>true<\/strong>\u00a0or\u00a0<strong>false<\/strong>. The\u00a0<strong>true<\/strong>\u00a0and\u00a0<strong>false<\/strong>\u00a0are the two values of the Boolean type, which are both compile-time constants. In\u00a0Dart, The numeric value 1 or 0 cannot be used to specify the true or false. The\u00a0<strong>bool<\/strong>\u00a0keyword is used to represent the Boolean value. The syntax of declaring the Boolean variable is given below.<\/p>\n\n\n\n<p><strong>Syntax &#8211;<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.javatpoint.com\/dart-boolean#\"><\/a><a href=\"https:\/\/www.javatpoint.com\/dart-boolean#\"><\/a><a href=\"https:\/\/www.javatpoint.com\/dart-boolean#\"><\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bool var_name = true;    \nOR    \nbool var_name = false;  <\/code><\/pre>\n\n\n\n<p>Consider the following example.<\/p>\n\n\n\n<p><strong>Example &#8211;<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/www.javatpoint.com\/dart-boolean#\"><\/a><a href=\"https:\/\/www.javatpoint.com\/dart-boolean#\"><\/a><a href=\"https:\/\/www.javatpoint.com\/dart-boolean#\"><\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>void main() {  \nbool check;  \ncheck = 20>10;  \nprint(\"The statement is = ${check}\");  \n}  <\/code><\/pre>\n\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>true\n<\/code><\/pre>\n\n\n\n<p><strong>Explaination &#8211;<\/strong><\/p>\n\n\n\n<p>We have declared the bool variable&nbsp;<strong>check<\/strong>&nbsp;that will use to verify the given expression. The expression&nbsp;<strong>20&gt;12<\/strong>&nbsp;returned the true and we printed the result.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dart Boolean data type is used to check whether a given statement\u00a0true\u00a0or\u00a0false. The\u00a0true\u00a0and\u00a0false\u00a0are the two values of the Boolean type, which are both compile-time constants. In\u00a0Dart, The numeric value 1 or 0 cannot be used to specify the true or false. The\u00a0bool\u00a0keyword is used to represent the Boolean value. The syntax of declaring the Boolean [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[916],"tags":[],"_links":{"self":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/3608"}],"collection":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/comments?post=3608"}],"version-history":[{"count":0,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/posts\/3608\/revisions"}],"wp:attachment":[{"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/media?parent=3608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/categories?post=3608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mudassirbackup.infinitycodestudio.com\/index.php\/wp-json\/wp\/v2\/tags?post=3608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}