clock_widget 0.0.4 copy "clock_widget: ^0.0.4" to clipboard
clock_widget: ^0.0.4 copied to clipboard

A flutter package that displays a clock widget with real time, available in both analog and digital types.

example/lib/main.dart

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

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

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Custom Top Snackbar Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const ExamplePage(),
    );
  }
}

class ExamplePage extends StatelessWidget {
  const ExamplePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Clock Widget Example'),
      ),
      body: const Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.start,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            ClockWidget(
              clockType: ClockType.analog,
              bgColor: Colors.white,
            ),
            SizedBox(height: 20),
            ClockWidget(
              clockType: ClockType.digital,
              bgColor: Colors.white,
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
160
pub points
42%
popularity

Publisher

verified publisheradarsh7.dev

A flutter package that displays a clock widget with real time, available in both analog and digital types.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, intl

More

Packages that depend on clock_widget