패키지, 저장소 및 앱 카테고리 검색

flutter_alarm_clock 표지
패키지 상세v0.1.2

flutter_alarm_clock

Android 시계 앱 인텐트를 연결하는 가벼운 플러터 패키지입니다.

Android
30일 다운로드
171
좋아요
79
Pub 점수
160

패키지 설치

flutter pub add flutter_alarm_clock

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

의도를 통해 Android 시스템의 시계 앱과의 통합을 가능하게 하는 가벼운 Flutter 패키지입니다. Flutter 애플리케이션에서 Android 기기의 네이티브 알람 기능을 트리거하거나 상호작용할 수 있게 하여 앱 내에서 원활한 알람 관리를 가능하게 합니다. Android 전용으로 설계되어 복잡한 네이티브 코드 없이 플랫폼 특화 기능을 활용합니다. 생산성, 웰빙 또는 알림 기반 애플리케이션에 적합하며, 디바이스의 알람 시스템에 직접 접근이 필요한 경우에 이상적입니다.

사용 사례

  • 내장 알람을 통한 예약 알림
  • 웰니스 앱에 알람 기능 통합하기
  • Flutter 앱 내에서 알람 트리거하기
  • 알람 지원이 있는 작업 또는 습관 추적 앱 만들기
  • 시간 기반 알림 사용

주요 기능

  • 간단한 의도 기반 통합
  • 경량이며 최소한의 종속성
  • Android 전용 플랫폼 지원
  • 시스템 알림 기능에 대한 직접 액세스
  • 백그라운드 서비스 필요 없음

적합한 대상

  • Android 중심의 알림 앱을 개발하는 개발자
  • 네이티브 알람 상호작용을 필요로 하는 앱
  • 시스템 기능과의 가벼운 통합
  • Android 기기 전용 플러터 프로젝트
  • 알람 트리거를 위한 최소 설정을 원하는 사용자

고려 사항

  • 안드로이드 플랫폼에 한정
  • Android 시스템 권한이 필요합니다
  • 기기별 시계 앱의 사용 가능 여부에 따라 달라집니다
  • 모든 Android 버전에서 일관되게 작동하지 않을 수 있습니다
  • iOS 지원 없음

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Android Alarm Clock Plugin for Flutter

pub package

This plugin allows Flutter apps to operate with the default clock application when the platform is Android. Provides a lightweight wrapper around clock app intents. It uses Android intents to communicate with the default clock app.

Currently supported features

  • Create new Alarms
  • Create new Timers
  • Open default Clock app showing Alarms
  • Open default Clock app showing Timers

Usage

Create an Alarm

Create a new alarm. Function arguments:
'hour' specifies alarm hour
'minutes' specifies alarm minutes
'title' specifies alarm title - optional
'skipUi' specifies whether clock app should open or not - optional

// Creates an alarm at 23:59
FlutterAlarmClock.createAlarm(hour: 23, minutes: 59);
Create a Timer

Create a new timer. Function arguments:
'length' specifies timer length in seconds
'title' specifies timer title - optional
'skipUi' specifies whether clock app should open or not - optional

// Creates a timer for 42 seconds
FlutterAlarmClock.createTimer(length: 42);
Show Alarms

Opens default clock app showing alarms.

FlutterAlarmClock.showAlarms();
Show Timers

Opens default clock app showing timers.

FlutterAlarmClock.showTimers();

Feel free to add support for additional functionality.

Note that a similar method does not currently exist for iOS.

Platform Support

Android
✔️

Example App

Screenshot
screenshot
Code
import 'package:flutter/material.dart';
import 'package:flutter_alarm_clock/flutter_alarm_clock.dart';

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

/// {@template myApp}
/// A main class for the Flutter alarm clock example application.
/// {@endtemplate}
class MyApp extends StatefulWidget {
  /// @{@macro myApp}
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Flutter alarm clock example'),
        ),
        body: Center(
          child: Column(
            children: <Widget>[
              Container(
                margin: const EdgeInsets.all(25),
                child: TextButton(
                  child: const Text(
                    'Create alarm at 23:59',
                    style: TextStyle(fontSize: 20),
                  ),
                  onPressed: () {
                    FlutterAlarmClock.createAlarm(hour: 23, minutes: 59);
                  },
                ),
              ),
              Container(
                margin: const EdgeInsets.all(25),
                child: const TextButton(
                  onPressed: FlutterAlarmClock.showAlarms,
                  child: Text(
                    'Show alarms',
                    style: TextStyle(fontSize: 20),
                  ),
                ),
              ),
              Container(
                margin: const EdgeInsets.all(25),
                child: TextButton(
                  child: const Text(
                    'Create timer for 42 seconds',
                    style: TextStyle(fontSize: 20),
                  ),
                  onPressed: () {
                    FlutterAlarmClock.createTimer(length: 42);
                  },
                ),
              ),
              Container(
                margin: const EdgeInsets.all(25),
                child: const TextButton(
                  onPressed: FlutterAlarmClock.showTimers,
                  child: Text(
                    'Show Timers',
                    style: TextStyle(fontSize: 20),
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.