Skip to content

Commit

Permalink
Add documentation comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SviatManiuk committed Jun 30, 2023
1 parent c2a4558 commit 80d109d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/safe_area_values.dart
@@ -1,5 +1,6 @@
import 'package:flutter/widgets.dart';

/// A data class that is used to pass safe area values for snackbar
class SafeAreaValues {
const SafeAreaValues({
this.left = true,
Expand Down
1 change: 1 addition & 0 deletions lib/tap_bounce_container.dart
Expand Up @@ -17,6 +17,7 @@ class TapBounceContainer extends StatefulWidget {
TapBounceContainerState createState() => TapBounceContainerState();
}

/// State for a [TapBounceContainer].
class TapBounceContainerState extends State<TapBounceContainer>
with SingleTickerProviderStateMixin {
late double _scale;
Expand Down
9 changes: 7 additions & 2 deletions lib/top_snack_bar.dart
Expand Up @@ -6,8 +6,10 @@ import 'package:top_snackbar_flutter/tap_bounce_container.dart';

typedef ControllerCallback = void Function(AnimationController);

/// Represents possible triggers to dismiss the snackbar.
enum DismissType { onTap, onSwipe, none }

/// Represents possible vertical position of snackbar.
enum SnackBarPosition { top, bottom }

OverlayEntry? _previousEntry;
Expand Down Expand Up @@ -44,10 +46,13 @@ OverlayEntry? _previousEntry;
/// The [safeAreaValues] argument is used to specify the arguments of the
/// [SafeArea] widget that wrap the snackbar.
///
/// The [dismissType] argument specify which action to trigger to
/// The [dismissType] argument specifies which action to trigger to
/// dismiss the snackbar. Defaults to `TopSnackBarDismissType.onTap`
///
/// The [dismissDirection] argument specify in which direction the snackbar
/// The [snackBarPosition] argument specifies the vertical position of the snackbar.
/// Defaults to [SnackBarPosition.top]
///
/// The [dismissDirection] argument specifies in which direction the snackbar
/// can be dismissed. This argument is only used when [dismissType] is equal
/// to `DismissType.onSwipe`. Defaults to `[DismissDirection.up]`
void showTopSnackBar(
Expand Down

0 comments on commit 80d109d

Please sign in to comment.