fix example with latest flutter

This commit is contained in:
narumi
2021-02-22 00:37:54 +08:00
parent 54baa25c87
commit de849c4c18
2 changed files with 4 additions and 3 deletions

View File

@@ -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;

View File

@@ -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;