Skip to content

Commit c757ac4

Browse files
committed
Merge branch 'master' of https://github.com/matthewfx/sleek_circular_slider into nero
2 parents 3343b5e + d2b3409 commit c757ac4

19 files changed

+416
-454
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,13 @@
3131
## [1.1.0] - 2020-03-12
3232
* Added the spinner mode.
3333
* Added the clockwise direction.
34-
* Fixed a bug - an unhandled exception when the min and max values were equal.
34+
* Fixed a bug - an unhandled exception when the min and max values were equal.
35+
36+
## [1.2.0+web] - 2020-10-2020
37+
* Fixed some small issues
38+
* Implemented the animation duration multiplier
39+
* Implemented the dynamic gradient
40+
* Implemented the gradient for the track
41+
42+
## [2.0.0] - 2021-03-21
43+
* Added the null-safety

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ final slider = SleekCircularSlider(
133133
| **animationEnabled** *bool* | true | The setting indicating whether external changes of a slider value should be animated. |
134134
| **spinnerMode** *bool* | false | The setting turning the widget into a spinner. |
135135
| **spinnerDuration** *int* | 1500 | The spinner animation duration in miliseconds |
136+
| **animDurationMultiplier** *double* | 1.0 | The multiplier of duration for the animation when value changed |
136137

137138

138139

@@ -151,10 +152,14 @@ final slider = SleekCircularSlider(
151152
| Parameter | Default | Description |
152153
| :------------------------ | :-------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------- |
153154
| **trackColor** *Color* | #DCBEFB | The color of the slider's track. |
155+
| **trackColors** *List<Color>* | null | The list of colors for the track's gradient. |
156+
| **trackGradientStartAngle** *double* | 0 | The start angle for the track's gradient. |
157+
| **trackGradientEndAngle** *double* | 180 | The end angle for the track's gradient. |
154158
| **progressBarColor** *Color* | | The color of the slider's progress bar. Won't be used if the slider uses gradient **progressBarColors != null** |
155159
| **progressBarColors** *List<Color>* | [#1E003B, #EC008A, #6285DA] | The list of colors for the progress bar's gradient. |
156160
| **gradientStartAngle** *double* | 0 | The start angle for the progress bar's gradient. |
157161
| **gradientEndAngle** *double* | 180 | The end angle for the progress bar's gradient. |
162+
| **dynamicGradient** *bool* | false | The gradient angles will change dynamically with value changing. If true it will ignore both the grandientStartAngle and gradientEndAngle |
158163
| **dotColor** *Color* | #FFFFFF | The color of the slider's handle. |
159164
| **hideShadow** *bool* | false | The setting indicating whether the shadow should be showed. |
160165
| **shadowColor** *Color* | #2C57C0 | The color of the shadow. |

example/ios/Flutter/.last_build_id

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
573b985eed3c99c58c21fa11756b3c6f

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12-
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13-
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1412
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15-
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16-
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1713
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
1814
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1915
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
@@ -27,8 +23,6 @@
2723
dstPath = "";
2824
dstSubfolderSpec = 10;
2925
files = (
30-
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
31-
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
3226
);
3327
name = "Embed Frameworks";
3428
runOnlyForDeploymentPostprocessing = 0;
@@ -39,13 +33,11 @@
3933
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
4034
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
4135
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
42-
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
4336
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
4437
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4538
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
4639
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
4740
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
48-
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
4941
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
5042
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
5143
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -58,8 +50,6 @@
5850
isa = PBXFrameworksBuildPhase;
5951
buildActionMask = 2147483647;
6052
files = (
61-
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
62-
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
6353
);
6454
runOnlyForDeploymentPostprocessing = 0;
6555
};
@@ -69,9 +59,7 @@
6959
9740EEB11CF90186004384FC /* Flutter */ = {
7060
isa = PBXGroup;
7161
children = (
72-
3B80C3931E831B6300D905FE /* App.framework */,
7362
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
74-
9740EEBA1CF902C7004384FC /* Flutter.framework */,
7563
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7664
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
7765
9740EEB31CF90195004384FC /* Generated.xcconfig */,
@@ -204,7 +192,7 @@
204192
);
205193
runOnlyForDeploymentPostprocessing = 0;
206194
shellPath = /bin/sh;
207-
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
195+
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
208196
};
209197
9740EEB61CF901F6004384FC /* Run Script */ = {
210198
isa = PBXShellScriptBuildPhase;
@@ -256,7 +244,6 @@
256244
/* Begin XCBuildConfiguration section */
257245
249021D3217E4FDB00AE95B9 /* Profile */ = {
258246
isa = XCBuildConfiguration;
259-
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
260247
buildSettings = {
261248
ALWAYS_SEARCH_USER_PATHS = NO;
262249
CLANG_ANALYZER_NONNULL = YES;
@@ -333,7 +320,6 @@
333320
};
334321
97C147031CF9000F007C117D /* Debug */ = {
335322
isa = XCBuildConfiguration;
336-
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
337323
buildSettings = {
338324
ALWAYS_SEARCH_USER_PATHS = NO;
339325
CLANG_ANALYZER_NONNULL = YES;
@@ -389,7 +375,6 @@
389375
};
390376
97C147041CF9000F007C117D /* Release */ = {
391377
isa = XCBuildConfiguration;
392-
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
393378
buildSettings = {
394379
ALWAYS_SEARCH_USER_PATHS = NO;
395380
CLANG_ANALYZER_NONNULL = YES;

example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/lib/ui/clock_page.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import 'package:example/utils.dart';
55
import 'package:sleek_circular_slider/sleek_circular_slider.dart';
66

77
class Clock extends StatefulWidget {
8-
Clock({Key key}) : super(key: key);
8+
Clock({Key? key}) : super(key: key);
99

1010
_ClockState createState() => _ClockState();
1111
}
1212

1313
class _ClockState extends State<Clock> {
14-
Timer _timer;
15-
DateTime dateTime;
14+
late Timer _timer;
15+
late DateTime dateTime;
1616

1717
@override
1818
void initState() {
@@ -56,7 +56,7 @@ class _ClockState extends State<Clock> {
5656

5757
class ClockWidget extends StatelessWidget {
5858
final DateTime dateTime;
59-
const ClockWidget({Key key, this.dateTime}) : super(key: key);
59+
const ClockWidget({Key? key, required this.dateTime}) : super(key: key);
6060

6161
@override
6262
Widget build(BuildContext context) {

example/lib/ui/example_page.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ class ExampleViewModel {
77
final double min;
88
final double max;
99
final double value;
10-
final InnerWidget innerWidget;
10+
final InnerWidget? innerWidget;
1111

1212
ExampleViewModel(
13-
{@required this.pageColors,
14-
@required this.appearance,
13+
{required this.pageColors,
14+
required this.appearance,
1515
this.min = 0,
1616
this.max = 100,
1717
this.value = 50,
@@ -21,8 +21,8 @@ class ExampleViewModel {
2121
class ExamplePage extends StatelessWidget {
2222
final ExampleViewModel viewModel;
2323
const ExamplePage({
24-
Key key,
25-
@required this.viewModel,
24+
Key? key,
25+
required this.viewModel,
2626
}) : super(key: key);
2727

2828
@override

example/lib/ui/home_page.dart

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ final example02 = ExamplePage(
5454

5555
/// Example 03
5656
final customWidth03 =
57-
CustomSliderWidths(trackWidth: 1, progressBarWidth: 20, shadowWidth: 50);
57+
CustomSliderWidths(trackWidth: 22, progressBarWidth: 20, shadowWidth: 50);
5858
final customColors03 = CustomSliderColors(
59-
trackColor: HexColor('#90E3D0'),
59+
trackColors: [HexColor('#FFF8CB'), HexColor('#B9FFFF')],
6060
progressBarColors: [HexColor('#FFC84B'), HexColor('#00BFD5')],
6161
shadowColor: HexColor('#5FC7B0'),
62+
dynamicGradient: true,
6263
shadowMaxOpacity: 0.05);
6364

6465
final info03 = InfoProperties(
@@ -321,9 +322,10 @@ final customColors10 = CustomSliderColors(
321322
trackColor: HexColor('#000000').withOpacity(0.1),
322323
progressBarColors: [
323324
HexColor('#76E2FF').withOpacity(0.5),
324-
HexColor('4E09ED').withOpacity(0.5),
325+
HexColor('#4E09ED').withOpacity(0.5),
325326
HexColor('#F7E4FF').withOpacity(0.3)
326327
],
328+
dynamicGradient: true,
327329
shadowColor: HexColor('#55B3E4'),
328330
shadowMaxOpacity: 0.02);
329331

@@ -347,7 +349,8 @@ final CircularSliderAppearance appearance10 = CircularSliderAppearance(
347349
angleRange: 240,
348350
infoProperties: info10,
349351
size: 280.0,
350-
counterClockwise: true);
352+
counterClockwise: true,
353+
animDurationMultiplier: 3);
351354
final viewModel10 = ExampleViewModel(
352355
appearance: appearance10,
353356
min: -25,
@@ -375,7 +378,7 @@ String printDuration(Duration duration) {
375378
}
376379

377380
class HomePage extends StatefulWidget {
378-
HomePage({Key key}) : super(key: key);
381+
HomePage({Key? key}) : super(key: key);
379382

380383
_HomePageState createState() => _HomePageState();
381384
}

0 commit comments

Comments
 (0)