furkantektas / analog_clock Goto Github PK
View Code? Open in Web Editor NEW⌚️Analog Clock widget for Flutter ⏰
License: MIT License
⌚️Analog Clock widget for Flutter ⏰
License: MIT License
This is still a problem.
Repository (Github)
and View/report issues
. These two links go to https://github.com/furkantektas/timeline_list instead of this repo.The plugin analog_clock
uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
Is it possible to show all hour numbers on the clock face?
showNumbers currently only shows 12/3/6/9
Currently secondHand (seconds hand) ticks on every second - it would be nice to see option to make it's transition smooth and seamless.
I have a static clock (isLive: false) that displays a time. Then, as a result of user action, it has to display a different time.
This does not work. Instead of displaying the second time, the AnalogClock widget starts displaying the current system time.
Minimal example to demonstrate the problem:
import 'package:analog_clock/analog_clock.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
DateTime time = DateTime(2022, 1, 1, 12, 30, 0);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: AnalogClock(
isLive: false,
datetime: time,
),
),
floatingActionButton: FloatingActionButton(
onPressed: () => setState(() => {
time = time.add(const Duration(minutes: 15))
}),
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
When tapping the (+) button, the clock should show 12:45. Instead it shows the current time.
this package doesn't support kotlin 1.3.0 gradle builds in flutter
I commented the "void main() => runApp(MyApp());" line and uncommented the "void main() => runDemo();" line and built the project on andriod
The app is displaying nothing but a white screen!
When changing the DateTime that is passed into the AnalogClock Widget based on some event the clock isn't updating on the device. Having taken a look at the code, I believe this is because you haven't overridden the didUpdateWidget method in the _AnalogClockState class.
I believe you need a method like
@override
void didUpdateWidget(AnalogClock oldWidget) {
super.didUpdateWidget(oldWidget);
if(!widget.isLive && widget.datetime != oldWidget.datetime) {
datetime = widget.datetime;
}
}
Widget build(BuildContext context) {
//DateTime d = DateTime.now();
DateTime d = DateTime(2020,4,1,1,15,15,15,123);
return Column(
children: <Widget>[
AnalogClock(
datetime: d,
isLive: true,
),
],
);
...
I used another datetime either fetching from server or creating any DateTime the clock don't run
Have you ever seen ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.