패키지, 저장소 및 앱 카테고리 검색

GitHub 저장소dungnv2602/flutter_sinusoidals

flutter_sinusoidals

사인 파장을 시각화하는 데 도움이 되는 플러터 패키지입니다.

flutter_sinusoidals 프로젝트 이미지
스타
27
포크
13
최근 푸시(UTC)
2023. 8. 27.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

flutter_sinusoidals

Pub

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

Features

  • Creating a sine wave.
  • Creating a stack of sine waves.
  • Combine multiple sine waves together.
  • This package use clipping to achieve wave effect so theoretically you can apply it to any widget. For example, an AppBar with a wave on the bottom.

Getting started

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';

Built-in waves

This package comes with 4 kinds of sine waves:

Sinusoidal

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,
  ),
),
Sinusoidals

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],
      ),
    );
  },
);
CombinedWave

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,
  ),
),
MagmaWave

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

References

To know how sinusoidal works: sinusoidal

Try demos to observe how sinusoidal visually works, and create your version by forming formulas.

Changelog

See the Changelog to know what was changed.

Contributions

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.

Special Thanks

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!

Nguyễn Việt Dũng GitHub avatar
GitHub 작성자

Nguyễn Việt Dũng ↗

Hà Nội, Việt Nam
언어Dart

분류

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개

  • flutter{"sdk":"flutter"}
  • equatable^1.2.5
  • flutter_test개발 의존성{"sdk":"flutter"}

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗