我正在学习Flutter/Dart编程语言,我想要进行以下检查 - 验证用户输入的电子邮件地址是否包含“@”符号
String myString = 'Dart';
// just like i can do the following check
myString.contains('a') ? print('validate') : print('does not validate')
// I want to do another check here
myString does not contain('@') ? print('does not validate'): print('validate')
请问是否有内置函数可以完成这样的事情。
bang
运算符。 - samarthbool check = false; !check ? print('getting the hang of it') : print('not yet');
- samarth