Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix new theme system >3.10 #116

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/detector/detector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<Detection> {
class Detection implements Comparable<Detection> {
Detection({required this.range, this.style, this.emojiStartPoint});

final TextRange range;
Expand Down
6 changes: 3 additions & 3 deletions lib/widgets/hashtag_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ class _HashTagTextFieldState extends State<HashTagTextField>
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,
);
Expand Down Expand Up @@ -1197,9 +1197,9 @@ class _HashTagTextFieldState extends State<HashTagTextField>
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<TextInputFormatter> formatters = <TextInputFormatter>[
Expand Down
5 changes: 2 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down