Skip to content

Commit

Permalink
fix: 👕 Suppress Text Scale Factor Warning (#419)
Browse files Browse the repository at this point in the history
- 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`.
  • Loading branch information
aditya-css committed Apr 18, 2024
1 parent 6ed6e03 commit 9f98d64
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ analyzer:
linter:
rules:
public_member_api_docs: false
avoid_returning_null: false
avoid_print: true
avoid_empty_else: true
annotate_overrides: true
cancel_subscriptions: true
close_sinks: true
avoid_positional_boolean_parameters: false
use_super_parameters: true
prefer_relative_imports: true
prefer_relative_imports: true
2 changes: 2 additions & 0 deletions lib/src/tooltip_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,8 @@ class _ToolTipWidgetState extends State<ToolTipWidget>
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();
Expand Down

0 comments on commit 9f98d64

Please sign in to comment.