Giter VIP home page Giter VIP logo

duration_picker's People

Contributors

gdelataillade avatar gizmomogwai avatar juliansteenbakker avatar lhartman1 avatar nevinchanyi-vladyslav avatar philip-brink 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

Watchers

 avatar  avatar  avatar  avatar

duration_picker's Issues

Default color scheme not in line with date and time pickers

I love this component; thank you for taking over maintenance from the original author.

The color scheme uses the secondary color for the selection dial, while the Material date and time pickers use the primary color.

Please align the default (=dialog) version with the colours used in the Material widgets, so they look alike.

Ability to pick days

It would be really great if we also had the ability to switch the picker from a hours & minutes mode to a days & hours mode.

Duration picker rotation issue

I am facing an issue with the duration picker rotation. While the duration picker placed in a scroll view , the duration picker scroll not working flutter.

flutter_lints 2.0.1 not compatible

Because duration_picker 1.1.0+1 depends on flutter_lints ^1.0.4 and no versions of duration_picker match >1.1.0+1 <2.0.0, duration_picker ^1.1.0+1 requires flutter_lints ^1.0.4.
So, because app depends on both duration_picker ^1.1.0+1 and flutter_lints ^2.0.1, version solving failed.
pub get failed (1; So, because app depends on both duration_picker ^1.1.0+1 and flutter_lints ^2.0.1, version solving failed.)

This Package not support flutter version 3.22.0

Launching lib\main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...
../../AppData/Local/Pub/Cache/hosted/pub.dev/device_preview-1.1.0/lib/src/views/tool_panel/sections/section.dart:39:40: Error: The getter 'subtitle' isn't defined for the class 'TextTheme'.

  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle'.
    style: theme.textTheme.subtitle?.copyWith(
    ^^^^^^^^
    ../../AppData/Local/Pub/Cache/hosted/pub.dev/device_preview-1.1.0/lib/src/views/tool_panel/sections/settings.dart:56:34: Error: The getter 'backgroundColor' isn't defined for the class 'ThemeData'.
  • 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../flutter/packages/flutter/lib/src/material/theme_data.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'backgroundColor'.
    color: toolbar.backgroundColor,
    ^^^^^^^^^^^^^^^
    ../../AppData/Local/Pub/Cache/hosted/pub.dev/device_preview-1.1.0/lib/src/views/tool_panel/sections/settings.dart:87:34: Error: The getter 'backgroundColor' isn't defined for the class 'ThemeData'.
  • 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../flutter/packages/flutter/lib/src/material/theme_data.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'backgroundColor'.
    color: toolbar.backgroundColor,
    ^^^^^^^^^^^^^^^
    ../../AppData/Local/Pub/Cache/hosted/pub.dev/device_preview-1.1.0/lib/src/views/theme.dart:31:11: Error: No named parameter with the name 'toggleableActiveColor'.
    toggleableActiveColor: accentColor,
    ^^^^^^^^^^^^^^^^^^^^^
    ../../AppData/Local/Pub/Cache/hosted/pub.dev/device_preview-1.1.0/lib/src/views/theme.dart:54:11: Error: No named parameter with the name 'toggleableActiveColor'.
    toggleableActiveColor: accentColor,
    ^^^^^^^^^^^^^^^^^^^^^
    ../../AppData/Local/Pub/Cache/hosted/pub.dev/device_preview-1.1.0/lib/src/views/tool_panel/tool_panel.dart:83:34: Error: The getter 'headline6' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline6'.
    style: theme.textTheme.headline6?.copyWith(
    ^^^^^^^^^
    ../../AppData/Local/Pub/Cache/hosted/pub.dev/device_preview-1.1.0/lib/src/views/tool_panel/sections/subsections/device_model.dart:175:32: Error: The getter 'subtitle2' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle2'.
    style: theme.textTheme.subtitle2?.copyWith(
    ^^^^^^^^^
    ../../AppData/Local/Pub/Cache/hosted/pub.dev/duration_picker-1.1.1/lib/duration_picker.dart:132:14: Error: The getter 'headline2' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline2'.
    .headline2!
    ^^^^^^^^^
    ../../AppData/Local/Pub/Cache/hosted/pub.dev/duration_picker-1.1.1/lib/duration_picker.dart:147:44: Error: The getter 'bodyText2' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText2'.
    style: Theme.of(context).textTheme.bodyText2,
    ^^^^^^^^^
    ../../AppData/Local/Pub/Cache/hosted/pub.dev/duration_picker-1.1.1/lib/duration_picker.dart:546:29: Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'.
  • 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../flutter/packages/flutter/lib/src/material/text_theme.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle1'.
    final style = textTheme.subtitle1;
    ^^^^^^^^^
    ../../AppData/Local/Pub/Cache/hosted/pub.dev/duration_picker-1.1.1/lib/duration_picker.dart:606:37: Error: The getter 'backgroundColor' isn't defined for the class 'ThemeData'.
  • 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('../../flutter/packages/flutter/lib/src/material/theme_data.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'backgroundColor'.
    backgroundColor = themeData.backgroundColor;
    ^^^^^^^^^^^^^^^
    Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'C:\Users\gokul.p\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 19s
Error: Gradle task assembleDebug failed with exit code 1

Floating Point Error Resulting in Incorrect Minutes Displayed

There seems to be a floating point error when the duration provided to DurationPicker's constructor is converted to a double (_turningAngle) and then back to an integer (_minuteHand(double angle)).

This can be reproduced by supplying Duration(minutes: 1) to DurationPicker's constructor and it results in 0 minutes being displayed in the widget. Also, Duration(minutes: 4) results in 3 minutes being displayed.

Won't build with Flutter 3.22.0

When building:

../../.pub-cache/hosted/pub.dev/duration_picker-1.1.1/lib/duration_picker.dart:132:14: Error: The getter 'headline2' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/opt/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'headline2'.
            .headline2!
             ^^^^^^^^^
../../.pub-cache/hosted/pub.dev/duration_picker-1.1.1/lib/duration_picker.dart:147:44: Error: The getter 'bodyText2' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/opt/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText2'.
        style: Theme.of(context).textTheme.bodyText2,
                                           ^^^^^^^^^
../../.pub-cache/hosted/pub.dev/duration_picker-1.1.1/lib/duration_picker.dart:546:29: Error: The getter 'subtitle1' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/opt/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'subtitle1'.
    final style = textTheme.subtitle1;
                            ^^^^^^^^^
../../.pub-cache/hosted/pub.dev/duration_picker-1.1.1/lib/duration_picker.dart:606:37: Error: The getter 'backgroundColor' isn't defined for the class 'ThemeData'.
 - 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('/opt/flutter/packages/flutter/lib/src/material/theme_data.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'backgroundColor'.
        backgroundColor = themeData.backgroundColor;
                                    ^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception

Limited Duration

Something like , i can choose only duration between 0-25 min

like this

DurationPicker(
                duration: Duration(hours: 0, minutes: 2),
                onChange: (val) { },
                maxDuration:Duration(hours: 0, minutes: 20)
              )

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.