termina_clock 0.0.1 copy "termina_clock: ^0.0.1" to clipboard
termina_clock: ^0.0.1 copied to clipboard

Termina Clock is a Flutter package that provides a customizable clock widget inspired by the Termina clock from The Legend of Zelda - Majora's Mask

example/lib/main.dart

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

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

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

  @override
  State<MainApp> createState() => _MainAppState();
}

class _MainAppState extends State<MainApp> {
  double _sliderValue = 0;

  final GlobalKey<TerminaClockState> _terminaClockKey = GlobalKey();

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
            child: ListView(
          children: [
            TerminaClock(
              key: _terminaClockKey,
              dateTime: DateTime(2024),
              staticClock: true,
            ),
            Text(_terminaClockKey.currentState?.dateTime.toString() ?? ""),
            Slider(
              value: _sliderValue,
              min: -1 * (60 * 24),
              max: 60 * 24,
              label: _sliderValue.round().toString(),
              onChanged: (double value) {
                setState(() {
                  _sliderValue = value;
                  _terminaClockKey.currentState?.dateTime = DateTime(2024).add(Duration(minutes: _sliderValue.toInt()));
                });
              },
            ),
          ],
        )),
      ),
    );
  }
}
2
likes
150
points
16
downloads

Publisher

verified publisherkaizonaro.com

Weekly Downloads

Termina Clock is a Flutter package that provides a customizable clock widget inspired by the Termina clock from The Legend of Zelda - Majora's Mask

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on termina_clock