Download flutter/dev/integration_tests/flutter_gallery/lib/delayed_main.dart from luom2645/agent-workspace: direct link, hf CLI and curl.
- Browser
- Download file 951 Bytes
-
https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/dev/integration_tests/flutter_gallery/lib/delayed_main.dart
- Command line
-
hf download hf://luom2645/agent-workspace@7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/dev/integration_tests/flutter_gallery/lib/delayed_main.dart
-
curl -L -o delayed_main.dart https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/flutter/dev/integration_tests/flutter_gallery/lib/delayed_main.dart
951 Bytes
| // Copyright 2014 The Flutter Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style license that can be | |
| // found in the LICENSE file. | |
| import 'package:flutter/material.dart'; | |
| import 'gallery/app.dart'; | |
| Object? createGarbage() { | |
| final List<dynamic> garbage = <dynamic>[]; | |
| for (int index = 0; index < 1000; index += 1) { | |
| final List<int> moreGarbage = List<int>.filled(1000, index); | |
| if (index.isOdd) { | |
| garbage.add(moreGarbage); | |
| } | |
| } | |
| return garbage; | |
| } | |
| Future<void> main() async { | |
| // Create some garbage, and simulate some delays between that could be | |
| // plugin or network call related. | |
| final List<dynamic> garbage = <dynamic>[]; | |
| for (int index = 0; index < 20; index += 1) { | |
| final Object? moreGarbage = createGarbage(); | |
| if (index.isOdd) { | |
| garbage.add(moreGarbage); | |
| await Future<void>.delayed(const Duration(milliseconds: 7)); | |
| } | |
| } | |
| runApp(const GalleryApp()); | |
| } | |