flutter_sinusoidals
원하는 대로 사인파를 시각화할 수 있도록 도와주는 플러터 패키지입니다. 모든 기본 파형이 이미 지원되며, 사용자 정의 파형과 일부 미리 정의된 파형도 포함되어 있습니다.
사인 파장을 시각화하는 데 도움이 되는 플러터 패키지입니다.
{"sdk":"flutter"}^1.2.5{"sdk":"flutter"}아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
A flutter package that helps you to visualize sine waves as you desire. All basic waves are already supported, plus customized waves & some pre-defined waves.
Overview
In the pubspec.yaml of your flutter project, add the following dependency:
dependencies:
...
flutter_sinusoidals:
In your code add the following import:
import 'package:flutter_sinusoidals/flutter_sinusoidals.dart';
This package comes with 4 kinds of sine waves:
A widget which helps visualize a sinusoidal.
Overview
Example of a sinusoidal:
Sinusoidal(
model: const SinusoidalModel(
formular: WaveFormular.standing,
amplitude: 25,
waves: 2.5,
frequency: 1.5,
),
child: Container(
height: 100,
color: Colors.blue,
),
),
A widget which helps visualize a stack of sinusoidals.
Overview
Example of a sinusoidals:
Sinusoidals(
itemCount: 3,
builder: (context, index) {
return SinusoidalItem(
model: SinusoidalModel(
formular: WaveFormular.travelling,
amplitude: _amplitude,
waves: _waves,
translate: 5.0 * (index + 1),
center: 5.0 * (index + 1),
),
child: Container(
height: _height,
color: _colors[index],
),
);
},
);
A widget which helps visualize a combined wave.
A combined wave is a wave that is formed by adding multiple sinusoidals together.
Overview
Example of a combined wave:
CombinedWave(
reverse: true,
models: const [
SinusoidalModel(
amplitude: 25,
waves: 20,
translate: 2.5,
frequency: 0.5,
),
SinusoidalModel(
amplitude: 25,
waves: 15,
translate: 7.5,
frequency: 1.5,
),
],
child: Container(
height: 200,
color: Colors.blue,
),
),
A pre-defined wave that mimicking magma motion.
This is included in the package just to demonstrate that you can create an awesome wave by combining multiple waves together.
Overview
To know how sinusoidal works: sinusoidal
Try demos to observe how sinusoidal visually works, and create your version by forming formulas.
See the Changelog to know what was changed.
Feel free to contribute to this project.
If you find a bug or want a feature, but don't know how to fix/implement it, please fire an issue.
If you fixed a bug or implemented a feature, please send a pull request.
A big thank you to KhanAcademy & Wiki for foundational knowledge about sine wave.
A big thank you to all the contributors to the project. Every PR / reported issue is greatly appreciated!