パッケージ、リポジトリ、アプリカテゴリを検索

flutter_analog_clock のカバー
パッケージ詳細v1.0.3

flutter_analog_clock

シンプルで高度にカスタマイズ可能なアナログ時計ウィジェットです。このウィジェットを使用すると、時計の背景、ダイヤル、目盛り、針をカスタマイズできます。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
4070
いいね数
68
Pub ポイント
150

パッケージをインストール

flutter pub add flutter_analog_clock

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Flutterアプリケーション向けのシンプルで高カスタマイズ可能なアナログ時計ウィジェットです。背景、ダイヤルデザイン、目盛り、ハンドスタイルをカスタマイズすることで、時計の外観を自由に調整できます。クラシックな時間表示を必要とするアプリに最適です。Android、iOS、Web、macOS、Windows、Linuxなど、すべての主要プラットフォームをサポートしており、デバイス間で一貫したパフォーマンスを実現します。クリーンなコードと直感的な設定オプションにより、視覚的に魅力的なアナログ時計を任意のプロジェクトに簡単に統合できます。

用途

  • ダッシュボードアプリでリアルタイムの時間を表示する
  • UIにレトロまたはクラシックな美学を加える
  • タイムトラッキングまたは瞑想アプリの作成
  • ホーム画面ウィジェットへの統合
  • 伝統的なスタイルのデジタル時計のデザイン

主な機能

  • 完全にカスタマイズ可能な背景とダイヤル
  • カスタマイズ可能な手のスタイルと色
  • 複数のプラットフォームターゲットのサポート
  • pub.dev を通じた簡単な統合
  • 画面サイズに応じたレスポンシブデザイン

適している対象

  • タイムベースのアプリを開発する開発者
  • 洗練された時計コンポーネントを求めるUIデザイナー
  • クロスプラットフォームの整合性を必要とするプロジェクト
  • ミニマリストまたはヴィンテージテーマのアプリ
  • インタラクティブな時計インターフェースのプロトタイピング

注意事項

  • ダークモードとの互換性のために追加のスタイル設定が必要になる場合があります
  • 高リフレッシュレートアニメーションにおけるパフォーマンスへの影響
  • 制限された組み込みタイムゾーンサポート
  • カスタマイズはバンドルサイズをわずかに増加させる可能性があります
  • 手のアニメーションの滑らかさはデバイスの能力に依存します

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Flutter Analog Clock

pub package

A simple, highly customizable analog clock widget. This widget enables you to customize the clock's background, dial, markings, and hands.

Install

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

dependencies:
  flutter_analog_clock: ^1.0.3

In your library add the following import:

import 'package:flutter_analog_clock/flutter_analog_clock.dart';

Usage

1. Simple to use

  const AnalogClock()
  const AnalogClock.dark()
2. Use an image as a clock face

  Container(
    decoration: const BoxDecoration(
      image: DecorationImage(image: AssetImage('assets/dial01.webp')),
    ),
    child: const AnalogClock(
      dialColor: null,
      markingColor: null,
      hourNumberColor: null,
      secondHandColor: null,
    ),
  ),
3. With a child

  AnalogClock(
    dateTime: DateTime(2022, 10, 24, 10, 12, 07),
    isKeepTime: false,
    child: const Align(
      alignment: FractionalOffset(0.5, 0.75),
      child: Text('GMT-8'),
    ),
  ),
4. Customize to use
  AnalogClock(
    dateTime: DateTime.now(),
    isKeepTime: true,
    dialColor: Colors.white,
    dialBorderColor: Colors.black,
    dialBorderWidthFactor: 0.02,
    markingColor: Colors.black,
    markingRadiusFactor: 1.0,
    markingWidthFactor: 1.0,
    hourNumberColor: Colors.black,
    hourNumbers: const ['', '', '3', '', '', '6', '', '', '9', '', '', '12'],
    hourNumberSizeFactor: 1.0,
    hourNumberRadiusFactor: 1.0,
    hourHandColor: Colors.black,
    hourHandWidthFactor: 1.0,
    hourHandLengthFactor: 1.0,
    minuteHandColor: Colors.black,
    minuteHandWidthFactor: 1.0,
    minuteHandLengthFactor: 1.0,
    secondHandColor: Colors.black,
    secondHandWidthFactor: 1.0,
    secondHandLengthFactor: 1.0,
    centerPointColor: Colors.black,
    centerPointWidthFactor: 1.0,
  )
5. Specify a time
class ExampleSpecifyTime extends StatefulWidget {
  const ExampleSpecifyTime({Key? key}) : super(key: key);

  @override
  State<ExampleSpecifyTime> createState() => _ExampleSpecifyTimeState();
}

class _ExampleSpecifyTimeState extends State<ExampleSpecifyTime> {
  final GlobalKey<AnalogClockState> _analogClockKey = GlobalKey();
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Analog clock'),
      ),
      body: AnalogClock(
        key: _analogClockKey,
        dateTime: DateTime(2022, 10, 24, 1, 23, 45),
        isKeepTime: false,
      ),
      persistentFooterButtons: [
        ElevatedButton(
          onPressed: () {
            _analogClockKey.currentState!.dateTime = DateTime.now();
          },
          child: const Text('Now'),
        ),
        ElevatedButton(
          onPressed: () {
            _analogClockKey.currentState!.isKeepTime = true;
          },
          child: const Text('Keep time'),
        ),
      ],
    );
  }
}

You can find all custom options here:

https://github.com/conghaonet/flutter_analog_clock/blob/master/example/lib/example.dart

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。