From de849c4c1864ad79aa514557105f4ada65778d0d Mon Sep 17 00:00:00 2001 From: narumi Date: Mon, 22 Feb 2021 00:37:54 +0800 Subject: [PATCH] fix example with latest flutter --- example/lib/highlight.dart | 3 ++- example/lib/main.dart | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/example/lib/highlight.dart b/example/lib/highlight.dart index d8da99e..cc2ece1 100644 --- a/example/lib/highlight.dart +++ b/example/lib/highlight.dart @@ -53,7 +53,8 @@ class CodeInputController extends TextEditingController { Future 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; diff --git a/example/lib/main.dart b/example/lib/main.dart index 2caa884..ea3dd57 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -75,7 +75,7 @@ class _TestPageState extends State { scrollDirection: Axis.horizontal, child: Row( children: [ - FlatButton( + TextButton( child: Text("evaluate"), onPressed: () async { await _ensureEngine(); @@ -88,7 +88,7 @@ class _TestPageState extends State { } setState(() {}); }), - FlatButton( + TextButton( child: Text("reset engine"), onPressed: () async { if (engine == null) return;