FLUTTER ECOSYSTEM

MuhammadHasan-Git/animated_analog_clock

사용자 정의가 가능하고 애니메이션 효과가 있는 아날로그 시계 위젯입니다. 이 패키지는 시계 바늘의 부드러운 전환을 지원하는 완전히 사용자 정의 가능한 아날로그 시계 위젯을 제공합니다.

animated_analog_clock 프로젝트 이미지
Stars
2
Forks
2
최근 푸시(UTC)
2025. 10. 3.
프로젝트 상태
활성
MuhammadHasan GitHub avatar
GITHUB User

MuhammadHasan ↗

언어DartC++CMakeHTMLSwiftCKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개
  • flutter{"sdk":"flutter"}
  • timezone^0.10.0
  • flutter_test개발 의존성{"sdk":"flutter"}
  • flutter_lints개발 의존성^5.0.0

원본 README

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

README 펼치기 / 접기

Flutter Animated Analog Clock

pub package

A customizable and animated analog clock widget. This package provides a fully customizable analog clock widget that supports animation for smooth transitions of clock hands. Users can customize various aspects of the clock including size, colors, background, and more.

Flutter Analog Clock Screenshot  

New in Version 0.2.2

Image Dial (New Feature)

You can now use an Image Dial as the clock's face, allowing you to set a background image. This can be a network image or an asset image, making your analog clock even more visually appealing and customizable.

Example:
AnimatedAnalogClock(
  backgroundImage: NetworkImage(
    'https://cdn.pixabay.com/photo/2023/12/01/22/27/spiderman-8424632_1280.jpg',
  ),
);

Or with an asset image:

AnimatedAnalogClock(
  backgroundImage: AssetImage(
    'path/to/your/image.png',
  ),
);

Dial Options

Image (New in Version 0.2.2)
Image Dial
Numbers
Numbers Dial
Numbers and Dashes
Numbers and Dashes Dial
Roman Numerals
Roman Numerals Dial
Dashes
Dashes Dial
No Dial
Dashes Dial

Installation

In your pubspec.yaml file of your Flutter Project, add the following dependency:

dependencies:
  animated_analog_clock: ^0.2.2

Import

import 'package:animated_analog_clock/animated_analog_clock.dart';

Features

  • Customizable Design: Users can customize various aspects of the analog clock, including size, colors, background, and more, to match their app's design aesthetics.

  • Smooth Animations: The analog clock widget supports smooth animations for clock hands, providing a visually pleasing experience for users.

  • Timezone Support: The clock widget supports displaying time in different timezones, allowing users to customize the clock based on their location or preferences.

  • Timezone Support with Location Specification: Users can specify a location name, and the clock will display the time according to the timezone associated with that location. To find valid location names for timezones, check out the this documentation.

  • Lightweight and Efficient: The package is designed to be lightweight and efficient, ensuring smooth performance even on devices with limited resources.

  • DialType Enum: Introduced the DialType enum to support different dial options: dashes, numbers, numberAndDashes, and none.

Usage

Basic Usage
const AnimatedAnalogClock()
Customization Options
AnimatedAnalogClock(
          location: 'Australia/Darwin',
          // Gradient Background if you want
          // backgroundGradient: RadialGradient(colors: []),
          // Set a network image as the background
          // backgroundImage: NetworkImage(
          // 'url',
          // ),
          // Alternatively, set an asset image as the background
          // backgroundImage: AssetImage(
          //   'path/to/your/asset/image.png',
          // ),
          clock: () => DateTime.now(),
          backgroundColor: Color(0xff1E1E26),
          hourHandColor: Colors.lightBlueAccent,
          minuteHandColor: Colors.lightBlueAccent,
          secondHandColor: Colors.amber,
          centerDotColor: Colors.amber,
          hourDashColor: Colors.lightBlue,
          minuteDashColor: Colors.blueAccent,
        ),
API Documentation

For detailed information about the classes and methods available in this package, refer to the API documentation.

Example

More examples can be found in the example/ folder.

License

This package is distributed under the MIT License. See the LICENSE file for details.

Contact

For questions, feedback, or suggestions regarding this package, please feel free to contact the author at [devhasanzaman@gmail.com](mailto:devhasanzaman@gmail.com).