Skip to content

Commit 27f9fdf

Browse files
committed
Updater to flutter 3.22
1 parent 4486490 commit 27f9fdf

File tree

5 files changed

+177
-120
lines changed

5 files changed

+177
-120
lines changed

example/lib/src/colors/colors_view.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@ Map<String, (Color, Color?)> _getBaseColors(ThemeData theme) {
175175
final s = theme.colorScheme;
176176

177177
final colors = <String, (Color, Color?)>{
178-
'background': (s.background, s.onBackground),
179-
'onBackground': (s.onBackground, null),
178+
'background': (s.surface, s.onSurface),
179+
'onBackground': (s.onSurface, null),
180180
'surface': (s.surface, s.onSurface),
181181
'onSurface': (s.onSurface, null),
182182
'surfaceTint': (s.surfaceTint, null),
183-
'surfaceVariant': (s.surfaceVariant, s.onSurfaceVariant),
183+
'surfaceVariant': (s.surfaceContainerHighest, s.onSurfaceVariant),
184184
'onSurfaceVariant': (s.onSurfaceVariant, null),
185185
'inverseSurface': (s.inverseSurface, s.onInverseSurface),
186186
'onInverseSurface': (s.onInverseSurface, null),

example/lib/src/controls/toggleables.dart

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
import 'package:flutter/material.dart';
22

3-
import '../constants.dart';
4-
5-
class Toggleables extends StatelessWidget {
3+
class Toggleables extends StatefulWidget {
64
const Toggleables({super.key});
75

6+
@override
7+
State<Toggleables> createState() => _ToggleablesState();
8+
}
9+
10+
class _ToggleablesState extends State<Toggleables> {
11+
var _selected = <String>{};
812
@override
913
Widget build(BuildContext context) {
1014
return Wrap(
1115
spacing: 10,
1216
runSpacing: 10,
1317
children: [
14-
Wrap(
15-
spacing: 10,
16-
runSpacing: 10,
17-
children: [
18-
const Text('ToggleButtons:'),
19-
ToggleButtons(
20-
isSelected: const [true, false, false],
21-
onPressed: (v) {},
22-
children: const [Text('Off'), Text('Off'), Text('Off')],
23-
),
24-
ToggleButtons(
25-
isSelected: const [true, false, false],
26-
children: const [Text('Off'), Text('Off'), Text('Off')],
27-
),
28-
const Divider(
29-
height: 2 * kWrapSpacing,
30-
),
31-
],
18+
SegmentedButton<String>(
19+
showSelectedIcon: false,
20+
emptySelectionAllowed: true,
21+
onSelectionChanged: (v) => setState(() => _selected = v),
22+
multiSelectionEnabled: true,
23+
segments: ['Ka', 'Me', 'Ha', 'Meh', 'Hah']
24+
.map((e) => ButtonSegment(value: e, label: Text(e)))
25+
.toList(),
26+
selected: _selected,
3227
),
3328
Row(
3429
children: [

example/pubspec.lock

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,26 +71,26 @@ packages:
7171
dependency: transitive
7272
description:
7373
name: leak_tracker
74-
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
74+
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
7575
url: "https://pub.dev"
7676
source: hosted
77-
version: "10.0.0"
77+
version: "10.0.4"
7878
leak_tracker_flutter_testing:
7979
dependency: transitive
8080
description:
8181
name: leak_tracker_flutter_testing
82-
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
82+
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
8383
url: "https://pub.dev"
8484
source: hosted
85-
version: "2.0.1"
85+
version: "3.0.3"
8686
leak_tracker_testing:
8787
dependency: transitive
8888
description:
8989
name: leak_tracker_testing
90-
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
90+
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
9191
url: "https://pub.dev"
9292
source: hosted
93-
version: "2.0.1"
93+
version: "3.0.1"
9494
lints:
9595
dependency: transitive
9696
description:
@@ -119,10 +119,10 @@ packages:
119119
dependency: transitive
120120
description:
121121
name: meta
122-
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
122+
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
123123
url: "https://pub.dev"
124124
source: hosted
125-
version: "1.11.0"
125+
version: "1.12.0"
126126
path:
127127
dependency: transitive
128128
description:
@@ -187,10 +187,10 @@ packages:
187187
dependency: transitive
188188
description:
189189
name: test_api
190-
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
190+
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
191191
url: "https://pub.dev"
192192
source: hosted
193-
version: "0.6.1"
193+
version: "0.7.0"
194194
vector_math:
195195
dependency: transitive
196196
description:
@@ -203,10 +203,10 @@ packages:
203203
dependency: transitive
204204
description:
205205
name: vm_service
206-
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
206+
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
207207
url: "https://pub.dev"
208208
source: hosted
209-
version: "13.0.0"
209+
version: "14.2.1"
210210
sdks:
211-
dart: ">=3.2.0-0 <4.0.0"
212-
flutter: ">=3.16.0"
211+
dart: ">=3.3.0 <4.0.0"
212+
flutter: ">=3.22.0"

0 commit comments

Comments
 (0)