mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This PR is for issue #154792 The Video recording shows the before and after The first button with the text "Go" uses the default cursor The second button with the text "With Cursor" uses a custom cursor that has been passed in the parameters https://github.com/user-attachments/assets/e82ecd42-42b1-42c9-aa30-a6f3daddb436 Here is the code for the second button ```dart CupertinoButton( onPressed: () { showCupertinoModalPopup<void>( context: context, builder: (BuildContext context) { return CupertinoActionSheet( title: const Text('The title'), message: const Text('Message'), actions: <Widget>[ CupertinoActionSheetAction( cursor: SystemMouseCursors.forbidden, child: const Text('One'), onPressed: () {}, ), ], ); }, ); }, child: const Text('With Cursor'), ), ``` Fixes https://github.com/flutter/flutter/issues/154792
Tests for the Cupertino package
Avoid importing the Material 'package:flutter/material.dart' in these tests as we're trying to test the Cupertino package in standalone scenarios.
The 'material' subdirectory contains tests for cross-interactions of Material Cupertino widgets in hybridized apps.
Some tests may also be replicated in the Material tests when Material reuses Cupertino components on iOS such as page transitions and text editing.