Skip to content

Commit

Permalink
## 3.0.4
Browse files Browse the repository at this point in the history
- Added  checker for safety
- Deprecated
- Split the library into  (v3) and  (v1)
- Increase Unit Test
  • Loading branch information
Nialixus committed May 22, 2024
1 parent 374fdfb commit ee916dc
Show file tree
Hide file tree
Showing 42 changed files with 4,150 additions and 90 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,10 @@
- Update readme

## 3.0.3
- Add `onFinished` callback.
- Add `onFinished` callback.

## 3.0.4
- Added `Mounted` checker for safety
- Deprecated `TypeWriterText`
- Split the library into `TypeWriter` (v3) and `TypeWriterText` (v1)
- Increase Unit Test
49 changes: 6 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

# Type Writer Text

<a href='https://pub.dev/packages/typewritertext'><img src='https://img.shields.io/pub/v/typewritertext.svg?logo=flutter&color=blue&style=flat-square'/></a>\
<a href='https://pub.dev/packages/typewritertext'><img src='https://img.shields.io/pub/v/typewritertext.svg?logo=flutter&color=blue&style=flat-square'/></a>
<a href='https://raw.githack.com/Nialixus/typewritertext/main/coverage/html/index.html'><img src='https://img.shields.io/badge/coverage-98%25-blue.svg' /></a>
\
\
A simple typewriter text animation wrapper for flutter, supports iOS, Android, web, Windows, macOS, and Linux.

Expand All @@ -18,46 +20,19 @@ Add this line to your pubspec.yaml.

```yaml
dependencies:
typewritertext: ^3.0.3
typewritertext: ^3.0.4
```
## Usage
First, import the typewriter package.
```dart
import 'package:typewritertext/typewritertext.dart';
import 'package:typewritertext/v3/typewriter.dart';
```

### Version 1++
And to make basic `TypeWriterText` just make it like this
```dart
const TypeWriterText(
text: Text('lorem ipsum dolor sit amet ...'),
duration: Duration(milliseconds: 50),
);
```

Or if you want something that more customizable, use this

```dart
const TypeWriterText.builder(
'Lorem ipsum dolor sit amet ...',
duration: Duration(milliseconds: 50),
builder: (context, value) {
return AutoSizeText(
value,
maxLines: 2,
minFontSize: 2.0,
);
}
);
```

### Version 3++
Now there is new version of `TypeWriterText`,
where the text value that being used is not a `Text` widget but `Iterable<String>`.
Here's the basic example of it.
And to make basic `TypeWriter` text, just make it like this:

```dart
TypeWriter.text(
Expand Down Expand Up @@ -100,18 +75,6 @@ TypeWriter(
## Documentation
Full documentation <a href="https://pub.dev/documentation/typewritertext/latest/typewritertext/typewritertext-library.html">here</a>.

### Version 1++
| Property | Purpose |
|-----------------|------------------------------------------------|
| text | Use widget [Text()](https://api.flutter.dev/flutter/widgets/Text-class.html). |
| duration | Used to determine how fast text changes. |
| alignment | Align the `text` within the occupied size. |
| maintainSize | Used to maintain the occupied size of the final text. Default value is `true`. |
| play | To set whether the animation should play or not. Default value is `true`. |
| repeat | To set whether the animation should be repeated or not. Default value is `false`. |
| onFinished | Is a callback that triggered when the animation is done. This requires [play] as `true` and repeat as `false`. |

### Version 3++
| Property | Purpose |
|----------------------|--------------------------------------------------------------|
| repeat | Specifies whether the animation should repeat once completed (default is `false`). |
Expand Down
Binary file added coverage/amber.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions coverage/cmd_line
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
genhtml -o coverage coverage/lcov.info
Binary file added coverage/emerald.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ee916dc

Please sign in to comment.