clock_widget 0.0.1 clock_widget: ^0.0.1 copied to clipboard
A flutter package that provides a clock widget that can be used to display the current time.
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.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
ClockWidget(
bgColor: Colors.white,
),
],
),
),
);
}
}