screen_time_api_ios 0.0.3 copy "screen_time_api_ios: ^0.0.3" to clipboard
screen_time_api_ios: ^0.0.3 copied to clipboard

PlatformiOS

A Flutter plugin for using iOS ScreenTime API

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  const MyApp({super.key});

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

class _MyAppState extends State<MyApp> {
  final _screenTimeApiIosPlugin = ScreenTimeApiIos();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            children: [
              ElevatedButton(
                onPressed: () {
                  _screenTimeApiIosPlugin.selectAppsToDiscourage();
                },
                child: const Text("selectAppsToDiscourage"),
              ),
              const SizedBox(height: 20),
              ElevatedButton(
                onPressed: () {
                  _screenTimeApiIosPlugin.encourageAll();
                },
                child: const Text("encourageAll"),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
15
likes
140
points
59
downloads

Publisher

verified publisherkboy.jp

Weekly Downloads

A Flutter plugin for using iOS ScreenTime API

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on screen_time_api_ios