diff --git a/lib/detector/detector.dart b/lib/detector/detector.dart index ffd3602..851491f 100644 --- a/lib/detector/detector.dart +++ b/lib/detector/detector.dart @@ -3,7 +3,7 @@ import 'package:flutter/cupertino.dart'; import 'hashtag_regular_expression.dart'; /// DataModel to explain the unit of word in detection system -class Detection extends Comparable { +class Detection implements Comparable { Detection({required this.range, this.style, this.emojiStartPoint}); final TextRange range; diff --git a/lib/widgets/hashtag_text_field.dart b/lib/widgets/hashtag_text_field.dart index ab6c47f..39b2bd8 100644 --- a/lib/widgets/hashtag_text_field.dart +++ b/lib/widgets/hashtag_text_field.dart @@ -1024,7 +1024,7 @@ class _HashTagTextFieldState extends State return effectiveDecoration.copyWith( errorText: effectiveDecoration.errorText ?? '', counterStyle: effectiveDecoration.errorStyle ?? - themeData.textTheme.caption!.copyWith(color: themeData.errorColor), + themeData.textTheme.bodySmall!.copyWith(color: themeData.colorScheme.error), counterText: counterText, semanticCounterText: semanticCounterText, ); @@ -1197,9 +1197,9 @@ class _HashTagTextFieldState extends State final ThemeData theme = Theme.of(context); final TextSelectionThemeData selectionTheme = TextSelectionTheme.of(context); - final TextStyle style = theme.textTheme.subtitle1!.merge(widget.basicStyle); + final TextStyle style = theme.textTheme.titleMedium!.merge(widget.basicStyle); final Brightness keyboardAppearance = - widget.keyboardAppearance ?? theme.primaryColorBrightness; + widget.keyboardAppearance ?? theme.brightness; final TextEditingController controller = _effectiveController; final FocusNode focusNode = _effectiveFocusNode; final List formatters = [ diff --git a/pubspec.yaml b/pubspec.yaml index 6647c1e..91d7681 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,12 +1,11 @@ name: hashtagable description: Widgets and functions to implement hashtag decorated text. Decorates the words which start with `#` like a Twitter. -version: 2.3.0+1 +version: 2.3.1+1 homepage: https://github.com/santa112358/hashtagable repository: https://github.com/santa112358/hashtagable environment: - sdk: ">=2.16.1 <3.0.0" - flutter: "2.10.3" + sdk: ">=3.0.0 <4.0.0" dependencies: flutter: