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

feat: ✨ Added documentation comments to Showcase and ShowCaseWidget #298

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

HappyMakadiyaS
Copy link
Collaborator

Description

Added Documentation comments to Showcase and ShowCaseWidget class parameters

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • [-] Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

@@ -35,49 +35,162 @@ import 'tooltip_widget.dart';

class Showcase extends StatefulWidget {
@override

/// A key that is unique across the entire app.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention why we are using the key and how user can use it to start showcase.


/// ShapeBorder of the highlighted box when target widget will be showcased.
///
/// Note: If [targetBorderRadius] is specified, this parameter is ignored.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be,

If [targetBorderRadius] is specified, this parameter will be ignored.

/// ```
final ShapeBorder targetShapeBorder;

/// Radius of rectangle box when target widget will be showcased.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the grammer,

Radius of rectangle box while target widget is being showcased.

final double overlayOpacity;

/// Custom tooltip when [Showcase.withWidget] is used
/// having fixed [height] and [width]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to mention height and width parameters.

final Widget? container;
final Color showcaseBackgroundColor;

/// Default tooltip background color
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace this to,

Defines background color for tooltip widget.

Also, mention if this property will be ignored while using custom tooltip.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tooltipBackgroundColor parameter has been removed from parameter of Showcase.withWidget (custom tooltip) so I think no need to mention that.

final Color tooltipBackgroundColor;

/// Default tooltip text color
///
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention, Where this will be applied and and how it differs from titleTextStyle and description text style. As these two also can be used to provide text color.

final double? width;

/// The length of time the bouncing animation of tooltip should last.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The duration of time the bouncing animation of tooltip...

/// Default to `false`
final bool enableAutoPlayLock;

/// Whether disabling bouncing/moving animation for all the tooltip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... all tooltips.

final bool disableMovingAnimation;

/// Whether disabling initial scale animation for all the default tooltip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^

@@ -125,6 +162,8 @@ class ShowCaseWidgetState extends State<ShowCaseWidget> {
}
}

/// Completes showcase of given id and starts next one
/// otherwise will finish the entire showcase view
void completed(GlobalKey? id) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be named as key instead of id.

@HappyMakadiyaS HappyMakadiyaS force-pushed the feature/doc-comments branch 2 times, most recently from a7cf0d0 to c8483dd Compare November 2, 2022 12:41
@PRBaraiya
Copy link
Contributor

LGTM!

@vatsaltanna-simformsolutions vatsaltanna-simformsolutions deleted the feature/doc-comments branch November 2, 2022 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants