当前位置:网站首页>[fluent] dart data type boolean type (boolean type definition | logical operation)
[fluent] dart data type boolean type (boolean type definition | logical operation)
2022-07-02 16:33:00 【Programmer community】
I . bool The type definition
bool bool_1 = true;bool bool_0 = false;// Print the results : bool_1 : true , bool_0 : falseprint("bool_1 : $bool_1 , bool_0 : $bool_0");
II . bool Type logic operation
// 1 . Logic or operation bool bool_2 = bool_0 || bool_1;// 2 . Logic and computation bool bool_3 = bool_0 && bool_1;// Print the results : bool_2 : true , bool_3 : falseprint("bool_2 : $bool_2 , bool_3 : $bool_3");
III . Code example
import 'package:flutter/material.dart';class DartType_Bool extends StatefulWidget {
@override _DartType_BoolState createState() => _DartType_BoolState();}class _DartType_BoolState extends State<DartType_Bool> {
@override Widget build(BuildContext context) {
// call Demo Example method _boolDemo(); return Container(child: Text(' Boolean data type '),); } /** * Boolean type code example */ _boolDemo(){
// I . Boolean type definition bool bool_1 = true; bool bool_0 = false; // Print the results : bool_1 : true , bool_0 : false print("bool_1 : $bool_1 , bool_0 : $bool_0"); // II . Logical operations // 1 . Logic or operation bool bool_2 = bool_0 || bool_1; // 2 . Logic and computation bool bool_3 = bool_0 && bool_1; // Print the results : bool_2 : true , bool_3 : false print("bool_2 : $bool_2 , bool_3 : $bool_3"); }}
Execution results :
bool_1 : true , bool_0 : falsebool_2 : true , bool_3 : false
边栏推荐
- PCL 点云镜像变换
- JS learning notes - operators
- Mathematical analysis_ Notes_ Chapter 6: Riemann integral of univariate function
- Vscode设置标签页多行显示
- [fluent] dart language (DART language features | JIT instant compilation | AOT static compilation)
- 由ASP.NET Core根据路径下载文件异常引发的探究
- Seal Library - installation and introduction
- SQLServer查询哪些索引利用率低
- Yyds dry inventory KVM new inventory to expand space for home
- 通过两级网关设计来路由服务网格流量
猜你喜欢
SSM integration exception handler and project exception handling scheme
微信v3native支付设置的结束时间处理办法
分析超700万个研发需求发现,这8门编程语言才是行业最需要的!
JS learning notes - operators
JS learning notes - variables
历史上的今天:支付宝推出条码支付;分时系统之父诞生;世界上第一支电视广告...
Pandora IOT development board learning (RT thread) - Experiment 2 RGB LED experiment (learning notes)
Seal Library - installation and introduction
Data security industry series Salon (III) | data security industry standard system construction theme Salon
原神2.6服务端下载以及搭建安装教程
随机推荐
源码look me
中国信通院《数据安全产品与服务图谱》,美创科技实现四大板块全覆盖
头条 | 亚控科技产品入选中纺联《纺织服装行业数字化转型解决方案重点推广名录》
数据安全产业系列沙龙(三)| 数据安全产业标准体系建设主题沙龙
历史上的今天:支付宝推出条码支付;分时系统之父诞生;世界上第一支电视广告...
绝对真理和相对真理思考
Yyds dry goods inventory hands-on teaching you to carry out the packaging and release of mofish Library (fishing Library)
After the win10 system is upgraded for a period of time, the memory occupation is too high
触发器:Mysql实现一张表添加或删除一条数据,另一张表同时添加
July 1st gift: Yi Jingjie's "hundred day battle" ended perfectly, and the database of Guiyang bank was sealed in advance
Summary of monthly report | list of major events of moonbeam in June
[Xiaobai chat cloud] suggestions on container transformation of small and medium-sized enterprises
618 deep resumption: Haier Zhijia's winning methodology
Does bone conduction earphone have external sound? Advantages of bone conduction earphones
Sim2real environment configuration tutorial
Vscode设置标签页多行显示
Pandora IOT development board learning (RT thread) - Experiment 2 RGB LED experiment (learning notes)
End time processing method of wechat v3native payment settings
由ASP.NET Core根据路径下载文件异常引发的探究
Maui learning road (III) -- in depth discussion of winui3