30秒学会 Dart 片段 – head
Returns the head of a list. Check if lst has a non-zero length, use lst[0] if possible to return the...
Returns the head of a list. Check if lst has a non-zero length, use lst[0] if possible to return the...
Returns the maximum of two DateTime values. Use the conditional operator (?:) to return the maximum ...
Pads a string on both sides with the specified padding, if it’s shorter than the specified len...
Returns true if the given number is even, false otherwise. Checks whether a number is odd or even us...
Returns a random element from an array. Use Math.random() to generate a random number, multiply it b...
Creates a triangle shape with pure CSS. The color of the border is the color of the triangle. The si...
Calculates the midpoint between two pairs of (x,y) points. Destructure the array to get x1, y1, x2 a...
Casts the provided value as an array if it’s not one. Use Array.prototype.isArray() to determi...
Returns true if the specified value is null, false otherwise. Use the strict equality operator to ch...
Returns a random integer in the specified range. Use rand.Intn() to generate a random number between...