FLUTTER ECOSYSTEM

the-d-velopers/animated_book_widget

the-d-velopers/animated_book_widget open-source repository details.

animated_book_widget 프로젝트 이미지
Stars
36
Forks
13
최근 푸시(UTC)
2024. 4. 25.
프로젝트 상태
활성
d-velopers GitHub avatar
GITHUB Organization

d-velopers ↗

언어DartC++CMakeHTMLSwiftCKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개

원본 README

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

README 펼치기 / 접기

banner

Flutter Animated Book Widget

build animated_book_widget

A Flutter package allows you to effortlessly create a animated book widget UI with dynamic content rendering.

Preview

https://github.com/the-d-velopers/animated_book_widget/blob/main/screenshots/animated_book_widget.gif?raw=true https://github.com/the-d-velopers/animated_book_widget/blob/main/screenshots/animated_book_widget1.gif?raw=true

Installation

Add animated_book_widget to your pubspec.yaml dependencies. And import it:

dependencies:
    animated_book_widget: <latest_version>

Import:

import 'package:animated_book_widget/animated_book_widget.dart';

How to use

AnimatedBookWidget(
  cover: _Cover,
  content: _Content,
  size: const Size.fromWidth(160),
);

Params

AnimatedBookWidget(
  cover: _Cover,
  content: _Content,
  size: const Size.fromWidth(160),
  padding: const EdgeInsets.only(right: 10),
  blurRadius: 8,
  spreadRadius: .1,
  backgroundBlurOffset: Offset.zero,
  backgroundColor: color.withOpacity(.5),
  backgroundShadowColor: color.withOpacity(.075),
  curve: Curves.linear,
  animationDuration: Duration(milliseconds: 500),
  reverseAnimationDuration: Duration(milliseconds: 500),
);

Builder

AnimatedBookWidget.builder(
  cover: _Cover,
  size: Size(200, 300),
  contentChild: _Content,
  contentBuilder: (context, animation, child) {
    return Transform(
      transform: Matrix4.identity()
        ..setEntry(3, 2, 0.001)
        ..rotateY(animation.value),
      alignment: Alignment.center,
      child: child,
    );
  },
);

Examples

Check out the example app in the example directory or the 'Example' tab on pub.dartlang.org for a more complete example.

Credit

  • This package's book animation is inspired from this Dribbble art.

Main Contributors

https://avatars.githubusercontent.com/u/30538983?s=100
Brayan Cantos
https://avatars.githubusercontent.com/u/4898256?s=100
diegoveloper
https://avatars.githubusercontent.com/u/155333596?s=100
ecarlosdev
https://avatars.githubusercontent.com/u/74924269?s=100
Roger Bacab
https://avatars.githubusercontent.com/u/70081671?s=100
Paolo Joaquin Pinto
https://avatars.githubusercontent.com/u/32662133?s=100
Daniel Coyula
https://avatars.githubusercontent.com/u/45320786?s=100
Williams M. Torres

Awesome Mobile Libraries

License

MIT License

Copyright (c) 2024 D-velopers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.