搜尋套件、儲存庫與 APP 分類

date_count_down 封面
套件詳情v4.0.0

date_count_down

這是一個用 Dart 編寫的 Flutter 倒數計時套件,專為 Flutter 開發人員設計。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
812
喜歡數
40
Pub 分數
140

安裝套件

flutter pub add date_count_down

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個以 Dart 寫成的 Flutter 套件,為開發者提供簡單且可自訂的倒數計時器。它允許使用者根據日期建立倒數計時,具備順暢的動畫效果,並能輕鬆整合至 Flutter 應用程式中。非常適合用於活動計時、提醒或時間限制功能。此套件支援所有主要平台,包含 Android、iOS、Web、macOS、Windows 與 Linux,讓跨平台應用更具彈性。

適用情境

  • 事件倒計時
  • 限時優惠
  • 提醒系統
  • 遊戲計時器
  • 應用中的倒計時組件

主要特色

  • 基於日期的倒數計時
  • 跨平台支援
  • 可自訂的 UI
  • 流暢的動畫
  • 與 Flutter 的輕鬆整合

適合對象

  • Flutter 開發者
  • 事件應用
  • 電子商務計時器
  • 教育類應用
  • 遊戲化體驗

使用建議

  • 需要有效的日期輸入
  • 僅限時間持續
  • 無時區處理
  • 不適用於長期背景計時器
  • UI 自訂需要額外的程式碼

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

flutter_countDown

A new Flutter package that provide already made Count down functionality Screenshoot

Usage

[Example] (https://github.com/Destiny-Ed/date_count_down/blob/main/example/example.dart)

To use this package : *add the dependency to your [pubspec.yaml] file

   dependencies:
        flutter:
            sdk : flutter
        date_count_down:

Add to your dart file


import 'package:date_count_down/date_count_down.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key? key, required this.title}) : super(key: key);

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'Countdown Timer:',
            ),
            CountDownText(
              due: DateTime.utc(2050),
              finishedText: "Done",
              showLabel: true,
              longDateName: true,
              style: TextStyle(color: Colors.blue),
            ),
            Text(
              'Countdown Timer with custom label:',
            ),
            CountDownText(
              due: DateTime.parse("2050-01-01 00:00:00"),
              finishedText: "Done",
              showLabel: true,
              longDateName: true,
              daysTextLong: " DAYS ",
              hoursTextLong: " HOURS ",
              minutesTextLong: " MINUTES ",
              secondsTextLong: " SECONDS ",
              style: TextStyle(color: Colors.blue),
            )
          ],
        ),
      ),
    );
  }
}


Acknowledgement

Special thanks to ekhiw to adding the custom values to the package

Follow me

[Github] (https://github.com/Destiny-Ed)

[Twitter] (https://twitter.com/DestinyEd8)

[Linkedin] (linkedin.com/in/destiny-ed)

[Youtube] (https://www.youtube.com/channel/UCFEtn_pdpZPT9vMxovgTp0A)

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。