Skip to content

Commit

Permalink
Prepare to publish v1.0.0 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
halildurmus authored Jul 12, 2023
1 parent 2ee3857 commit 60d4592
Show file tree
Hide file tree
Showing 24 changed files with 249 additions and 677 deletions.
22 changes: 11 additions & 11 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
pub_cache:
folder: ~/.pub-cache

task:
format_task:
name: Verify formatting
container:
image: cirrusci/flutter:stable
format_script: flutter format . --set-exit-if-changed
image: ghcr.io/cirruslabs/flutter:stable
format_script: dart format . --set-exit-if-changed

task:
analyzer_task:
name: Run analyzer
container:
image: cirrusci/flutter:stable
image: ghcr.io/cirruslabs/flutter:stable
analyze_script:
- flutter pub get
- flutter analyze --no-pub

task:
tests_task:
name: Run tests
container:
image: cirrusci/flutter:stable
image: ghcr.io/cirruslabs/flutter:stable
test_script: flutter test

task:
example_android_task:
name: Build example app (Android)
container:
image: cirrusci/flutter:stable
image: ghcr.io/cirruslabs/flutter:stable
build_script:
- cd example
- flutter build apk --debug

task:
example_ios_task:
name: Build example app (iOS)
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
image: ghcr.io/cirruslabs/macos-ventura-xcode:14.3.1
build_script:
- cd example
- flutter build ios --no-codesign --debug
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
Expand Down
72 changes: 5 additions & 67 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,75 +1,13 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
.vscode/

# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
build/

# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java

# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/ephemeral
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
pubspec.lock
pubspec_overrides.yaml
*.iml

# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
# Conventional directory for build output.
build/
7 changes: 7 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Below is a list of people and organizations that have contributed to the
# project. Names should be added to the list like so, ordered alphabetically by
# GitHub handle:
#
# Name/Organization (@github_handle)

Halil Durmus (@halildurmus)
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.0.0

- **BREAKING**: Requires Dart `3.0.0` or later.
- **BREAKING**: Requires Flutter `3.7.0` or later.

## 0.3.0

- `SiriWave`'s background is now transparent -- which should now be visible in light backgrounds.
Expand Down
28 changes: 17 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Contributing

_See also: [SiriWave's code of conduct](https://github.com/halildurmus/siri_wave/blob/master/CODE_OF_CONDUCT.md)_
_See also: [siri_wave's code of conduct](https://github.com/halildurmus/siri_wave/blob/main/CODE_OF_CONDUCT.md)_

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
First off, thanks for taking the time to contribute!


The following is a guideline for contributing to <b>BMI Calculator</b>. These are mostly guidelines, not rules.
Use your best judgment, and feel free to propose changes to this document in a pull request.
The following is a guideline for contributing to **siri_wave**. These are mostly
guidelines, not rules. Use your best judgment, and feel free to propose changes
to this document in a pull request.

## Getting Started

Make sure you have <b>Flutter</b> installed and on your path.
Make sure you have **Flutter** installed and on your path.

Follow these steps to clone **siri_wave** and set up the development
environment:

Follow these steps to clone <b>SiriWave</b> and set up the development environment:
1. Clone the project: `git clone https://github.com/halildurmus/siri_wave.git`
2. Go into the cloned directory: `cd siri_wave`
3. Install all packages: `flutter packages get`
Expand All @@ -26,19 +28,23 @@ This helps us and the community to discuss the issue and choose what is deemed t

### Checking your code's quality

After you have made your changes, you have to make sure your code works correctly and meets our guidelines. Our guidelines are:
After you have made your changes, you have to make sure your code works
correctly and meets our guidelines. Our guidelines are:
- Make sure the code passes the tests. To run tests, run `flutter test`.
- Make sure to run `flutter analyze` and resolve any warnings or errors.
- The code should be formatted correctly. To format your code you can run this command inside the project from the command line: `flutter format`.
- The code should be formatted correctly. To format your code you can run this
command inside the project from the command line: `flutter format`.

## Creating a Pull Request

Congratulations! Your code meets all of our guidelines :100:. Now you have to submit a pull request (or PR for short) to us.
Congratulations! Your code meets all of our guidelines. Now you have to submit
a pull request (or PR for short) to us.

These are the steps you should follow when creating a PR:
- Make a descriptive title that summarizes what changes were in the PR.
- Link to issues that this PR will fix (if any).
- If your PR adds a feature or fixes a bug, it must add one or more tests.
- Change your code according to feedback (if any).

After you follow the above steps, your PR will hopefully be merged. Thanks for contributing!
After you follow the above steps, your PR will hopefully be merged.
Thanks for contributing!
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Halil İbrahim Durmuş
Copyright (c) 2023 Halil Durmus

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
88 changes: 47 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
# siri_wave

[![pub package](https://img.shields.io/pub/v/siri_wave.svg?style=for-the-badge)](https://pub.dev/packages/siri_wave)
[![Platform](https://img.shields.io/badge/Platform-Flutter-02569B?logo=flutter&style=for-the-badge)](https://flutter.dev)
![GitHub top language](https://img.shields.io/github/languages/top/halildurmus/hotdeals-app?style=for-the-badge)
[![CirrusCI](https://img.shields.io/cirrus/github/halildurmus/siri_wave?style=for-the-badge)](https://cirrus-ci.com/halildurmus/siri_wave)
[![CodeFactor](https://www.codefactor.io/repository/github/halildurmus/siri_wave/badge?style=for-the-badge)](https://www.codefactor.io/repository/github/halildurmus/siri_wave)
![Visits](https://visitor-badge.glitch.me/badge?page_id=halildurmus.siri_wave)
[![ci](https://img.shields.io/cirrus/github/halildurmus/siri_wave)](https://cirrus-ci.com/halildurmus/siri_wave)
[![Package: siri_wave](https://img.shields.io/pub/v/siri_wave.svg)](https://pub.dev/packages/siri_wave)
[![Publisher: halildurmus.dev](https://img.shields.io/pub/publisher/siri_wave.svg)](https://pub.dev/publishers/halildurmus.dev)
[![Language: Dart](https://img.shields.io/badge/language-Dart-blue.svg)](https://dart.dev)
[![Platform: Flutter](https://img.shields.io/badge/Platform-Flutter-02569B?logo=flutter)](https://flutter.dev)
[![License: MIT](https://img.shields.io/github/license/halildurmus/siri_wave?color=blue)](https://opensource.org/licenses/mit)

> A Flutter package to create beautiful waveforms like in *Siri*. It was inspired from the [siriwave](https://github.com/kopiro/siriwave) library.
> Create beautiful waveforms like in *Siri*.
It was inspired from the [siriwave](https://github.com/kopiro/siriwave) library.

## Demo

Check out the live demo [here](https://halildurmus.github.io/siri_wave).

## iOS 7 style
## iOS 7 style waveform

[![iOS 7](https://raw.githubusercontent.com/halildurmus/siri_wave/main/gifs/ios_7.gif)](https://halildurmus.github.io/siri_wave)
[![iOS 7 style waveform](https://raw.githubusercontent.com/halildurmus/siri_wave/main/gifs/ios_7.gif)](https://halildurmus.github.io/siri_wave)

## iOS 9 style
## iOS 9 style waveform

[![iOS 9](https://raw.githubusercontent.com/halildurmus/siri_wave/main/gifs/ios_9.gif)](https://halildurmus.github.io/siri_wave)
[![iOS 9 style waveform](https://raw.githubusercontent.com/halildurmus/siri_wave/main/gifs/ios_9.gif)](https://halildurmus.github.io/siri_wave)

## Getting Started

### Requirements
- `Dart >= 2.17.0`
- `Flutter >= 3.0.0`
- `Dart >= 3.0.0`
- `Flutter >= 3.7.0`

## Usage

Expand All @@ -41,14 +42,17 @@ class MyWidget extends StatelessWidget {
}
```

To be able to change the `amplitude`, `frequency`, `speed` and `color` properties of the waveform, create a `SiriWaveController` and pass it to the `SiriWave` widget:
To customize the `amplitude`, `frequency`, `speed`, and `color` properties of
the waveform, create an instance of `SiriWaveController` and pass it to the
`SiriWave` widget as shown in the code snippet below:

```dart
import 'package:siri_wave/siri_wave.dart';
class MyWidget extends StatelessWidget {
Widget build(BuildContext context) {
// You can change the default values while creating the controller.
// You can customize the default values of the waveform while creating the
// controller:
// final controller = SiriWaveController(
// amplitude: 0.5,
// color: Colors.red,
Expand All @@ -61,53 +65,55 @@ class MyWidget extends StatelessWidget {
}
```

And then call any method you want from the controller.
Afterward, you can invoke any desired method from the controller to modify the
waveform:

```dart
controller.setAmplitude(0.8);
controller.setSpeed(0.1);
// Only available in the iOS 7 style waveform.
// These are only available in the iOS 7 style waveform.
controller.setColor(Colors.yellow);
controller.setFrequency(4);
```

See the [example](https://github.com/halildurmus/siri_wave/blob/main/example/lib/main.dart) directory for a complete sample app.
For a complete sample application, please checkout the [example](https://github.com/halildurmus/siri_wave/blob/main/example/lib/main.dart).

## SiriWave

| Parameter | Type | Description | Default |
| ------------ | ------------------- | ----------------------------------------- | ----------------------- |
| `controller` | SiriWaveController | The controller of the SiriWave. | SiriWaveController() |
| `options` | SiriWaveOptions | The configuration of the SiriWave. | SiriWaveOptions() |
| `style` | SiriWaveStyle | The wave style of the SiriWave. | SiriWaveStyle.ios_9 |
| Parameter | Type | Description | Default |
| ------------ | ------------------ | ---------------------------------- | -------------------- |
| `controller` | SiriWaveController | The controller of the SiriWave. | SiriWaveController() |
| `options` | SiriWaveOptions | The configuration of the SiriWave. | SiriWaveOptions() |
| `style` | SiriWaveStyle | The wave style of the SiriWave. | SiriWaveStyle.ios_9 |


## SiriWaveController

| Parameter | Type | Description | Default |
| ------------ | -------- | ------------------------------------------- | ------------ |
| `amplitude` | double | The amplitude of the waveform. | 1.0 |
| `color` | Color | The color of the iOS 7 style waveform. | Colors.white |
| `frequency` | int | The frequency of the iOS 7 style waveform. | 6 |
| `speed` | double | The speed of the waveform. | 0.2 |
| Parameter | Type | Description | Default |
| ----------- | ------ | ------------------------------------------ | ------------ |
| `amplitude` | double | The amplitude of the waveform. | 1.0 |
| `color` | Color | The color of the iOS 7 style waveform. | Colors.white |
| `frequency` | int | The frequency of the iOS 7 style waveform. | 6 |
| `speed` | double | The speed of the waveform. | 0.2 |

| Function | Description |
| ----------------------------- | ---------------------------------------------------------------------------------------- |
| `setAmplitude(double value)` | Sets the amplitude of the waveform. The value must be in the [0,1] range. |
| `setColor(Color color)` | Sets the color of the iOS 7 style waveform. |
| `setFrequency(double value)` | Sets the frequency of the iOS 7 style waveform. The value must be in the [-20,20] range. |
| `setSpeed(double value)` | Sets the speed of the waveform. The value must be in the [0,1] range. |
| Function | Description |
| ---------------------------- | ---------------------------------------------------------------------------------------- |
| `setAmplitude(double value)` | Sets the amplitude of the waveform. The value must be in the [0,1] range. |
| `setColor(Color color)` | Sets the color of the iOS 7 style waveform. |
| `setFrequency(double value)` | Sets the frequency of the iOS 7 style waveform. The value must be in the [-20,20] range. |
| `setSpeed(double value)` | Sets the speed of the waveform. The value must be in the [0,1] range. |

## SiriWaveOptions

| Parameter | Type | Description | Default |
| ------------------ | -------- | ----------------------------------------------------| ------------- |
| `height` | double | The height of the waveform. | 180 |
| `showSupportBar` | bool | Whether to show support bar on iOS 9 style waveform.| true |
| `width` | double | The width of the waveform. | 360 |
| Parameter | Type | Description | Default |
| ---------------- | ------ | ---------------------------------------------------- | ------- |
| `height` | double | The height of the waveform. | 180 |
| `showSupportBar` | bool | Whether to show support bar on iOS 9 style waveform. | true |
| `width` | double | The width of the waveform. | 360 |

## 🤝 Contributing

Contributions, issues and feature requests are welcome.
Feel free to check [issues page](https://github.com/halildurmus/siri_wave/issues) if you want to contribute.
Feel free to check [issues page](https://github.com/halildurmus/siri_wave/issues)
if you want to contribute.
Loading

0 comments on commit 60d4592

Please sign in to comment.