FLUTTER ECOSYSTEM

Kurogoma4D/animated_neumorphic

임플리시트 애니메이션을 갖춘 뉴모포지즘 디자인 컨테이너를 구현하는 플러터 패키지입니다.

animated_neumorphic 프로젝트 이미지
Stars
5
Forks
0
최근 푸시(UTC)
2021. 3. 4.
프로젝트 상태
활성
Kurogoma4D GitHub avatar
언어DartKotlinSwiftObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

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

README 펼치기 / 접기

animated_neumorphic

A Flutter package that contains Neumorphismic theme Container.

https://user-images.githubusercontent.com/13596653/74630027-ff686080-519c-11ea-80bc-a88d38446476.gif

Getting Started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  ...
  animated_neumorphic: "^0.1.0"

In your library add the following import:

import 'package:animated_neumorphic/animated_neumorphic.dart';

For help getting started with Flutter, view the online documentation.

Usage

For simple button:

class NeumorphicButton extends StatefulWidget {
  final bool isActive;

  const NeumorphicButton({Key key, this.isActive}) : super(key: key);

  @override
  _NeumorphicButtonState createState() => _NeumorphicButtonState();
}

class _NeumorphicButtonState extends State<NeumorphicButton> {
  bool _isActive = false;

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () {
        setState(() {
          _isActive = !_isActive;
        });
      },
      child: AnimatedNeumorphicContainer(
        depth: _isActive ? 0.0 : 1.0,
        color: Color(0xFFF2F2F2),
        width: 60,
        height: 60,
        radius: 16,
        child: Icon(Icons.access_time),
      ),
    );
  }
}

Changelog

Please see the Changelog page to know what's recently 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 fill an issue.
If you fixed a bug or implemented a feature, please send a pull request.