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

made some comments more useful #29

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [0.0.7+7] - Sep 2, 2021
Small doc comment improvements

## [0.0.7+6] - Sep 2, 2021
Avoid another force unwrap error

Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.7+6"
version: "0.0.7+7"
lints:
dependency: transitive
description:
Expand Down
15 changes: 10 additions & 5 deletions lib/src/just_the_tooltip.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import 'package:just_the_tooltip/src/tooltip_overlay.dart';

/// A widget to display a tooltip over target widget. The tooltip can be
/// displayed on any axis of the widget and fallback to the opposite axis if
/// the tooltip does cannot fit its content. The tooltip can will be dismissed
/// by waiting a specified time or again tapping on the target widger or
/// the tooltip does cannot fit its content. The tooltip will be dismissed
/// by waiting a specified time or tapping again on the target widger or
/// anywhere on the screen.
///
/// Keep in mind there are different behaviours for the tooltip when [isModal]
Expand Down Expand Up @@ -88,15 +88,15 @@ class JustTheTooltip extends StatefulWidget {
);
}

/// Imperitive controller for handling the state the interface is in. If one
/// Imperitive controller for handling the state the tooltip is in. If one
/// is not provided a controller will be made.
final JustTheController? controller;

/// Responsible for how the entries will be placed onto the screen
/// Responsible for how the entries will be placed onto the screen.
final JustTheDelegate delegate;

/// The content of the tooltip. Content must be collapsed so it does not
/// exceed it's constraints. The content's intrinsics `size` is used to first
/// exceed it's constraints. The content's intrinsic `size` is used to first
/// to get the quadrant of the tooltip. It is then layed out with those
/// quadrant constraints limiting its size.
///
Expand Down Expand Up @@ -327,6 +327,9 @@ class _JustTheTooltipState extends State<JustTheTooltip>
if (_delegate is JustTheOverlayDelegate) {
WidgetsBinding.instance?.addPostFrameCallback((_) {
if (mounted) {
// _key here is either 0 or 1... Silly. We do this to force the state
// of the tooltip to update as calling update entry and co have not
// worked for me.
setState(() {
_key++;
_key %= 2;
Expand All @@ -340,6 +343,8 @@ class _JustTheTooltipState extends State<JustTheTooltip>
super.didUpdateWidget(oldWidget);
}

// Our controller listener here is like a redux store that listens to the
// actions on
Future<void> _controllerListener() async {
final controllerState = _controller.value;
final completer = controllerState.completer;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: just_the_tooltip
description: A multi directional tooltip used to display any content with inbuilt support for list views
version: 0.0.7+6
version: 0.0.7+7
homepage: https://github.com/Nolence/just_the_tooltip

environment:
Expand Down