Code Monkey home page Code Monkey logo

analog_clock's People

Contributors

furkantektas avatar kaeganclark avatar pidwid avatar walles avatar yehudakremer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

analog_clock's Issues

The plugin `analog_clock` uses a deprecated version of the Android embedding.

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.

Show all numbers

Is it possible to show all hour numbers on the clock face?
showNumbers currently only shows 12/3/6/9

Changing the displayed time is not working

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.

demo.dart is not working

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!

DateTime Property - No Change

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;
    }
  }

Clock don't run when using datetime param is not current time

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 ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.