- 从stdin传入测试数据
- 动态加载实现函数
- 运行函数
- 检查输出是否正确
import copy
import os
function scroll_to(splash, x, y) | |
local js = string.format( | |
"window.scrollTo(%s, %s);", | |
tonumber(x), | |
tonumber(y) | |
) | |
return splash:runjs(js) | |
end |
import 'package:flutter/material.dart'; | |
import 'dart:ui' as ui; | |
import 'package:flutter/services.dart' show rootBundle; | |
import 'dart:async'; | |
import 'dart:typed_data'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. |
import copy
import os
// e.g. console.save({hello: 'world'}) | |
(function(console){ | |
console.save = function(data, filename){ | |
if(!data) { | |
console.error('Console.save: No data') | |
return; | |
} | |
if(!filename) filename = 'console.json' | |
if(typeof data === "object"){ | |
data = JSON.stringify(data, undefined, 4) |
# remove iOS bitcode | |
flutter build ios | |
cd build/ios/iphoneos/Runner.app/Frameworks | |
cd App.framework | |
xcrun bitcode_strip -r app -o app | |
cd .. | |
cd Flutter.framework | |
xcrun bitcode_strip -r Flutter -o Flutter | |
cd ../../../../../../ |
// Make sure to replace <YOUR_LOCAL_IP> with | |
// the external IP of your computer if you're using Android. | |
// Note that we're using port 8888 which is Charles' default. | |
String proxy = Platform.isAndroid ? '<YOUR_LOCAL_IP>:8888' : 'localhost:8888'; | |
// Create a new HttpClient instance. | |
HttpClient httpClient = new HttpClient(); | |
// Hook into the findProxy callback to set | |
// the client's proxy. |
// Make sure to replace <YOUR_LOCAL_IP> with | |
// the external IP of your computer if you're using Android. | |
// Note that we're using port 8888 which is Charles' default. | |
String proxy = Platform.isAndroid ? '<YOUR_LOCAL_IP>:8888' : 'localhost:8888'; | |
// Create a new HttpClient instance. | |
HttpClient httpClient = new HttpClient(); | |
// Hook into the findProxy callback to set | |
// the client's proxy. |
// Make sure to replace <YOUR_LOCAL_IP> with | |
// the external IP of your computer if you're using Android. | |
// Note that we're using port 8888 which is Charles' default. | |
String proxy = Platform.isAndroid ? '<YOUR_LOCAL_IP>:8888' : 'localhost:8888'; | |
// Create a new Dio instance. | |
Dio dio = Dio(); | |
// Tap into the onHttpClientCreate callback | |
// to configure the proxy just as we did earlier. |
import 'dart:async'; | |
import 'package:flutter/material.dart'; | |
class InfiniteScroll extends StatefulWidget { | |
@override | |
_InfiniteScrollState createState() => new _InfiniteScrollState(); | |
} | |
class _InfiniteScrollState extends State<InfiniteScroll> { |