mirror of
https://github.com/wgh136/flutter_qjs.git
synced 2025-09-27 13:27:24 +00:00
fix example with latest flutter
This commit is contained in:
@@ -53,7 +53,8 @@ class CodeInputController extends TextEditingController {
|
|||||||
Future<void> spanCall;
|
Future<void> spanCall;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TextSpan buildTextSpan({TextStyle style, bool withComposing}) {
|
TextSpan buildTextSpan(
|
||||||
|
{@required BuildContext context, TextStyle style, bool withComposing}) {
|
||||||
String oldText = oldSpan.toPlainText();
|
String oldText = oldSpan.toPlainText();
|
||||||
String newText = value.text;
|
String newText = value.text;
|
||||||
if (oldText == newText) return oldSpan;
|
if (oldText == newText) return oldSpan;
|
||||||
|
@@ -75,7 +75,7 @@ class _TestPageState extends State<TestPage> {
|
|||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
FlatButton(
|
TextButton(
|
||||||
child: Text("evaluate"),
|
child: Text("evaluate"),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await _ensureEngine();
|
await _ensureEngine();
|
||||||
@@ -88,7 +88,7 @@ class _TestPageState extends State<TestPage> {
|
|||||||
}
|
}
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}),
|
}),
|
||||||
FlatButton(
|
TextButton(
|
||||||
child: Text("reset engine"),
|
child: Text("reset engine"),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (engine == null) return;
|
if (engine == null) return;
|
||||||
|
Reference in New Issue
Block a user