This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
final a = 10; | |
final inside = a.clamp(1, 11); | |
final outsideMax = a.clamp(1, 9); | |
final outsideMin = a.clamp(11, 20); | |
print('inside: $inside, min: $outsideMin, max: $outsideMax'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
var counterStream = | |
Stream<int>.periodic(const Duration(seconds: 1), (x) => x).take(15); | |
var mas = <int>[]; | |
counterStream.listen((num) { | |
mas.add(num); | |
print("mas: ${mas}"); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"src": "/tmp/scratch-desktop/", | |
"dest": "/tmp/", | |
"arch": "i386", | |
"icon": "/tmp/scratch-desktop/resources/Icon.png", | |
"categories": [ | |
"Education" | |
] | |
} |
OlderNewer