screen_time_api_ios 0.0.4 copy "screen_time_api_ios: ^0.0.4" to clipboard
screen_time_api_ios: ^0.0.4 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"),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
11
likes
120
pub points
69%
popularity

Publisher

verified publisherkboy.jp

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