Skip to content

Commit f85f548

Browse files
authored
Merge pull request #7 from Iconica-Development/feature/step_indicator_builder
Feature/step indicator builder
2 parents 2d35e8f + 3a4d571 commit f85f548

7 files changed

Lines changed: 105 additions & 65 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
## [2.1.0] - 22 February 2023
2+
3+
- Added stepper indicator builder to the stepperIndicatorTheme
4+
15
## [2.0.0] - 5 Januari 2023
6+
27
- Update stepper to allow for growable content in rows
38
- Refactor structure of app for better maintenance
49
- Rename showAllStepExpandedOne to showOnlyCurrentStep

example/lib/vertical_multi.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,23 @@ class _VerticalMultiPageStepperState extends State<VerticalMultiPageStepper> {
3636
theme: StepperTheme(
3737
stepIndicatorTheme: StepIndicatorTheme(
3838
activeBackgroundColor: Colors.white,
39-
activeTextStyle: Theme.of(context).textTheme.bodyText2?.copyWith(
39+
activeTextStyle: Theme.of(context).textTheme.bodyMedium?.copyWith(
4040
color: Colors.black,
4141
),
4242
activeBorder: Border.all(
4343
color: Colors.white,
4444
),
4545
inactiveBackgroundColor: Colors.black,
4646
inactiveTextStyle:
47-
Theme.of(context).textTheme.bodyText2?.copyWith(
47+
Theme.of(context).textTheme.bodyMedium?.copyWith(
4848
color: Colors.white,
4949
),
5050
inactiveBorder: Border.all(
5151
color: Colors.white,
5252
),
5353
completedBackgroundColor: Colors.green,
5454
completedTextStyle:
55-
Theme.of(context).textTheme.bodyText2?.copyWith(
55+
Theme.of(context).textTheme.bodyMedium?.copyWith(
5656
color: Colors.white,
5757
),
5858
),

example/lib/vertical_single.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,23 @@ class _VerticalSinglePageStepperState extends State<VerticalSinglePageStepper> {
2828
stepIndicatorTheme: StepIndicatorTheme(
2929
activeBackgroundColor: Colors.white,
3030
activeTextStyle:
31-
Theme.of(context).textTheme.bodyText2?.copyWith(
31+
Theme.of(context).textTheme.bodyMedium?.copyWith(
3232
color: Colors.black,
3333
),
3434
activeBorder: Border.all(
3535
color: Colors.white,
3636
),
3737
inactiveBackgroundColor: Colors.black,
3838
inactiveTextStyle:
39-
Theme.of(context).textTheme.bodyText2?.copyWith(
39+
Theme.of(context).textTheme.bodyMedium?.copyWith(
4040
color: Colors.white,
4141
),
4242
inactiveBorder: Border.all(
4343
color: Colors.white,
4444
),
4545
completedBackgroundColor: Colors.green,
4646
completedTextStyle:
47-
Theme.of(context).textTheme.bodyText2?.copyWith(
47+
Theme.of(context).textTheme.bodyMedium?.copyWith(
4848
color: Colors.white,
4949
),
5050
),
@@ -63,13 +63,13 @@ class _VerticalSinglePageStepperState extends State<VerticalSinglePageStepper> {
6363
children: [
6464
Text(
6565
'Datum',
66-
style: Theme.of(context).textTheme.headline6?.copyWith(
66+
style: Theme.of(context).textTheme.titleLarge?.copyWith(
6767
color: Colors.white,
6868
),
6969
),
7070
Text(
7171
'Selecteer een datum',
72-
style: Theme.of(context).textTheme.bodyText2?.copyWith(
72+
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
7373
color: Colors.white,
7474
),
7575
),
@@ -83,13 +83,13 @@ class _VerticalSinglePageStepperState extends State<VerticalSinglePageStepper> {
8383
children: [
8484
Text(
8585
'Tijd',
86-
style: Theme.of(context).textTheme.headline6?.copyWith(
86+
style: Theme.of(context).textTheme.titleLarge?.copyWith(
8787
color: Colors.white,
8888
),
8989
),
9090
Text(
9191
'Selecteer een tijd',
92-
style: Theme.of(context).textTheme.bodyText2?.copyWith(
92+
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
9393
color: Colors.white,
9494
),
9595
),

example/pubspec.lock

Lines changed: 60 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,56 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
url: "https://pub.dartlang.org"
8+
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
9+
url: "https://pub.dev"
910
source: hosted
10-
version: "2.9.0"
11+
version: "2.10.0"
1112
boolean_selector:
1213
dependency: transitive
1314
description:
1415
name: boolean_selector
15-
url: "https://pub.dartlang.org"
16+
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17+
url: "https://pub.dev"
1618
source: hosted
17-
version: "2.1.0"
19+
version: "2.1.1"
1820
characters:
1921
dependency: transitive
2022
description:
2123
name: characters
22-
url: "https://pub.dartlang.org"
24+
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
25+
url: "https://pub.dev"
2326
source: hosted
2427
version: "1.2.1"
2528
clock:
2629
dependency: transitive
2730
description:
2831
name: clock
29-
url: "https://pub.dartlang.org"
32+
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33+
url: "https://pub.dev"
3034
source: hosted
3135
version: "1.1.1"
3236
collection:
3337
dependency: transitive
3438
description:
3539
name: collection
36-
url: "https://pub.dartlang.org"
40+
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
41+
url: "https://pub.dev"
3742
source: hosted
38-
version: "1.16.0"
43+
version: "1.17.0"
3944
cupertino_icons:
4045
dependency: "direct main"
4146
description:
4247
name: cupertino_icons
43-
url: "https://pub.dartlang.org"
48+
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
49+
url: "https://pub.dev"
4450
source: hosted
4551
version: "1.0.5"
4652
fake_async:
4753
dependency: transitive
4854
description:
4955
name: fake_async
50-
url: "https://pub.dartlang.org"
56+
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
57+
url: "https://pub.dev"
5158
source: hosted
5259
version: "1.3.1"
5360
flutter:
@@ -59,7 +66,8 @@ packages:
5966
dependency: "direct dev"
6067
description:
6168
name: flutter_lints
62-
url: "https://pub.dartlang.org"
69+
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
70+
url: "https://pub.dev"
6371
source: hosted
6472
version: "2.0.1"
6573
flutter_stepper:
@@ -68,45 +76,58 @@ packages:
6876
path: ".."
6977
relative: true
7078
source: path
71-
version: "1.1.0"
79+
version: "2.1.0"
7280
flutter_test:
7381
dependency: "direct dev"
7482
description: flutter
7583
source: sdk
7684
version: "0.0.0"
85+
js:
86+
dependency: transitive
87+
description:
88+
name: js
89+
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
90+
url: "https://pub.dev"
91+
source: hosted
92+
version: "0.6.5"
7793
lints:
7894
dependency: transitive
7995
description:
8096
name: lints
81-
url: "https://pub.dartlang.org"
97+
sha256: "5cfd6509652ff5e7fe149b6df4859e687fca9048437857cb2e65c8d780f396e3"
98+
url: "https://pub.dev"
8299
source: hosted
83100
version: "2.0.0"
84101
matcher:
85102
dependency: transitive
86103
description:
87104
name: matcher
88-
url: "https://pub.dartlang.org"
105+
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
106+
url: "https://pub.dev"
89107
source: hosted
90-
version: "0.12.12"
108+
version: "0.12.13"
91109
material_color_utilities:
92110
dependency: transitive
93111
description:
94112
name: material_color_utilities
95-
url: "https://pub.dartlang.org"
113+
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
114+
url: "https://pub.dev"
96115
source: hosted
97-
version: "0.1.5"
116+
version: "0.2.0"
98117
meta:
99118
dependency: transitive
100119
description:
101120
name: meta
102-
url: "https://pub.dartlang.org"
121+
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
122+
url: "https://pub.dev"
103123
source: hosted
104124
version: "1.8.0"
105125
path:
106126
dependency: transitive
107127
description:
108128
name: path
109-
url: "https://pub.dartlang.org"
129+
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
130+
url: "https://pub.dev"
110131
source: hosted
111132
version: "1.8.2"
112133
sky_engine:
@@ -118,51 +139,58 @@ packages:
118139
dependency: transitive
119140
description:
120141
name: source_span
121-
url: "https://pub.dartlang.org"
142+
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
143+
url: "https://pub.dev"
122144
source: hosted
123-
version: "1.9.0"
145+
version: "1.9.1"
124146
stack_trace:
125147
dependency: transitive
126148
description:
127149
name: stack_trace
128-
url: "https://pub.dartlang.org"
150+
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
151+
url: "https://pub.dev"
129152
source: hosted
130-
version: "1.10.0"
153+
version: "1.11.0"
131154
stream_channel:
132155
dependency: transitive
133156
description:
134157
name: stream_channel
135-
url: "https://pub.dartlang.org"
158+
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
159+
url: "https://pub.dev"
136160
source: hosted
137-
version: "2.1.0"
161+
version: "2.1.1"
138162
string_scanner:
139163
dependency: transitive
140164
description:
141165
name: string_scanner
142-
url: "https://pub.dartlang.org"
166+
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
167+
url: "https://pub.dev"
143168
source: hosted
144-
version: "1.1.1"
169+
version: "1.2.0"
145170
term_glyph:
146171
dependency: transitive
147172
description:
148173
name: term_glyph
149-
url: "https://pub.dartlang.org"
174+
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
175+
url: "https://pub.dev"
150176
source: hosted
151177
version: "1.2.1"
152178
test_api:
153179
dependency: transitive
154180
description:
155181
name: test_api
156-
url: "https://pub.dartlang.org"
182+
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
183+
url: "https://pub.dev"
157184
source: hosted
158-
version: "0.4.12"
185+
version: "0.4.16"
159186
vector_math:
160187
dependency: transitive
161188
description:
162189
name: vector_math
163-
url: "https://pub.dartlang.org"
190+
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
191+
url: "https://pub.dev"
164192
source: hosted
165-
version: "2.1.2"
193+
version: "2.1.4"
166194
sdks:
167195
dart: ">=2.18.0 <3.0.0"
168196
flutter: ">=1.17.0"

lib/src/models/step_indicator_theme.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import 'package:flutter/material.dart';
66

77
class StepIndicatorTheme {
88
const StepIndicatorTheme({
9+
this.builder,
910
this.completedBackgroundColor,
1011
this.completedBorder,
11-
this.completedTextStyle,
12+
this.completedTextStyle,
1213
this.inactiveBackgroundColor,
1314
this.inactiveBorder,
1415
this.inactiveTextStyle,
@@ -17,6 +18,8 @@ class StepIndicatorTheme {
1718
this.activeTextStyle,
1819
});
1920

21+
final Widget Function(int stepIndex, int? currentIndex)? builder;
22+
2023
final Color? activeBackgroundColor;
2124

2225
final BoxBorder? activeBorder;

0 commit comments

Comments
 (0)