Skip to content

Commit 685f52e

Browse files
committed
remove non related code from example app
1 parent 49a8ecf commit 685f52e

File tree

3 files changed

+0
-52
lines changed

3 files changed

+0
-52
lines changed

example/DESKTOP.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

example/lib/main.dart

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'dart:convert';
21
import 'dart:io';
32

43
import 'package:flutter/material.dart';
@@ -72,11 +71,9 @@ class _FlutterJsHomeScreenState extends State<FlutterJsHomeScreen> {
7271

7372
@override
7473
dispose() {
75-
print('DISPOSE CALLED!!!');
7674
super.dispose();
7775
//widget.javascriptRuntime.dispose();
7876
javascriptRuntime.dispose();
79-
_process?.kill(ProcessSignal.sigabrt);
8077
}
8178

8279
@override
@@ -125,27 +122,6 @@ class _FlutterJsHomeScreenState extends State<FlutterJsHomeScreen> {
125122
ElevatedButton(
126123
child: const Text('Fetch Remote Data'),
127124
onPressed: () async {
128-
print('PATH: ${Directory.current}');
129-
if (!_processInitialized)
130-
Process.start(
131-
'node.exe', ['${Directory.current.path}\\script.js'],
132-
mode: ProcessStartMode.detachedWithStdio)
133-
.then((process) {
134-
//print('PROCES: ${process.exitCode}');
135-
if (!_processInitialized) {
136-
_process = process;
137-
process.stdout.pipe(stdout);
138-
process.stderr.pipe(stderr);
139-
process.stdin.writeln('Hi');
140-
}
141-
_processInitialized = true;
142-
}).onError((error, stackTrace) {
143-
print(error.toString());
144-
});
145-
if (_processInitialized && _process != null) {
146-
_process?.stdin.writeln('Hi already initialized');
147-
}
148-
149125
var asyncResult = await javascriptRuntime.evaluateAsync("""
150126
fetch('https://raw.githubusercontent.com/abner/flutter_js/master/cxx/quickjs/VERSION').then(response => response.text());
151127
""");

example/script.js

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)