From 640a8771ab5b83eaba41a37680efa27133eef56e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wr=C3=B3bel?= Date: Fri, 23 Dec 2022 01:20:19 +0100 Subject: [PATCH] Update Padding for non-scrollable text added --- CHANGELOG.md | 4 ++++ example/pubspec.lock | 2 +- lib/auto_scroll_text.dart | 15 +++++++++++++++ pubspec.yaml | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3b7205..c70ffa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.6 + +* Padding for non-scrollable text added + ## 0.0.5 * Docs fix diff --git a/example/pubspec.lock b/example/pubspec.lock index e78a093..a213689 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -14,7 +14,7 @@ packages: path: ".." relative: true source: path - version: "0.0.5" + version: "0.0.6" boolean_selector: dependency: transitive description: diff --git a/lib/auto_scroll_text.dart b/lib/auto_scroll_text.dart index a9d4bd4..e4408f8 100644 --- a/lib/auto_scroll_text.dart +++ b/lib/auto_scroll_text.dart @@ -41,6 +41,7 @@ class AutoScrollText extends StatefulWidget { this.intervalSpaces, this.scrollDirection = Axis.horizontal, this.curve = Curves.linear, + this.padding = EdgeInsets.zero, }) : super(key: key); /// The text string, that would be scrolled. @@ -228,6 +229,20 @@ class AutoScrollText extends StatefulWidget { /// ``` final Curve curve; + /// [EdgeInsets] of padding for non-scrollable animation + /// + /// Default is [EdgeInsets.zero]. + /// + /// Example: + /// + /// ```dart + /// AutoScrollText( + /// 'Text with linear animation, + /// padding: EdgeInsets.all(8), + /// ) + /// ``` + final EdgeInsets padding; + @override State createState() => _AutoScrollTextState(); } diff --git a/pubspec.yaml b/pubspec.yaml index 71770f3..dd61b97 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: auto_scroll_text description: AutoScrollText is package for users which need a single line text widget without overlaping or TextOverflow.elipsis for long texts. -version: 0.0.5 +version: 0.0.6 homepage: https://github.com/Bomsamdi/auto_scroll_text environment: