Skip to content

Commit 9e86b90

Browse files
author
mike doornenbal
committed
feat: add option to always use dashedline
1 parent 634c710 commit 9e86b90

7 files changed

Lines changed: 202 additions & 99 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [2.3.0]
2+
3+
- Added lastBuilder to the StepIndicatorTheme to allow for custom last step indicator.
4+
- Added useDashedLine to always use a dashed line for the stepper.
5+
- Added activeLineColor to the StepIndicatorTheme to allow for custom active line color.
6+
- Added hideStepWhenDone to the StepIndicatorTheme to scroll the stepper when the step is done.
7+
18
## [2.2.0] - 4 March 2024
29

310
- Added optional `lineHeight` to the `StepperTheme` to allow for custom line height.

example/pubspec.lock

Lines changed: 74 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,42 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
8+
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "2.11.0"
11+
version: "2.12.0"
1212
boolean_selector:
1313
dependency: transitive
1414
description:
1515
name: boolean_selector
16-
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
16+
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
1717
url: "https://pub.dev"
1818
source: hosted
19-
version: "2.1.1"
19+
version: "2.1.2"
2020
characters:
2121
dependency: transitive
2222
description:
2323
name: characters
24-
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
24+
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
2525
url: "https://pub.dev"
2626
source: hosted
27-
version: "1.3.0"
27+
version: "1.4.0"
2828
clock:
2929
dependency: transitive
3030
description:
3131
name: clock
32-
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
32+
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
3333
url: "https://pub.dev"
3434
source: hosted
35-
version: "1.1.1"
35+
version: "1.1.2"
3636
collection:
3737
dependency: transitive
3838
description:
3939
name: collection
40-
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
40+
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.18.0"
43+
version: "1.19.1"
4444
cupertino_icons:
4545
dependency: "direct main"
4646
description:
@@ -53,17 +53,26 @@ packages:
5353
dependency: transitive
5454
description:
5555
name: fake_async
56-
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
56+
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
5757
url: "https://pub.dev"
5858
source: hosted
59-
version: "1.3.1"
59+
version: "1.3.2"
6060
flutter:
6161
dependency: "direct main"
6262
description: flutter
6363
source: sdk
6464
version: "0.0.0"
65-
flutter_lints:
65+
flutter_iconica_analysis:
6666
dependency: "direct dev"
67+
description:
68+
path: "."
69+
ref: "6.0.0"
70+
resolved-ref: "5f0a02791db6785add4e445d383a1ac012fa8f55"
71+
url: "https://github.com/Iconica-Development/flutter_iconica_analysis"
72+
source: git
73+
version: "6.0.0"
74+
flutter_lints:
75+
dependency: transitive
6776
description:
6877
name: flutter_lints
6978
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
@@ -76,12 +85,36 @@ packages:
7685
path: ".."
7786
relative: true
7887
source: path
79-
version: "2.1.0"
88+
version: "2.3.0"
8089
flutter_test:
8190
dependency: "direct dev"
8291
description: flutter
8392
source: sdk
8493
version: "0.0.0"
94+
leak_tracker:
95+
dependency: transitive
96+
description:
97+
name: leak_tracker
98+
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
99+
url: "https://pub.dev"
100+
source: hosted
101+
version: "10.0.8"
102+
leak_tracker_flutter_testing:
103+
dependency: transitive
104+
description:
105+
name: leak_tracker_flutter_testing
106+
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
107+
url: "https://pub.dev"
108+
source: hosted
109+
version: "3.0.9"
110+
leak_tracker_testing:
111+
dependency: transitive
112+
description:
113+
name: leak_tracker_testing
114+
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
115+
url: "https://pub.dev"
116+
source: hosted
117+
version: "3.0.1"
85118
lints:
86119
dependency: transitive
87120
description:
@@ -94,87 +127,87 @@ packages:
94127
dependency: transitive
95128
description:
96129
name: matcher
97-
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
130+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
98131
url: "https://pub.dev"
99132
source: hosted
100-
version: "0.12.16"
133+
version: "0.12.17"
101134
material_color_utilities:
102135
dependency: transitive
103136
description:
104137
name: material_color_utilities
105-
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
138+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
106139
url: "https://pub.dev"
107140
source: hosted
108-
version: "0.5.0"
141+
version: "0.11.1"
109142
meta:
110143
dependency: transitive
111144
description:
112145
name: meta
113-
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
146+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
114147
url: "https://pub.dev"
115148
source: hosted
116-
version: "1.10.0"
149+
version: "1.16.0"
117150
path:
118151
dependency: transitive
119152
description:
120153
name: path
121-
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
154+
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
122155
url: "https://pub.dev"
123156
source: hosted
124-
version: "1.8.3"
157+
version: "1.9.1"
125158
sky_engine:
126159
dependency: transitive
127160
description: flutter
128161
source: sdk
129-
version: "0.0.99"
162+
version: "0.0.0"
130163
source_span:
131164
dependency: transitive
132165
description:
133166
name: source_span
134-
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
167+
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
135168
url: "https://pub.dev"
136169
source: hosted
137-
version: "1.10.0"
170+
version: "1.10.1"
138171
stack_trace:
139172
dependency: transitive
140173
description:
141174
name: stack_trace
142-
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
175+
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
143176
url: "https://pub.dev"
144177
source: hosted
145-
version: "1.11.1"
178+
version: "1.12.1"
146179
stream_channel:
147180
dependency: transitive
148181
description:
149182
name: stream_channel
150-
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
183+
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
151184
url: "https://pub.dev"
152185
source: hosted
153-
version: "2.1.2"
186+
version: "2.1.4"
154187
string_scanner:
155188
dependency: transitive
156189
description:
157190
name: string_scanner
158-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
191+
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
159192
url: "https://pub.dev"
160193
source: hosted
161-
version: "1.2.0"
194+
version: "1.4.1"
162195
term_glyph:
163196
dependency: transitive
164197
description:
165198
name: term_glyph
166-
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
199+
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
167200
url: "https://pub.dev"
168201
source: hosted
169-
version: "1.2.1"
202+
version: "1.2.2"
170203
test_api:
171204
dependency: transitive
172205
description:
173206
name: test_api
174-
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
207+
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
175208
url: "https://pub.dev"
176209
source: hosted
177-
version: "0.6.1"
210+
version: "0.7.4"
178211
vector_math:
179212
dependency: transitive
180213
description:
@@ -183,14 +216,14 @@ packages:
183216
url: "https://pub.dev"
184217
source: hosted
185218
version: "2.1.4"
186-
web:
219+
vm_service:
187220
dependency: transitive
188221
description:
189-
name: web
190-
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
222+
name: vm_service
223+
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
191224
url: "https://pub.dev"
192225
source: hosted
193-
version: "0.3.0"
226+
version: "14.3.1"
194227
sdks:
195-
dart: ">=3.2.0-194.0.dev <4.0.0"
196-
flutter: ">=1.17.0"
228+
dart: ">=3.7.0-0 <4.0.0"
229+
flutter: ">=3.18.0-18.0.pre.54"

lib/src/models/step_indicator_theme.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import 'package:flutter/material.dart';
77
class StepIndicatorTheme {
88
const StepIndicatorTheme({
99
this.builder,
10+
this.lastBuilder,
1011
this.completedBackgroundColor,
1112
this.completedBorder,
1213
this.completedTextStyle,
@@ -22,6 +23,10 @@ class StepIndicatorTheme {
2223
/// and current index.
2324
final Widget Function(int stepIndex, int? currentIndex)? builder;
2425

26+
/// A function that defines custom widget builders based on the step index
27+
/// and current index for the last step.
28+
final Widget Function(int stepIndex, int? currentIndex)? lastBuilder;
29+
2530
/// The background color for active steps.
2631
final Color? activeBackgroundColor;
2732

lib/src/models/stepper_theme.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ class StepperTheme {
2222
this.paddingTopForCenterContent = 10,
2323
this.useIndicator = false,
2424
this.lineHeight = 0,
25+
this.useDashedLine = false,
26+
this.activeLineColor,
27+
this.hideStepWhenDone = false,
2528
});
2629

2730
/// The padding between the start of the line and the stepper indicator.
@@ -66,4 +69,13 @@ class StepperTheme {
6669

6770
/// The height of the line between the steps when all steps are shown
6871
final double? lineHeight;
72+
73+
/// Always use a dashedline
74+
final bool useDashedLine;
75+
76+
/// The color of the line coming from the current step
77+
final Color? activeLineColor;
78+
79+
/// scroll the completed steps up
80+
final bool hideStepWhenDone;
6981
}

0 commit comments

Comments
 (0)