添加 range

This commit is contained in:
shenjack 2024-04-05 00:09:14 +08:00
parent e8d5dfd1c1
commit b9d2d1f014
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 125 additions and 10 deletions

File diff suppressed because one or more lines are too long

View File

@ -120,7 +120,15 @@ void main() {
// Find all elements by tag (<div>). // Find all elements by tag (<div>).
List<Element> divElements = querySelectorAll('div'); List<Element> divElements = querySelectorAll('div');
List<double> double_list = [1.0, 2.0, 3.0]; List<double> double_list = [1.0, 2.0, 3.0, 5.0, 5.002];
// range in list
print(double_list.getRange(0, 2).toList());
// range
var range = List.generate(5, (index) => index);
print(range);
print(double_list.getRange(Range.END_TO_START, Range.START_TO_END).toList());
// //
double_list.add(4.0); double_list.add(4.0);