पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

custom_timer कवर
पैकेज विवरणv0.2.3

custom_timer

एक फ्लटर पैकेज जो कंट्रोलर के साथ कस्टमाइज़ेबल टाइमर बनाने की अनुमति देता है।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
1.1 हज़ार
लाइक
147
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add custom_timer

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

एक फ्लटर पैकेज जो विकासकर्ताओं को बिल्ट-इन कंट्रोलर कार्यक्षमता के साथ अत्यधिक कस्टमाइज़ेबल टाइमर बनाने की अनुमति देता है। यह रियल-टाइम अपडेट, सटीक समय नियंत्रण और कई प्लेटफॉर्मों पर फ्लटर ऐप्स में बिना किसी दिक्कत के एकीकरण का समर्थन करता है। टाइमर को एक विशेष कंट्रोलर के माध्यम से रोका, जारी रखा, रीसेट किया और मॉनिटर किया जा सकता है, जिससे यह डाउनकाउंट, स्टॉपवॉच फीचर या किसी भी समय-आधारित UI कंपोनेंट के लिए आदर्श है। लचीलापन और उपयोग में आसानी के लिए डिज़ाइन किया गया है, यह Android, iOS, Web, macOS, Windows और Linux पर काम करता है।

उपयोग

  • काउंटडाउन टाइमर
  • स्टॉपवॉच एप्लिकेशन
  • समय सीमित उपयोगकर्ता इंटरैक्शन
  • रियल-टाइम प्रगति ट्रैकिंग
  • इंटरैक्टिव लर्निंग ऐप्स
  • गेम टाइमर

मुख्य विशेषताएँ

  • कस्टमाइज़ किए गए टाइमर अवधि
  • राज्य प्रबंधन के लिए निर्मित नियंत्रक
  • रोकें, जारी रखें और पुनः स्थापित करें कार्यक्षमता
  • क्रॉस-प्लेटफॉर्म संगतता
  • वास्तविक समय के कॉलबैक इवेंट्स
  • Flutter विजेट्स के साथ आसान एकीकरण

इनके लिए उपयुक्त

  • समय-संवेदनशील फीचर बना रहे डेवलपर्स
  • सटीक समय नियंत्रण की आवश्यकता वाले ऐप्स
  • शैक्षिक या उत्पादकता टूल
  • गेमिफाइड एप्लिकेशन्स
  • गतिशील समय प्रदर्शन की आवश्यकता वाले UI घटक

विचार योग्य बातें

  • टाइमर जीवनचक्र के हस्तकलन की आवश्यकता होती है
  • जटिल योजना के लिए अतिरिक्त तर्क की आवश्यकता हो सकती है
  • सामान्य उपयोग के बाहर उच्च-आवृत्ति अद्यतन के लिए अनअनुकूलित
  • सीमित निर्मित शैली विकल्प (कस्टम विजेट संयोजन की आवश्यकता होती है)

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Custom Timer ⌛

A Flutter package to create a customizable timer.


🎉 Features

  • Timer controller.
  • Auto count up / down timer.
  • Custom builder.
  • Millisecond support.

📌 Usage


example1


Add SingleTickerProviderStateMixin to your stateful widget. 👇

class _MyAppState extends State<MyApp> with SingleTickerProviderStateMixin {

Then define a CustomTimer controller

late CustomTimerController _controller = CustomTimerController(
  vsync: this,
  begin: Duration(hours: 24),
  end: Duration(),
  initialState: CustomTimerState.reset,
  interval: CustomTimerInterval.milliseconds
);

And you are ready to use the timer:

CustomTimer(
  controller: _controller,
  builder: (state, time) {
    // Build the widget you want!🎉
    return Text(
      "${time.hours}:${time.minutes}:${time.seconds}.${time.milliseconds}",
      style: TextStyle(fontSize: 24.0)
    );
  }
)

Now you can use the controller methods:

_controller.reset();
_controller.start();
_controller.pause();
_controller.finish();

_controller.add(Duration(minutes: 30));
_controller.subtract(Duration(minutes: 30));
_controller.jumpTo(Duration(hours: 12));

You can also set the begin or end, even with the counter running:

_controller.begin = Duration();
_controller.end = Duration(hours 12);

And add listeners to state changes or just use the properties when you need them:

_controller.state.addListener(() {
  print(_controller.state.value); // 👉 CustomTimerState.paused
  print(_controller.remaining.value.hours); // 👉 12h
});

Remember to dispose when you are no longer using it.


🔧 Installation

Add this to your package's pubspec.yaml file:

dependencies:
  custom_timer: ^0.2.3

Install it:

$ flutter pub get

Import the package in your project:

import 'package:custom_timer/custom_timer.dart';

🙇 Author


Hi there 👋 This package is in development so if you find a bug or have a suggestion please let me know so we can improve it! 😃 If you want to motivate me to continue, you can give me a cup of coffee ☕ and I will get a lot of energy out of it.


Buy Me A Coffee

श्रेणियाँ

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट