juliansteenbakker / duration_picker Goto Github PK
View Code? Open in Web Editor NEWA library for a duration picker in Flutter.
License: MIT License
A library for a duration picker in Flutter.
License: MIT License
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.
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.
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.
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.)
Hello, your widget is useful. I hope it can achieve value when I click the clock. Thank you very much~
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'.
FAILURE: Build failed with an exception.
Process 'command 'C:\Users\gokul.p\flutter\bin\flutter.bat'' finished with non-zero exit value 1
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
I was hoping to be able to pass some Text to the dialog containing the duration picker to display the reason for the dialog appearing. Would this be a simple request?
please expose color parameters
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.
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
If I initialize the dial with a initial duration != 0, the proper value is shown in text, but the knob stays on 0.
affected version: 1.1.1
Please update email_launcher with new flutter SDK
published 3yrs ago https://pub.dev/packages/email_launcher
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)
)
Hey @juliansteenbakker I have noticed that snapToMins does not work, when would you be able to fix that one? Thanks!
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.