From 9f98d64a799d65480457117b8ea5eea58ad04c8b Mon Sep 17 00:00:00 2001 From: Aditya Chavda <98031138+aditya-css@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:26:36 +0530 Subject: [PATCH] fix: :shirt: Suppress Text Scale Factor Warning (#419) - Suppressed `textScaleFactor` deprecated warning in `tooltip_widget.dart` and added TODO to replace it in future. - Removed `avoid_returning_null` deprecated lint rule from `analysis_options.yaml`. --- CHANGELOG.md | 1 + analysis_options.yaml | 3 +-- lib/src/tooltip_widget.dart | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f9139bb..cad14426 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## [2.0.4] +- Fixed [#419](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/pull/419) - Suppress Text Scale Factor Warning - Improvement [#413](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/pull/413) - Improved `Showcase` class - Fixed [#369](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/pull/369) - Fixed ToolTip Slide Transition - Fixed [#388](https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/issues/388) - Can't scroll horizontal list with showcase diff --git a/analysis_options.yaml b/analysis_options.yaml index f3c57469..21219a31 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -14,7 +14,6 @@ analyzer: linter: rules: public_member_api_docs: false - avoid_returning_null: false avoid_print: true avoid_empty_else: true annotate_overrides: true @@ -22,4 +21,4 @@ linter: close_sinks: true avoid_positional_boolean_parameters: false use_super_parameters: true - prefer_relative_imports: true \ No newline at end of file + prefer_relative_imports: true diff --git a/lib/src/tooltip_widget.dart b/lib/src/tooltip_widget.dart index eccb7daf..babc474b 100644 --- a/lib/src/tooltip_widget.dart +++ b/lib/src/tooltip_widget.dart @@ -545,6 +545,8 @@ class _ToolTipWidgetState extends State final textPainter = TextPainter( text: TextSpan(text: text, style: style), maxLines: 1, + // TODO: replace this once we support sdk v3.12. + // ignore: deprecated_member_use textScaleFactor: MediaQuery.of(context).textScaleFactor, textDirection: TextDirection.ltr, )..layout();