Search packages, repositories and app categories

GitHub repositoryaiyakuaile/flutter_shake_animated

flutter_shake_animated

a new flutter shake animated project

flutter_shake_animated project cover
Stars
3
Forks
1
Last push (UTC)
Jan 30, 2022
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

flutter_shake_animated

Pub support

Get started

shake animated

this shake effect I refer to this css open source library, CSShake

Add dependency
dependencies:
  flutter_shake_animated: ^0.0.5

Usage

For more animate effects, please refer to example/lib/main.dart file

import 'package:flutter_shake_animated/flutter_shake_animated.dart';

ShakeWidget(
    duration: duration,
    shakeConstant: shakeConstant,
    autoPlay: true,
    enableWebMouseHover: true,
    child: your widget,
)

ShakeConstant

1. ShakeDefaultConstant1,ShakeDefaultConstant2
2. ShakeHardConstant1,ShakeHardConstant2
3. ShakeSlowConstant1,ShakeSlowConstant2
4. ShakeLittleConstant1,ShakeLittleConstant2
5. ShakeHorizontalConstant1,ShakeHorizontalConstant2
6. ShakeVerticalConstant1,ShakeVerticalConstant2
7. ShakeRotateConstant1,ShakeRotateConstant2
8. ShakeCrazyConstant1,ShakeCrazyConstant2
9. ShakeOpacityConstant
10.ShakeChunkConstant

Custom shake animation


class CustomShakeAnimated implements ShakeConstant {

  @override
  Duration get duration => throw UnimplementedError();

  @override
  /// range: 0 - 100 && incremental, last value must equal 100. 
  /// when only have oneelement,represents the same interval
  List<int> get interval => throw UnimplementedError();

  @override
  /// range: 0 - 1.0, []:1.0 = [1.0]
  List<double> get opacity => throw UnimplementedError();

  @override
  /// eg: 45deg = pi / 4, []:0 = [45]: rotate 45deg
  List<double> get rotate => throw UnimplementedError();

  @override
  // Offset(double dx, double dy)
  List<Offset> get translate => throw UnimplementedError();
  
}

aiyakuaile GitHub avatar
GitHub author

aiyakuaile ↗

LanguagesDartC++CMakeHTMLCSwiftKotlinObjective-C

Packages published by this repository

Dependencies used

Dependency list 3 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}
  • flutter_lintsDevelopment^1.0.0

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

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

GitHub Docs — About repositories ↗