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