This commit is contained in:
ekibun
2020-09-13 22:50:14 +08:00
parent 89ea0222be
commit 60466a5c7d
11 changed files with 146 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
* @Author: ekibun
* @Date: 2020-08-08 08:16:51
* @LastEditors: ekibun
* @LastEditTime: 2020-08-27 20:39:32
* @LastEditTime: 2020-09-06 19:44:32
*/
import 'package:flutter/material.dart';
import 'dart:typed_data';
@@ -46,13 +46,13 @@ class TestPage extends StatefulWidget {
class _TestPageState extends State<TestPage> {
String resp;
FlutterJs engine;
FlutterQjs engine;
CodeInputController _controller = CodeInputController();
_createEngine() async {
if (engine != null) return;
engine = FlutterJs();
engine = FlutterQjs();
await engine.setMethodHandler((String method, List arg) async {
switch (method) {
case "http":

View File

@@ -57,6 +57,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0-nullsafety"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3"
flutter:
dependency: "direct main"
description: flutter

View File

@@ -0,0 +1,27 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_qjs_example/main.dart';
void main() {
testWidgets('Verify Platform version', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
// Verify that platform version is retrieved.
expect(
find.byWidgetPredicate(
(Widget widget) => widget is Text &&
widget.data.startsWith('Running on:'),
),
findsOneWidget,
);
});
}