xgqfrms / dart

dart for flutter
https://dart.xgqfrms.xyz/
MIT License
1 stars 0 forks source link

dart .. operator & dart .. syntax #8

Open xgqfrms opened 4 years ago

xgqfrms commented 4 years ago

dart .. operator & dart .. syntax

Cascade notation (..)

// Cascade notation (..)
querySelector('#confirm') // Get an object.
  ..text = 'Confirm' // Use its members.
  ..classes.add('important')
  ..onClick.listen((e) => window.alert('Confirmed!'));

https://dart.dev/guides/language/language-tour#cascade-notation-

https://www.cnblogs.com/xgqfrms/p/11305877.html

xgqfrms commented 4 years ago

级联符号