Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
6b7326e
Improve `CupertinoCheckbox`'s fidelity and customizability
victorsanni May 21, 2024
93bb81d
Minor docs and formatting changes
victorsanni May 21, 2024
0ba4831
Make side non-nullable
victorsanni May 22, 2024
5b924ff
Make dropshadow optional
victorsanni May 23, 2024
3d0a806
Minor fixes
victorsanni May 23, 2024
6860f32
Configure shadow color
victorsanni May 23, 2024
ce6d639
Apply Justin's suggested changes
victorsanni May 23, 2024
18d3128
Add version number to documentation
victorsanni May 30, 2024
e50c4d2
Update packages/flutter/lib/src/cupertino/checkbox.dart
victorsanni Jun 6, 2024
b099dd0
Add test for mouse cursor in different widget states
victorsanni Jun 11, 2024
8c17b90
Merge branch 'master' into improve-cupertino-checkbox-fidelity
victorsanni Jun 11, 2024
665e378
Make darkening checkbox a separate test
victorsanni Jun 11, 2024
1fce8fe
Add shadowColor property to Checkbox.adaptive
victorsanni Jun 13, 2024
7e1f6d0
Add shadowColor to CheckboxListTile.adaptive
victorsanni Jun 14, 2024
32ffd60
Create shadowColor doc macro
victorsanni Jun 14, 2024
aadf1e2
Merge branch 'master' into improve-cupertino-checkbox-fidelity
victorsanni Jun 14, 2024
7c059d2
Replace with CupertinoColors.transparent
victorsanni Jun 14, 2024
28185f4
Dropshadow fidelity updates
victorsanni Jun 14, 2024
207d9f0
More fidelity updates in disabled state
victorsanni Jun 17, 2024
c04baeb
Deprecate inactiveColor
victorsanni Jun 18, 2024
69ed3bb
Remove shadowColor parameter
victorsanni Jun 18, 2024
9f8da4f
Undo deprecation of inactiveColor
victorsanni Jun 20, 2024
26aeb42
Remove macOS specific effects
victorsanni Jun 20, 2024
829fa46
Add link to macOS design template source file
victorsanni Jun 25, 2024
d6b56c0
Make checkbox.adaptive use theme properties
victorsanni Jun 27, 2024
0992387
Merge branch 'master' into improve-cupertino-checkbox-fidelity
victorsanni Jun 27, 2024
d37bfea
Further fidelity updates
victorsanni Jun 27, 2024
d7bf003
Minor formatting changes from review
victorsanni Jun 27, 2024
e438c6a
Revert checkbox width change
victorsanni Jun 27, 2024
68e6f72
Make colors resolve in light vs. dark modes
victorsanni Jun 27, 2024
700c405
Add tests for dark mode and fix formatting
victorsanni Jul 3, 2024
881b5dd
Roll Flutter Engine from 1d5e3cc55a75 to a9194f0f01f4 (7 revisions) (…
engine-flutter-autoroll Jun 27, 2024
dbd3442
feat: Add autofocus for `MenuItemButton` (#139396)
Fernthedev Jun 27, 2024
1454550
Improve the behavior of scrollbar drag-scrolls triggered by the track…
HansMuller Jun 27, 2024
7c3166b
Copy any previous `IconThemeData` instead of overwriting it in Cupert…
ricardoboss Jun 27, 2024
b7eee49
Fixes `flutter build ipa` failure: Command line name "app-store" is d…
LouiseHsu Jun 27, 2024
eafd47c
add onFocus to text fields (#150648)
yjbanov Jun 27, 2024
f02cdc2
Bump dartdoc to 8.0.9+1 (#150935)
goderbauer Jun 27, 2024
39d4074
[a11y] Reland [#149375 ] Update semantics in dropdown.dart (#150578)
hannah-hyj Jun 27, 2024
ea713d1
Roll Flutter Engine from a9194f0f01f4 to b42c80460538 (10 revisions) …
engine-flutter-autoroll Jun 27, 2024
34b04b5
Have flutter.js load local canvaskit instead of the CDN when appropri…
eyebrowsoffire Jun 27, 2024
8ad5e87
[tool] make the `systemTempDirectory` getter on `ErrorHandlingFileSys…
andrewkolos Jun 27, 2024
614c3d4
Roll Flutter Engine from b42c80460538 to d1506c12808e (3 revisions) (…
engine-flutter-autoroll Jun 27, 2024
d4615e8
local lint copy gradle task config (#150957)
reidbaker Jun 27, 2024
57a9aa5
Manual engine roll to ddd4814 (#150952)
gmackall Jun 27, 2024
5e6be1e
Roll Flutter Engine from ddd4814b9d40 to 94591ffb20df (5 revisions) (…
engine-flutter-autoroll Jun 28, 2024
e3a6076
Roll Flutter Engine from 94591ffb20df to a78f5ce743ce (1 revision) (#…
engine-flutter-autoroll Jun 28, 2024
a76ac04
[flutter_tools] Include more details in structured errors sent to a D…
DanTup Jun 28, 2024
a3fced9
Roll Packages from 03f5f6d5660c to 412ec4615aa4 (12 revisions) (#150985)
engine-flutter-autoroll Jun 28, 2024
428ae6b
Use caret syntax with flutter create command (#150920)
alestiago Jun 28, 2024
3ced095
Add support for type-safe plugin apply (#150958)
DRSchlaubi Jun 28, 2024
77069f0
Draggable feedback positioning (#149040)
timcreatedit Jun 28, 2024
2c36e55
Roll Flutter Engine from a78f5ce743ce to 2f7e9ab27493 (11 revisions) …
engine-flutter-autoroll Jun 28, 2024
5e24dae
[tool] when writing to openssl as a part of macOS/iOS code-signing, f…
andrewkolos Jun 28, 2024
df3d114
Bump github/codeql-action from 3.25.10 to 3.25.11 (#151012)
dependabot[bot] Jun 28, 2024
97b5803
Roll Flutter Engine from 2f7e9ab27493 to f828363d03ff (3 revisions) (…
engine-flutter-autoroll Jun 28, 2024
f1c1e41
Roll pub packages (#150827)
flutter-pub-roller-bot Jun 29, 2024
6d8f973
Roll pub packages (#151022)
flutter-pub-roller-bot Jun 29, 2024
4a06620
Add test for segmented_button.0.dart (#150676)
ValentinVignal Jun 29, 2024
ab62e78
Roll Flutter Engine from f828363d03ff to ad1343cfb99e (3 revisions) (…
engine-flutter-autoroll Jun 29, 2024
6d5cf68
Reduce the depth used in a test that applies finders to deep widget t…
jason-simmons Jun 29, 2024
cbf43d4
Roll Flutter Engine from ad1343cfb99e to 0d93da7e2fe1 (9 revisions) (…
engine-flutter-autoroll Jun 30, 2024
0ad8974
Roll Flutter Engine from 0d93da7e2fe1 to b57a044ed10f (1 revision) (#…
engine-flutter-autoroll Jul 1, 2024
25996ea
Fix teardown of a FocusScopeNode in material/app_test (#151115)
jason-simmons Jul 1, 2024
22dfd74
Roll pub packages (#151028)
flutter-pub-roller-bot Jul 1, 2024
0b3585a
Fix missing `[` in docs (#151091)
Pante Jul 1, 2024
0fa1309
Bump dartdoc to 8.0.10 (#151107)
goderbauer Jul 1, 2024
77b6d8d
More docimports for animation library (#151011)
goderbauer Jul 1, 2024
4d5b31e
Read AndroidManifest.xml and emit manifest-aar-impeller-(enabled|disa…
jtmcdole Jul 1, 2024
6d92f1b
Roll Flutter Engine from b57a044ed10f to 3456fee1a6b9 (5 revisions) (…
engine-flutter-autoroll Jul 1, 2024
a0096da
Upgrade template Gradle, App AGP, Module AGP, and Kotlin versions, an…
gmackall Jul 1, 2024
612a566
Reverts "Upgrade template Gradle, App AGP, Module AGP, and Kotlin ver…
auto-submit[bot] Jul 1, 2024
bb7d217
Implementing a few switch statements (#150946)
nate-thegrate Jul 1, 2024
2577862
[tool] remove some temporary printTrace calls (#151074)
andrewkolos Jul 2, 2024
1bd1d0a
Roll Flutter Engine from 3456fee1a6b9 to fc5bc14e6091 (8 revisions) (…
engine-flutter-autoroll Jul 2, 2024
bbeb423
Fix: `CupertinoActionSheet` should take up max height when actions se…
dkwingsmt Jul 2, 2024
2a135a3
Roll Flutter Engine from fc5bc14e6091 to d3c5bd66a78f (1 revision) (#…
engine-flutter-autoroll Jul 2, 2024
34d7bb5
Roll Flutter Engine from d3c5bd66a78f to 40c087b31515 (1 revision) (#…
engine-flutter-autoroll Jul 2, 2024
4388774
Refactor BuildInfo to always require packageConfigPath (#150559)
sigurdm Jul 2, 2024
1c89660
Roll Flutter Engine from 40c087b31515 to 433d360eee11 (7 revisions) (…
engine-flutter-autoroll Jul 2, 2024
34c590f
[flutter_driver] add allocator mtl to memory event allowlist. (#151153)
Jul 2, 2024
40a1ed6
docimports for semantics (#151132)
goderbauer Jul 2, 2024
6728fd5
Docimports for foundation (#151119)
goderbauer Jul 2, 2024
1e270f2
docimports for gestures (#151123)
goderbauer Jul 2, 2024
9fb199c
docimports for cupertino (#151149)
goderbauer Jul 2, 2024
6735dd6
docimports for services (#151134)
goderbauer Jul 2, 2024
2f8dc7a
docimports for physics (#151125)
goderbauer Jul 2, 2024
918142e
`dismissible.dart` code cleanup (#150276)
nate-thegrate Jul 2, 2024
2c89d55
docimports for scheduler (#151126)
goderbauer Jul 2, 2024
2939d52
docimports for painting (#151143)
goderbauer Jul 2, 2024
ec06408
Roll Packages from 412ec4615aa4 to d2705fb82b26 (13 revisions) (#151169)
engine-flutter-autoroll Jul 2, 2024
d325ec9
ScrollEndNotification example: auto-scroll based on RenderSliver cons…
HansMuller Jul 2, 2024
557064e
Use `ErrorHandlingFileSystem.deleteIfExists` when deleting .plugin_sy…
andrewkolos Jul 2, 2024
4b81860
Roll Flutter Engine from 433d360eee11 to 44278941443e (4 revisions) (…
engine-flutter-autoroll Jul 2, 2024
4dbb539
[tool] Fix `stdin.flush` calls on processes started by `FakeProcessMa…
andrewkolos Jul 2, 2024
a8fde1d
Fix typo (#151192)
QuncCccccc Jul 2, 2024
d3ad708
Roll pub packages (#151129)
flutter-pub-roller-bot Jul 2, 2024
3bd0951
[flutter_tools] Update the mapping for the Dart SDK internal URI (#15…
DanTup Jul 2, 2024
a08339c
Interactable ScrollView content when settling a scroll activity (#145…
Michal-MK Jul 2, 2024
87a647b
docImports for flutter_test (#151189)
goderbauer Jul 2, 2024
5c1fb9c
Fix result propagation in RenderSliverEdgeInsetsPadding.hitTestChildr…
knopp Jul 2, 2024
43c795b
Fix scheduler event loop being stuck due to task with Priority.idle (…
lauweijie Jul 2, 2024
fb251f0
Roll Flutter Engine from 44278941443e to c5c0c54d6d1d (9 revisions) (…
engine-flutter-autoroll Jul 3, 2024
dcfa170
Roll Flutter Engine from c5c0c54d6d1d to a02e3f673da3 (1 revision) (#…
engine-flutter-autoroll Jul 3, 2024
776bcdc
Roll Flutter Engine from a02e3f673da3 to 8274f54f11be (4 revisions) (…
engine-flutter-autoroll Jul 3, 2024
bf289e1
Handle a SocketException thrown when sending the browser close comman…
jason-simmons Jul 3, 2024
9b73dfa
Force regeneration of platform-specific manifests before running perf…
jason-simmons Jul 3, 2024
2f97665
Roll Flutter Engine from 8274f54f11be to a3e61c0fd1c2 (2 revisions) (…
engine-flutter-autoroll Jul 3, 2024
6749b69
Roll Flutter Engine from a3e61c0fd1c2 to 4190543cb093 (1 revision) (#…
engine-flutter-autoroll Jul 3, 2024
59f9d61
Fix project name fallback (#150614)
navaronbracke Jul 3, 2024
97e8e59
Add example of goldenFileComparator usage in widget tests (#150422)
alestiago Jul 3, 2024
b6618c8
chore: fix typos and link broken (#150402)
xiaoxianBoy Jul 3, 2024
80a4cd4
content dimensions are not established get controller value error (#1…
hello-coder-xu Jul 3, 2024
a97a33c
Fix link in tree hygene doc (#151235)
derdilla Jul 3, 2024
d3f324e
Fix references in examples (#151204)
goderbauer Jul 3, 2024
45feff3
Feat: Add withOpacity to gradient (#150670)
rkishan516 Jul 3, 2024
9d797ce
Remove warning when KGP version not detected (#151254)
gmackall Jul 3, 2024
71d19a4
SliverFloatingHeader (#151145)
HansMuller Jul 3, 2024
e0b19b7
Update deprecation policy (#151257)
Piinks Jul 3, 2024
bc1b8da
PinnedHeaderSliver example based on the iOS Settings AppBar (#151205)
HansMuller Jul 3, 2024
475368e
Add a message about spam/brigading (#150583)
nate-thegrate Jul 3, 2024
ae4dd01
Prepares semantics_update_test for upcoming link URL change (#151261)
harryterkelsen Jul 3, 2024
6583eb9
Cupertino transparent navigation bars (#149102)
veloce Jul 3, 2024
b0474fd
Fix invalid URL suggestion for gradle incompatability (#150999)
Dispersia Jul 3, 2024
f7833cc
Roll pub packages (#151203)
flutter-pub-roller-bot Jul 3, 2024
058884e
Roll Flutter Engine from 4190543cb093 to 8e2d05fa95d7 (13 revisions) …
engine-flutter-autoroll Jul 4, 2024
1725cbb
Roll Flutter Engine from 8e2d05fa95d7 to 2b6bb516e7e6 (2 revisions) (…
engine-flutter-autoroll Jul 4, 2024
401b2c8
Roll Flutter Engine from 2b6bb516e7e6 to 79a91e38c587 (2 revisions) (…
engine-flutter-autoroll Jul 4, 2024
d74df37
Roll Packages from d2705fb82b26 to 754de1918a33 (3 revisions) (#151315)
engine-flutter-autoroll Jul 4, 2024
61246f0
Roll Flutter Engine from 79a91e38c587 to 3c6a373bda3e (2 revisions) (…
engine-flutter-autoroll Jul 4, 2024
fcce6ec
Roll Flutter Engine from 3c6a373bda3e to 1f0f950ea02a (1 revision) (#…
engine-flutter-autoroll Jul 5, 2024
530fae2
Roll Flutter Engine from 1f0f950ea02a to ba9c7b6336ef (1 revision) (#…
engine-flutter-autoroll Jul 5, 2024
8454bae
Roll Flutter Engine from ba9c7b6336ef to 74d40c160e48 (1 revision) (#…
engine-flutter-autoroll Jul 5, 2024
722cc01
Roll Flutter Engine from 74d40c160e48 to 4ee09d3b7f3b (1 revision) (#…
engine-flutter-autoroll Jul 5, 2024
369ec43
Roll Packages from 754de1918a33 to 97bad7ecf569 (1 revision) (#151350)
engine-flutter-autoroll Jul 5, 2024
bd06dc8
de-duplicate code in analyze.dart (#151279)
christopherfujino Jul 5, 2024
613d278
Add tests for color_filtered.0.dart example. (#151064)
ksokolovskyi Jul 5, 2024
0c950b0
Roll Flutter Engine from 4ee09d3b7f3b to e6b09697df1a (2 revisions) (…
engine-flutter-autoroll Jul 5, 2024
c90992d
Bump actions/upload-artifact from 4.3.3 to 4.3.4 (#151354)
dependabot[bot] Jul 5, 2024
d10219a
Roll Flutter Engine from e6b09697df1a to d1ebc5fde630 (1 revision) (#…
engine-flutter-autoroll Jul 6, 2024
6398eb9
Roll Flutter Engine from d1ebc5fde630 to 3600ec613a00 (1 revision) (#…
engine-flutter-autoroll Jul 6, 2024
dd55706
Roll Flutter Engine from 3600ec613a00 to 5ca3b856ee5a (1 revision) (#…
engine-flutter-autoroll Jul 6, 2024
e75b75f
Roll Flutter Engine from 5ca3b856ee5a to ca79a56a66d7 (1 revision) (#…
engine-flutter-autoroll Jul 7, 2024
96a0811
Add tests for action_listener.0.dart (#150606)
ValentinVignal Jul 8, 2024
4596391
Roll Flutter Engine from ca79a56a66d7 to 69075e7e87d4 (1 revision) (#…
engine-flutter-autoroll Jul 8, 2024
e1f6995
Add tests for material_state_border_side.0_test.dart (#151089)
ValentinVignal Jul 8, 2024
01cb450
[Reland] - Enable `explicitChildNodes` for the `AlertDialog` content …
TahaTesser Jul 8, 2024
77faf6d
Update doc-import to primary configured import, _goldens_io.dart (#15…
srawlins Jul 8, 2024
6531c19
Roll Packages from 97bad7ecf569 to 14341d1800f4 (5 revisions) (#151417)
engine-flutter-autoroll Jul 8, 2024
5952add
Add cedric vanden bosch to authors (#151313)
cedvdb Jul 8, 2024
ca085fd
Factor out deprecated names in example code (#151374)
nate-thegrate Jul 8, 2024
a66414c
Added SliverFloatingHeader.snapMode (#151289)
HansMuller Jul 8, 2024
8ef0a05
Re-enable `SemanticsAction.focus` matchers (#150990)
gspencergoog Jul 8, 2024
5908dc4
[ios]A typical news app benchmark with bottom ad banner (#150991)
hellohuanlin Jul 8, 2024
e8c60b4
`MaterialState` → `WidgetState` in documentation (#151376)
nate-thegrate Jul 8, 2024
4bc24dc
Update `DataTable` documentation (#151356)
nate-thegrate Jul 8, 2024
afe3f74
Make darkening checkbox a separate test
victorsanni Jun 11, 2024
de9b561
Revert changes to Checkbox.adaptive
victorsanni Jul 8, 2024
8a2257a
Revert "Roll Flutter Engine from 1d5e3cc55a75 to a9194f0f01f4 (7 revi…
victorsanni Jul 8, 2024
e11e08e
Merge branch 'master' into improve-cupertino-checkbox-fidelity
victorsanni Jul 8, 2024
e986f1d
(take 2) Revert checkbox.adaptive
victorsanni Jul 8, 2024
63da870
Revert checkbox.adaptive tests
victorsanni Jul 8, 2024
3a2b26d
Add `hasFocusAction: true` for semantics
victorsanni Jul 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions examples/api/lib/cupertino/checkbox/cupertino_checkbox.0.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/cupertino.dart';

/// Flutter code sample for [CupertinoCheckbox].

void main() => runApp(const CupertinoCheckboxApp());

class CupertinoCheckboxApp extends StatelessWidget {
const CupertinoCheckboxApp({super.key});

@override
Widget build(BuildContext context) {
return const CupertinoApp(
theme: CupertinoThemeData(brightness: Brightness.light),
home: CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: Text('CupertinoCheckbox Example'),
),
child: SafeArea(
child: CupertinoCheckboxExample(),
),
),
);
}
}

class CupertinoCheckboxExample extends StatefulWidget {
const CupertinoCheckboxExample({super.key});

@override
State<CupertinoCheckboxExample> createState() => _CupertinoCheckboxExampleState();
}

class _CupertinoCheckboxExampleState extends State<CupertinoCheckboxExample> {
bool? isChecked = true;

@override
Widget build(BuildContext context) {
return CupertinoCheckbox(
checkColor: CupertinoColors.white,
tristate: true,
fillColor: WidgetStateProperty.resolveWith(_getColor),
value: isChecked,
onChanged: (bool? value) {
setState(() {
isChecked = value;
});
},
);
}
}

Color _getColor(Set<WidgetState> states) {
const Set<WidgetState> interactiveStates = <WidgetState>{
WidgetState.pressed,
WidgetState.hovered,
WidgetState.focused,
};
if (states.any(interactiveStates.contains)) {
return CupertinoColors.activeGreen;
}
return CupertinoColors.systemRed;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter/cupertino.dart';
import 'package:flutter_api_samples/cupertino/checkbox/cupertino_checkbox.0.dart' as example;
import 'package:flutter_test/flutter_test.dart';

void main() {
testWidgets('Checkbox can be checked', (WidgetTester tester) async {
await tester.pumpWidget(
const example.CupertinoCheckboxApp(),
);

CupertinoCheckbox checkbox = tester.widget(find.byType(CupertinoCheckbox));

// Verify the initial state of the checkbox.
expect(checkbox.value, isTrue);
expect(checkbox.tristate, isTrue);

// Tap the checkbox and verify the state change.
await tester.tap(find.byType(CupertinoCheckbox));
await tester.pump();
checkbox = tester.widget(find.byType(CupertinoCheckbox));

expect(checkbox.value, isNull);

// Tap the checkbox and verify the state change.
await tester.tap(find.byType(CupertinoCheckbox));
await tester.pump();
checkbox = tester.widget(find.byType(CupertinoCheckbox));

expect(checkbox.value, isFalse);

await tester.tap(find.byType(CupertinoCheckbox));
await tester.pump();
checkbox = tester.widget(find.byType(CupertinoCheckbox));

expect(checkbox.value, isTrue);
});

testWidgets('Checkbox color can be changed', (WidgetTester tester) async {
await tester.pumpWidget(
const example.CupertinoCheckboxApp(),
);
final CupertinoCheckbox checkbox = tester.widget(find.byType(CupertinoCheckbox));

expect(
checkbox.checkColor,
CupertinoColors.white,
);
expect(
checkbox.fillColor!.resolve(<WidgetState>{}),
CupertinoColors.systemRed,
);
expect(
checkbox.fillColor!.resolve(<WidgetState>{WidgetState.pressed}),
CupertinoColors.activeGreen,
);
expect(
checkbox.fillColor!.resolve(<WidgetState>{WidgetState.hovered}),
CupertinoColors.activeGreen,
);
expect(
checkbox.fillColor!.resolve(<WidgetState>{WidgetState.focused}),
CupertinoColors.activeGreen,
);
});
}
Loading