diff --git a/.github/workflows/code_check.yaml b/.github/workflows/code_check.yaml index 40353323..1ce3a8dc 100644 --- a/.github/workflows/code_check.yaml +++ b/.github/workflows/code_check.yaml @@ -30,29 +30,21 @@ jobs: needs: changes if: ${{ needs.changes.outputs.dart-files == 'true' }} runs-on: ubuntu-latest - strategy: - matrix: - target: [package, cookbook] steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Flutter uses: ./.github/actions/setup_flutter - with: - target: ${{ matrix.target }} - name: Format run: dart format . -o none --set-exit-if-changed - working-directory: ${{ matrix.target }} - name: Analyze run: dart analyze - working-directory: ${{ matrix.target }} - name: Disallowed patterns check run: bash ${{ env.PATTERN_CHECKER }} "*.dart" "--" "debugPrint" - working-directory: ${{ matrix.target }} # Unit testing testing: @@ -69,12 +61,9 @@ jobs: - name: Setup Flutter uses: ./.github/actions/setup_flutter - with: - target: package - name: Run unit tests run: flutter test --file-reporter="json:${{ env.FLUTTER_TEST_REPORT }}" - working-directory: package - name: Write test report uses: dorny/test-reporter@v1 diff --git a/.github/workflows/dry_publish.yaml b/.github/workflows/dry_publish.yaml index e99a387a..71eb3658 100644 --- a/.github/workflows/dry_publish.yaml +++ b/.github/workflows/dry_publish.yaml @@ -14,8 +14,6 @@ jobs: - name: Setup Flutter uses: ./.github/actions/setup_flutter - with: - target: package - name: Install pana run: dart pub global activate pana @@ -23,7 +21,7 @@ jobs: - name: Run pana id: analysis run: | - pana --json package 2>&1 | grep -v '^{"logName"' > pana-report.json + pana --json . 2>&1 | grep -v '^{"logName"' > pana-report.json JSON_OUTPUT=$(cat pana-report.json | jq -c .) echo "::set-output name=json_output::$JSON_OUTPUT" @@ -37,4 +35,3 @@ jobs: supported-platforms: ios, android - run: flutter pub publish --dry-run - working-directory: package diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index b6538843..8c20eabc 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -14,12 +14,9 @@ jobs: - name: Setup Flutter uses: ./.github/actions/setup_flutter - with: - target: package - name: Setup OIDC token uses: dart-lang/setup-dart@v1 - name: Publish to pub.dev run: flutter pub publish --force - working-directory: package diff --git a/.gitignore b/.gitignore index 275fbb53..6bc4ab47 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,16 @@ .history .svn/ migrate_working_dir/ -pubspec.lock +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# Flutter/Dart/Pub related +/pubspec.lock +**/doc/api/ +.dart_tool/ +.packages +build/ diff --git a/.vscode/launch.json b/.vscode/launch.json index 62d31514..a6d65440 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,147 +9,147 @@ "request": "launch", "type": "dart", "program": "lib/showcase/ai_playlist_generator.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Airbnb Mobile App", "request": "launch", "type": "dart", "program": "lib/showcase/airbnb_mobile_app.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Todo List", "request": "launch", "type": "dart", "program": "lib/showcase/todo_list/main.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Safari", "request": "launch", "type": "dart", "program": "lib/showcase/safari/main.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Scrollable Sheet", "request": "launch", "type": "dart", "program": "lib/tutorial/scrollable_sheet.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Draggable Sheet", "request": "launch", "type": "dart", "program": "lib/tutorial/draggable_sheet.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "iOS-Style Modal Navigation Sheet (with go_router)", "request": "launch", "type": "dart", "program": "lib/tutorial/ios_style_declarative_modal_navigation_sheet.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Declarative Navigation Sheet", "request": "launch", "type": "dart", "program": "lib/tutorial/declarative_navigation_sheet.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Imperative Navigation Sheet", "request": "launch", "type": "dart", "program": "lib/tutorial/imperative_navigation_sheet.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Sheet Physics", "request": "launch", "type": "dart", "program": "lib/tutorial/sheet_physics.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Sheet Content Scaffold", "request": "launch", "type": "dart", "program": "lib/tutorial/sheet_content_scaffold.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Bottom Bar Visibility", "request": "launch", "type": "dart", "program": "lib/tutorial/bottom_bar_visibility.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Sheet Controller", "request": "launch", "type": "dart", "program": "lib/tutorial/sheet_controller.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Sheet Draggable", "request": "launch", "type": "dart", "program": "lib/tutorial/sheet_draggable.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Declarative Modal Sheet", "request": "launch", "type": "dart", "program": "lib/tutorial/declarative_modal_sheet.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Imperative Modal Sheet", "request": "launch", "type": "dart", "program": "lib/tutorial/imperative_modal_sheet.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Cupertino Modal Sheet", "request": "launch", "type": "dart", "program": "lib/tutorial/cupertino_modal_sheet.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Extent Driven Animation", "request": "launch", "type": "dart", "program": "lib/tutorial/extent_driven_animation.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Keyboard Dismiss Behavior", "request": "launch", "type": "dart", "program": "lib/tutorial/keyboard_dismiss_behavior.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "Navigation Sheet and Keyboard", "request": "launch", "type": "dart", "program": "lib/tutorial/navigation_sheet_and_keyboard.dart", - "cwd": "./cookbook" + "cwd": "./example" }, { "name": "ScrollableSheet and PageView", "request": "launch", "type": "dart", "program": "lib/tutorial/scrollable_pageview_sheet.dart", - "cwd": "./cookbook" + "cwd": "./example" }, ] } diff --git a/package/CHANGELOG.md b/CHANGELOG.md similarity index 100% rename from package/CHANGELOG.md rename to CHANGELOG.md diff --git a/LICENSE b/LICENSE index 0e89d180..9549527b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 Daichi Fujita +Copyright (c) 2024 Daichi Fujita Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile.toml b/Makefile.toml deleted file mode 100644 index 54dd28a1..00000000 --- a/Makefile.toml +++ /dev/null @@ -1,47 +0,0 @@ -[config] -skip_core_tasks = true - -[env] -PROJECT_ROOT = { script = ["pwd"] } -SCRIPTS_DIR = "${PROJECT_ROOT}/scripts" - -[tasks.flutter-build] -script = ''' -flutter clean -flutter pub get -''' - -[tasks.flutter-analyze] -script = ''' -echo "Running dart format" -dart format . -o none --set-exit-if-changed -echo "Running dart analyze" -dart analyze -echo "Running disallowed patterns check" -bash $SCRIPTS_DIR/pattern_checker.sh "*.dart" "--" "debugPrint" -''' - -[tasks.flutter-check] -run_task = { name = ['flutter-build', 'flutter-analyze'] } - -[tasks.build-all] -script_runner = "@duckscript" -script = ''' -echo "Building package" -cd ./package -cm_run_task flutter-build -echo "Building cookbook" -cd ../cookbook -cm_run_task flutter-build -''' - -[tasks.check-all] -script_runner = "@duckscript" -script = ''' -echo "Running flutter-check for package" -cd ./package -cm_run_task flutter-check -echo "Running flutter-check for cookbook" -cd ../cookbook -cm_run_task flutter-check -''' diff --git a/README.md b/README.md deleted file mode 120000 index 89d5ef5f..00000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -package/README.md \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..ad2eeb2c --- /dev/null +++ b/README.md @@ -0,0 +1,387 @@ +# smooth_sheets + +[![GitHub Repo stars](https://img.shields.io/github/stars/fujidaiti/smooth_sheets)](https://github.com/fujidaiti/smooth_sheets) [![GitHub last commit (branch)](https://img.shields.io/github/last-commit/fujidaiti/smooth_sheets/main?logo=git)](https://github.com/fujidaiti/smooth_sheets/commits/main/) [![Pub Version](https://img.shields.io/pub/v/smooth_sheets)](https://pub.dev/packages/smooth_sheets) ![Pub Likes](https://img.shields.io/pub/likes/smooth_sheets) ![Pub Points](https://img.shields.io/pub/points/smooth_sheets) ![Pub Popularity](https://img.shields.io/pub/popularity/smooth_sheets) + + +**smooth_sheets** offers modal and persistent sheet widgets for Flutter apps. The key features are: + +- **Smooth motion**: The sheets respond to user interaction with smooth, graceful motion. +- **Highly flexible**: Not restricted to a specific design. Both modal and persistent styles are supp/orted, as well as scrollable and non-scrollable widgets. +- **Supports nested navigation**: A sheet is able to have multiple pages and to navigate between the pages with motion animation for transitions. +- **Works with imperative & declarative Navigator API**: No special navigation mechanism is required. The traditional ways such as `Navigator.push` is supported and it works with Navigator 2.0 packages like go_route as well. +- **iOS flavor**: The modal sheets in the style of iOS 15 are supported. + +
+ +**CAUTION🚨** + +This library is currently in the experimental stage. The API may undergo changes without prior notice. For documentation of the latest published version, please visit the [package site](https://pub.dev/packages/smooth_sheets) on pub.dev. + +
+ +## Migration guide + +- [0.8.x to 0.9.x](https://github.com/fujidaiti/smooth_sheets/blob/main/docs/migration-guide-0.9.x.md) 🆕 +- [0.7.x to 0.8.x](https://github.com/fujidaiti/smooth_sheets/blob/main/docs/migration-guide-0.8.x.md) + +See [here](https://github.com/fujidaiti/smooth_sheets/blob/main/docs/) for older versions. + +
+ +## Showcases + + + + + + + + + + + + + + + + + + +
+

AI Playlist Generator

+

An AI assistant that helps create a music playlist based on the user's preferences. See the cookbook for more details.

+

Key components:

+
    +
  • NavigationSheet
  • +
  • ModalSheetPage
  • +
  • DraggableNavigationSheetPage
  • +
  • ScrollableNavigationSheetPage
  • +
  • SheetDismissible
  • +
+
+

Safari app

+

A practical example of ios-style modal sheets. See the cookbook for more details.

+

Key components:

+
    +
  • CupertinoStackedTransition
  • +
  • CupertinoModalSheetRoute
  • +
+
+

Airbnb mobile app clone

+

A partial clone of the Airbnb mobile app. The user can drag the house list down to reveal the map behind it. See the cookbook for more details.

+

Key components:

+
    +
  • ScrollableSheet
  • +
  • SheetPhysics
  • +
  • SheetController
  • +
  • ExtentDrivenAnimation
  • +
+
+

Todo List

+

A simple Todo app that shows how a sheet handles the on-screen keyboard. See the cookbook for more details.

+

Used components:

+
    +
  • ScrollableSheet
  • +
  • SheetContentScaffold
  • +
  • SheetKeyboardDismissBehavior
  • +
  • SheetDismissible
  • +
  • StickyBottomBarVisibility
  • +
+
+ + + + +
+ +## Why use this? + +There are few packages on pub.dev that supports nested navigation with motion animation for page transitions. One of the great choices for this usecase is [wolt_modal_sheet](https://github.com/woltapp/wolt_modal_sheet), which this package is inspired by. Although smooth_sheet has similar features with wolt_modal_sheet, it does not intended to be a replacement of that package. Here is some differences between those 2 packages: + +| | wolt_modal_sheet | smooth_sheets | +| :--------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | +| Design | Based on Wolt's [design guideline](https://careers.wolt.com/en/blog/tech/an-overview-of-the-multi-page-scrollable-bottom-sheet-ui-design) | Not restricted to a specific design, fully customizable | +| Navigation mechanism | [Manage the page index in ValueNotifier](https://github.com/woltapp/wolt_modal_sheet#usage) | Works with built-in Navigator API (both of imperative and declarative) | +| Scrollable content | [Supported](https://github.com/woltapp/wolt_modal_sheet#scrollable-content) | Supported | +| Persistent sheets | Not supported | Supported | +| Screen size adaptation | [The sheet appears as a dialog on large screens](https://github.com/woltapp/wolt_modal_sheet#responsive-design) | Not supported | + +
+ +## Usage + +Several resources are available for learning the functionalities of this package. + +- Tutorials: See [example/lib/tutorial/](https://github.com/fujidaiti/smooth_sheets/tree/main/example/lib/tutorial) to learn the basic usage of the core components. +- Showcases: More practical examples are available in [example/lib/showcase/](https://github.com/fujidaiti/smooth_sheets/tree/main/example/lib/showcase). +- Documentation: WORK IN PROGRESS! Please see the source code for a while. + +
+ +## Ingredients + +This section provides descriptions for each core component and links to related resources for further learning. + +
+ +### Extent + +Extent represents the visible height of the sheet. It is used in a variety of situations, for example, to specify how much area of a sheet is initially visible at first build, or to limit the range of sheet dragging. + +
+ +### DraggableSheet + +
+ +
+ + +A sheet that can be dragged. The height will be equal to the content. The behavior of the sheet when over-dragged or under-dragged is determined by [SheetPhysics](#sheetphysics). Note that this widget does not work with scrollable widgets. Instead, use [ScrollableSheet](#scrollablesheet) for this usecase. + + + +See also: + +- [draggable_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/draggable_sheet.dart) for basic usage. + +
+ +### ScrollableSheet + +
+ +
+ + +A sheet that is similar to [DraggableSheet](#draggablesheet), but specifically designed to be integrated with scrollable widgets. It will begin to be dragged when the content is over-scrolled or under-scrolled. + + + +See also: + +- [scrollable_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/scrollable_sheet.dart) for basic usage. + +
+ +### NavigationSheet + +
+ +
+ + +A sheet that is able to have multiple pages and performs graceful motion animation when page transitions. It supports both of imperative Navigator API such as `Navigator.push`, and declarative API (Navigator 2.0). + + + +See also: + +- [declarative_navigation_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/declarative_navigation_sheet.dart), tutorial of integration with Navigator 2.0 using [go_router](https://pub.dev/packages/go_router) package. +- [imperative_navigation_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/imperative_navigation_sheet.dart), a tutorial of integration with imperative Navigator API. + +
+ +### ModalSheets + +
+ +
+ + + + +A sheet can be displayed as a modal sheet using ModalSheetRoute for imperative navigation, or ModalSheetPage for declarative navigation. To enable the *swipe-to-dismiss* action, which allows the user to dismiss the sheet by a swiping-down gesture, set `swipeDismissible` to true. + +
+ +
+ +Furthermore, [the modal sheets in the style of iOS 15](https://medium.com/surf-dev/bottomsheet-in-ios-15-uisheetpresentationcontroller-and-its-capabilities-5e913661c9f) are also supported. For imperative navigation, use CupertinoModalSheetRoute, and for declarative navigation, use CupertinoModalSheetPage, respectively. + + + + +See also: + +- [declarative_modal_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/declarative_modal_sheet.dart), a tutorial of integration with declarative navigation using [go_router](https://pub.dev/packages/go_router) package. +- [imperative_modal_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/imperative_modal_sheet.dart), a tutorial of integration with imperative Navigator API. +- [cupertino_modal_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/cupertino_modal_sheet.dart), a tutorial of iOS style modal sheets. +- [ios_style_declarative_modal_navigation_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/ios_style_declarative_modal_navigation_sheet.dart), an example of iOS-style modal NavigationSheet with go_router. +- [showcase/todo_list](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/showcase/todo_list), which uses SheetDismissible to show a confirmation dialog when the user tries to discard the todo editing sheet without saving the content. + +
+ +### SheetPhysics + +
+ +
+ + +A physics determines how the sheet will behave when over-dragged or under-dragged, or when the user stops dragging. There are 3 predefined physics: + +- ClampingSheetPhysics: Prevents the sheet from reaching beyond the content bounds. +- BouncingSheetPhysics: Allows the sheet to go beyond the content bounds, but then bounce the sheet back to the edge of those bounds. Use [BouncingBehavior](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/BouncingBehavior-class.html) and its subclasses to tweak the bouncing behavior. +- SnappingSheetPhysics: Automatically snaps the sheet to a certain extent when the user stops dragging. + +These physics can be combined to create more complex behavior (e.g. bouncing behavior + snapping behavior). + + + +See also: + +- [sheet_physics.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/sheet_physics.dart) for basic usage. +- [bouncing_behaviors.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/bouncing_behaviors.dart), which shows how to tweak the bouncing behavior of BouncingSheetPhysics. + +
+ +### SheetController + +
+ +
+ + +Like [ScrollController](https://api.flutter.dev/flutter/widgets/ScrollController-class.html) for scrollable widget, the SheetController can be used to animate or observe the extent of a sheet. + + + +See also: + +- [sheet_controller.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/sheet_controller.dart) for basic usage. + +
+ +### SheetContentScaffold + +
+ +
+ + +A special kind of [Scaffold](https://api.flutter.dev/flutter/material/Scaffold-class.html) designed for use in a sheet. It has slots for an app bar and a bottom bar, similar to Scaffold. However, it differs in that its height reduces to fit the content widget. + + + +See also: + +- [SheetContentScaffold](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/SheetContentScaffold-class.html), the API documentation. +- [BottomBarVisibility](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/BottomBarVisibility-class.html), which can be used to control the visibility of the bottom bar based on the sheet position. +- [tutorial/sheet_content_scaffold.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/sheet_content_scaffold.dart), which shows the basic usage of SheetContentScaffold. +- [tutorial/bottom_bar_visibility.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/bottom_bar_visibility.dart), which shows the basic usage of BottomBarVisibility widgets. + +
+ +### SheetDraggable + +
+ +
+ +SheetDraggable enables its child widget to act as a drag handle for the sheet. Typically, you will want to use this widget when placing non-scrollable widget(s) in a [ScrollableSheet](#scrollablesheet), since it only works with scrollable widgets, so you can't drag the sheet by touching a non-scrollable area. Try removing SheetDraggable and you will see that the drag handle doesn't work as it should. +Note that SheetDraggable is not needed when using DraggableSheet since it implicitly wraps the child widget with SheetDraggable. + + + +See also: + +- [sheet_draggable.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/sheet_draggable.dart) for basic usage. + +
+ +### ExtentDrivenAnimation + +
+ +
+ +It is easy to create sheet extent driven animations by using ExtentDrivenAnimation, a special kind of [Animation](https://api.flutter.dev/flutter/animation/Animation-class.html) whose value changes from 0 to 1 as the sheet extent changes from 'startExtent' to 'endExtent'. + + + +See also: + +- [extent_driven_animation](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/extent_driven_animation.dart) for basic usage. +- [airbnb_mobile_app.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/showcase/airbnb_mobile_app.dart), which show how ExtentDrivenAnimation can be used to hide the bottom navigation bar and a FAB when the sheet is dragged down, and to show them when the sheet is dragged up again. + +
+ +### SheetNotification + +A sheet dispatches a [SheetNotification](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/SheetNotification-class.html) when its extent changes. This can be used to observe the extent of a descendant sheet from an ancestor widget. + +```dart +NotificationListener( + onNotification: (notification) { + debugPrint('${notification.metrics}'); + return false; + }, + child: DraggableSheet(...), +), +``` + + + +See also: + +- [SheetDragUpdateNotification](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/SheetDragUpdateNotification-class.html), which is dispatched when the sheet is dragged by the user. +- [SheetUpdateNotification](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/SheetUpdateNotification-class.html), which is dispatched when the sheet extent is updated by other than user interaction such as animation. +- [SheetOverflowNotification](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/SheetOverflowNotification-class.html), which is dispatched when the user tries to drag the sheet beyond its draggable bounds but the sheet has not changed its extent because its [SheetPhysics](#sheetphysics) does not allow it to be. +- [NotificationListener](https://api.flutter.dev/flutter/widgets/NotificationListener-class.html), which can be used to listen for the notifications in a subtree. + +
+ +### SheetKeyboardDismissBehavior + +
+ +
+
+ +[SheetKeyboardDismissBehavior](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/SheetKeyboardDismissBehavior-class.html) determines when the sheet should dismiss the on-screen keyboard. This feature is similar to [ScrollViewKeyboardDismissBehavior](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/ScrollViewKeyboardDismissBehavior.html) for scrollable widgets. + +Although it is easy to create custom behaviors by implementing SheetKeyboardDismissBehavior interface, there are 3 types of predefined behaviors for convenience. + +- [DragSheetKeyboardDismissBehavior](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/DragSheetKeyboardDismissBehavior-class.html), which always dismisses the on-screen keyboard when the sheet is dragged. +- [DragDownSheetKeyboardDismissBehavior](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/DragDownSheetKeyboardDismissBehavior-class.html), which always dismisses the on-screen keyboard only when the sheet is dragged down. +- [DragUpSheetKeyboardDismissBehavior](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/DragUpSheetKeyboardDismissBehavior-class.html), which always dismisses the on-screen keyboard only when the sheet is dragged up. + + + +See also: + +- [tutorial/keyboard_dismiss_behavior.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/example/lib/tutorial/keyboard_dismiss_behavior.dart) for basic usage. + +
+ +## Questions + +If you have any questions, feel free to ask them on [the discussions page](https://github.com/fujidaiti/smooth_sheets/discussions). + +
+ +## Contributing + +Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. + +If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". +Don't forget to give the project a star! Thanks again! + +1. Fork the Project +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) +3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) +4. Push to the Branch (`git push origin feature/AmazingFeature`) +5. Open a Pull Request + +
+ +## Links + +- [Roadmap](https://github.com/fujidaiti/smooth_sheets/issues?q=is%3Aissue+is%3Aopen+label%3A%22feature+request%22) +- [API Documentation](https://pub.dev/documentation/smooth_sheets/latest/) +- [pub.dev](https://pub.dev/packages/smooth_sheets) +- [norelease.dev](https://pub.dev/publishers/norelease.dev/packages) + +
+ diff --git a/package/analysis_options.yaml b/analysis_options.yaml similarity index 100% rename from package/analysis_options.yaml rename to analysis_options.yaml diff --git a/resources/cookbook-ai-playlist-generator.gif b/art/cookbook-ai-playlist-generator.gif similarity index 100% rename from resources/cookbook-ai-playlist-generator.gif rename to art/cookbook-ai-playlist-generator.gif diff --git a/resources/cookbook-airbnb-mobile-app.gif b/art/cookbook-airbnb-mobile-app.gif similarity index 100% rename from resources/cookbook-airbnb-mobile-app.gif rename to art/cookbook-airbnb-mobile-app.gif diff --git a/resources/cookbook-cupertino-modal-sheet.gif b/art/cookbook-cupertino-modal-sheet.gif similarity index 100% rename from resources/cookbook-cupertino-modal-sheet.gif rename to art/cookbook-cupertino-modal-sheet.gif diff --git a/resources/cookbook-declarative-navigation-sheet.gif b/art/cookbook-declarative-navigation-sheet.gif similarity index 100% rename from resources/cookbook-declarative-navigation-sheet.gif rename to art/cookbook-declarative-navigation-sheet.gif diff --git a/resources/cookbook-declerative-modal-sheet.gif b/art/cookbook-declerative-modal-sheet.gif similarity index 100% rename from resources/cookbook-declerative-modal-sheet.gif rename to art/cookbook-declerative-modal-sheet.gif diff --git a/resources/cookbook-draggable-sheet.gif b/art/cookbook-draggable-sheet.gif similarity index 100% rename from resources/cookbook-draggable-sheet.gif rename to art/cookbook-draggable-sheet.gif diff --git a/resources/cookbook-extent-driven-animation.gif b/art/cookbook-extent-driven-animation.gif similarity index 100% rename from resources/cookbook-extent-driven-animation.gif rename to art/cookbook-extent-driven-animation.gif diff --git a/resources/cookbook-imerative-modal-sheet.gif b/art/cookbook-imerative-modal-sheet.gif similarity index 100% rename from resources/cookbook-imerative-modal-sheet.gif rename to art/cookbook-imerative-modal-sheet.gif diff --git a/resources/cookbook-imperative-modal-sheet.gif b/art/cookbook-imperative-modal-sheet.gif similarity index 100% rename from resources/cookbook-imperative-modal-sheet.gif rename to art/cookbook-imperative-modal-sheet.gif diff --git a/resources/cookbook-imperative-navigation-sheet.gif b/art/cookbook-imperative-navigation-sheet.gif similarity index 100% rename from resources/cookbook-imperative-navigation-sheet.gif rename to art/cookbook-imperative-navigation-sheet.gif diff --git a/resources/cookbook-keyboard-dismiss-behavior.gif b/art/cookbook-keyboard-dismiss-behavior.gif similarity index 100% rename from resources/cookbook-keyboard-dismiss-behavior.gif rename to art/cookbook-keyboard-dismiss-behavior.gif diff --git a/resources/cookbook-safari.gif b/art/cookbook-safari.gif similarity index 100% rename from resources/cookbook-safari.gif rename to art/cookbook-safari.gif diff --git a/resources/cookbook-scrollable-sheet.gif b/art/cookbook-scrollable-sheet.gif similarity index 100% rename from resources/cookbook-scrollable-sheet.gif rename to art/cookbook-scrollable-sheet.gif diff --git a/resources/cookbook-sheet-content-scaffold.gif b/art/cookbook-sheet-content-scaffold.gif similarity index 100% rename from resources/cookbook-sheet-content-scaffold.gif rename to art/cookbook-sheet-content-scaffold.gif diff --git a/resources/cookbook-sheet-controller.gif b/art/cookbook-sheet-controller.gif similarity index 100% rename from resources/cookbook-sheet-controller.gif rename to art/cookbook-sheet-controller.gif diff --git a/resources/cookbook-sheet-draggable.gif b/art/cookbook-sheet-draggable.gif similarity index 100% rename from resources/cookbook-sheet-draggable.gif rename to art/cookbook-sheet-draggable.gif diff --git a/resources/cookbook-sheet-physics.gif b/art/cookbook-sheet-physics.gif similarity index 100% rename from resources/cookbook-sheet-physics.gif rename to art/cookbook-sheet-physics.gif diff --git a/resources/cookbook-todo-list.gif b/art/cookbook-todo-list.gif similarity index 100% rename from resources/cookbook-todo-list.gif rename to art/cookbook-todo-list.gif diff --git a/resources/index.md b/art/index.md similarity index 100% rename from resources/index.md rename to art/index.md diff --git a/package/resources/smooth-sheets-thumbnail.png b/art/smooth-sheets-thumbnail.png similarity index 100% rename from package/resources/smooth-sheets-thumbnail.png rename to art/smooth-sheets-thumbnail.png diff --git a/cookbook/lib/issue/issue131.dart b/cookbook/lib/issue/issue131.dart deleted file mode 100644 index e4f2b79a..00000000 --- a/cookbook/lib/issue/issue131.dart +++ /dev/null @@ -1,106 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; -import 'package:smooth_sheets/smooth_sheets.dart'; - -/// Issue [#131](https://github.com/fujidaiti/smooth_sheets/issues/131): -/// Unwanted bouncing effect when opening keyboard on NavigationSheet -void main() { - runApp(const Issue131()); -} - -class Issue131 extends StatelessWidget { - const Issue131({super.key}); - - @override - Widget build(BuildContext context) { - return MaterialApp.router(routerConfig: router); - } -} - -final sheetTransitionObserver = NavigationSheetTransitionObserver(); - -final router = GoRouter( - routes: [ - GoRoute( - path: '/', - builder: (context, state) => const Home(), - routes: [ - ShellRoute( - observers: [sheetTransitionObserver], - pageBuilder: (context, state, navigator) { - return ModalSheetPage( - child: ModalSheet( - navigator: navigator, - transitionObserver: sheetTransitionObserver, - ), - ); - }, - routes: [ - GoRoute( - path: 'intro', - pageBuilder: (context, state) { - return const DraggableNavigationSheetPage( - child: SheetContent(), - ); - }, - ) - ], - ) - ], - ), - ], -); - -class Home extends StatelessWidget { - const Home({super.key}); - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Center( - child: ElevatedButton( - onPressed: () => context.go('/intro'), - child: const Text('Show modal sheet'), - ), - ), - ); - } -} - -class ModalSheet extends StatelessWidget { - const ModalSheet({ - super.key, - required this.transitionObserver, - required this.navigator, - }); - - final NavigationSheetTransitionObserver transitionObserver; - final Widget navigator; - - @override - Widget build(BuildContext context) { - return NavigationSheet( - transitionObserver: sheetTransitionObserver, - child: ColoredBox( - color: Theme.of(context).colorScheme.surface, - child: navigator, - ), - ); - } -} - -class SheetContent extends StatelessWidget { - const SheetContent({super.key}); - - @override - Widget build(BuildContext context) { - return SheetContentScaffold( - body: SizedBox( - height: 300, - child: Center( - child: TextFormField(), - ), - ), - ); - } -} diff --git a/cookbook/lib/issue/issue137.dart b/cookbook/lib/issue/issue137.dart deleted file mode 100644 index 465074c5..00000000 --- a/cookbook/lib/issue/issue137.dart +++ /dev/null @@ -1,107 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:smooth_sheets/smooth_sheets.dart'; - -/// issue [#137](https://github.com/fujidaiti/smooth_sheets/issues/137): -/// SheetDismissible not working with NavigationSheet -void main() { - runApp(const MaterialApp( - home: HomePage(), - )); -} - -class HomePage extends StatelessWidget { - const HomePage({ - super.key, - }); - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Smooth Sheets Example'), - ), - body: Center( - child: ElevatedButton( - onPressed: () { - BaseModal.show(context); - }, - child: const Text('Show Modal'), - ), - ), - ); - } -} - -class BaseModal extends StatelessWidget { - const BaseModal({super.key}); - - static Future show(BuildContext context) async { - return await Navigator.push( - context, - ModalSheetRoute( - swipeDismissible: true, - builder: (context) => const BaseModal(), - )); - } - - @override - Widget build(BuildContext context) { - final transitionObserver = NavigationSheetTransitionObserver(); - - final nestedNavigator = Navigator( - observers: [transitionObserver], - onGenerateInitialRoutes: (navigator, initialRoute) { - return [ - ScrollableNavigationSheetRoute( - builder: (context) { - return const BasePage(); - }, - ), - ]; - }, - ); - - return SafeArea( - bottom: false, - child: NavigationSheet( - transitionObserver: transitionObserver, - child: Material( - color: Colors.white, - clipBehavior: Clip.antiAlias, - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(20), - topRight: Radius.circular(20), - ), - child: nestedNavigator, - ), - ), - ); - } -} - -class BasePage extends StatelessWidget { - const BasePage({ - super.key, - }); - - @override - Widget build(BuildContext context) { - return SafeArea( - top: false, - child: SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - mainAxisSize: MainAxisSize.min, - children: [ - Container( - height: 300, - color: Colors.amber, - ), - const SizedBox( - height: 10, - ) - ], - ), - )); - } -} diff --git a/cookbook/lib/issue/issue80.dart b/cookbook/lib/issue/issue80.dart deleted file mode 100644 index 976b0555..00000000 --- a/cookbook/lib/issue/issue80.dart +++ /dev/null @@ -1,72 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:smooth_sheets/smooth_sheets.dart'; - -/// issue [#80](https://github.com/fujidaiti/smooth_sheets/issues/80): -/// SheetDismissible not working with infinite looping scroll widget -void main() { - runApp( - const CupertinoApp( - home: _Home(), - ), - ); -} - -class _Home extends StatelessWidget { - const _Home(); - - @override - Widget build(BuildContext context) { - return CupertinoPageScaffold( - child: Center( - child: CupertinoButton.filled( - onPressed: () => showTimePickerSheet(context), - child: const Text('Show Time Picker Sheet'), - ), - ), - ); - } -} - -void showTimePickerSheet(BuildContext context) { - final modalRoute = ModalSheetRoute( - swipeDismissible: true, - builder: (context) => DraggableSheet( - child: MediaQuery.removePadding( - context: context, - removeTop: true, - child: CupertinoPageScaffold( - navigationBar: CupertinoNavigationBar( - automaticallyImplyLeading: false, - middle: const Text('Time Picker'), - trailing: CupertinoButton( - padding: EdgeInsets.zero, - onPressed: () => Navigator.pop(context), - child: const Icon(CupertinoIcons.xmark), - ), - ), - child: SafeArea( - child: SizedBox( - height: 300, - child: CupertinoTheme( - data: const CupertinoThemeData( - textTheme: CupertinoTextThemeData( - dateTimePickerTextStyle: TextStyle(fontSize: 56), - ), - ), - child: CupertinoDatePicker( - initialDateTime: DateTime.now(), - mode: CupertinoDatePickerMode.time, - use24hFormat: true, - onDateTimeChanged: (value) {}, - itemExtent: 80, - ), - ), - ), - ), - ), - ), - ), - ); - - Navigator.push(context, modalRoute); -} diff --git a/cookbook/.gitignore b/example/.gitignore similarity index 100% rename from cookbook/.gitignore rename to example/.gitignore diff --git a/cookbook/.metadata b/example/.metadata similarity index 100% rename from cookbook/.metadata rename to example/.metadata diff --git a/cookbook/README.md b/example/README.md similarity index 100% rename from cookbook/README.md rename to example/README.md diff --git a/cookbook/analysis_options.yaml b/example/analysis_options.yaml similarity index 100% rename from cookbook/analysis_options.yaml rename to example/analysis_options.yaml diff --git a/cookbook/android/.gitignore b/example/android/.gitignore similarity index 100% rename from cookbook/android/.gitignore rename to example/android/.gitignore diff --git a/cookbook/android/app/build.gradle b/example/android/app/build.gradle similarity index 100% rename from cookbook/android/app/build.gradle rename to example/android/app/build.gradle diff --git a/cookbook/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from cookbook/android/app/src/debug/AndroidManifest.xml rename to example/android/app/src/debug/AndroidManifest.xml diff --git a/cookbook/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml similarity index 100% rename from cookbook/android/app/src/main/AndroidManifest.xml rename to example/android/app/src/main/AndroidManifest.xml diff --git a/cookbook/android/app/src/main/kotlin/com/example/cookbook/MainActivity.kt b/example/android/app/src/main/kotlin/com/example/cookbook/MainActivity.kt similarity index 100% rename from cookbook/android/app/src/main/kotlin/com/example/cookbook/MainActivity.kt rename to example/android/app/src/main/kotlin/com/example/cookbook/MainActivity.kt diff --git a/cookbook/android/app/src/main/res/drawable-v21/launch_background.xml b/example/android/app/src/main/res/drawable-v21/launch_background.xml similarity index 100% rename from cookbook/android/app/src/main/res/drawable-v21/launch_background.xml rename to example/android/app/src/main/res/drawable-v21/launch_background.xml diff --git a/cookbook/android/app/src/main/res/drawable/launch_background.xml b/example/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from cookbook/android/app/src/main/res/drawable/launch_background.xml rename to example/android/app/src/main/res/drawable/launch_background.xml diff --git a/cookbook/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from cookbook/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/cookbook/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from cookbook/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/cookbook/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from cookbook/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/cookbook/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from cookbook/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/cookbook/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from cookbook/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/cookbook/android/app/src/main/res/values-night/styles.xml b/example/android/app/src/main/res/values-night/styles.xml similarity index 100% rename from cookbook/android/app/src/main/res/values-night/styles.xml rename to example/android/app/src/main/res/values-night/styles.xml diff --git a/cookbook/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml similarity index 100% rename from cookbook/android/app/src/main/res/values/styles.xml rename to example/android/app/src/main/res/values/styles.xml diff --git a/cookbook/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from cookbook/android/app/src/profile/AndroidManifest.xml rename to example/android/app/src/profile/AndroidManifest.xml diff --git a/cookbook/android/build.gradle b/example/android/build.gradle similarity index 100% rename from cookbook/android/build.gradle rename to example/android/build.gradle diff --git a/cookbook/android/gradle.properties b/example/android/gradle.properties similarity index 100% rename from cookbook/android/gradle.properties rename to example/android/gradle.properties diff --git a/cookbook/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from cookbook/android/gradle/wrapper/gradle-wrapper.properties rename to example/android/gradle/wrapper/gradle-wrapper.properties diff --git a/cookbook/android/settings.gradle b/example/android/settings.gradle similarity index 100% rename from cookbook/android/settings.gradle rename to example/android/settings.gradle diff --git a/cookbook/assets/apple_website.png b/example/assets/apple_website.png similarity index 100% rename from cookbook/assets/apple_website.png rename to example/assets/apple_website.png diff --git a/cookbook/assets/fake_map.png b/example/assets/fake_map.png similarity index 100% rename from cookbook/assets/fake_map.png rename to example/assets/fake_map.png diff --git a/cookbook/ios/.gitignore b/example/ios/.gitignore similarity index 100% rename from cookbook/ios/.gitignore rename to example/ios/.gitignore diff --git a/cookbook/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist similarity index 100% rename from cookbook/ios/Flutter/AppFrameworkInfo.plist rename to example/ios/Flutter/AppFrameworkInfo.plist diff --git a/cookbook/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig similarity index 100% rename from cookbook/ios/Flutter/Debug.xcconfig rename to example/ios/Flutter/Debug.xcconfig diff --git a/cookbook/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig similarity index 100% rename from cookbook/ios/Flutter/Release.xcconfig rename to example/ios/Flutter/Release.xcconfig diff --git a/cookbook/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj similarity index 100% rename from cookbook/ios/Runner.xcodeproj/project.pbxproj rename to example/ios/Runner.xcodeproj/project.pbxproj diff --git a/cookbook/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from cookbook/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/cookbook/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from cookbook/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/cookbook/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from cookbook/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/cookbook/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 100% rename from cookbook/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme diff --git a/cookbook/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from cookbook/ios/Runner.xcworkspace/contents.xcworkspacedata rename to example/ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/cookbook/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from cookbook/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/cookbook/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from cookbook/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/cookbook/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift similarity index 100% rename from cookbook/ios/Runner/AppDelegate.swift rename to example/ios/Runner/AppDelegate.swift diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/cookbook/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/cookbook/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/cookbook/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from cookbook/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/cookbook/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from cookbook/ios/Runner/Base.lproj/LaunchScreen.storyboard rename to example/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/cookbook/ios/Runner/Base.lproj/Main.storyboard b/example/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from cookbook/ios/Runner/Base.lproj/Main.storyboard rename to example/ios/Runner/Base.lproj/Main.storyboard diff --git a/cookbook/ios/Runner/Info.plist b/example/ios/Runner/Info.plist similarity index 100% rename from cookbook/ios/Runner/Info.plist rename to example/ios/Runner/Info.plist diff --git a/cookbook/ios/Runner/Runner-Bridging-Header.h b/example/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from cookbook/ios/Runner/Runner-Bridging-Header.h rename to example/ios/Runner/Runner-Bridging-Header.h diff --git a/cookbook/ios/RunnerTests/RunnerTests.swift b/example/ios/RunnerTests/RunnerTests.swift similarity index 100% rename from cookbook/ios/RunnerTests/RunnerTests.swift rename to example/ios/RunnerTests/RunnerTests.swift diff --git a/cookbook/lib/showcase/ai_playlist_generator.dart b/example/lib/showcase/ai_playlist_generator.dart similarity index 100% rename from cookbook/lib/showcase/ai_playlist_generator.dart rename to example/lib/showcase/ai_playlist_generator.dart diff --git a/cookbook/lib/showcase/airbnb_mobile_app.dart b/example/lib/showcase/airbnb_mobile_app.dart similarity index 100% rename from cookbook/lib/showcase/airbnb_mobile_app.dart rename to example/lib/showcase/airbnb_mobile_app.dart diff --git a/cookbook/lib/showcase/safari/actions.dart b/example/lib/showcase/safari/actions.dart similarity index 100% rename from cookbook/lib/showcase/safari/actions.dart rename to example/lib/showcase/safari/actions.dart diff --git a/cookbook/lib/showcase/safari/bookmark.dart b/example/lib/showcase/safari/bookmark.dart similarity index 100% rename from cookbook/lib/showcase/safari/bookmark.dart rename to example/lib/showcase/safari/bookmark.dart diff --git a/cookbook/lib/showcase/safari/common.dart b/example/lib/showcase/safari/common.dart similarity index 100% rename from cookbook/lib/showcase/safari/common.dart rename to example/lib/showcase/safari/common.dart diff --git a/cookbook/lib/showcase/safari/home.dart b/example/lib/showcase/safari/home.dart similarity index 100% rename from cookbook/lib/showcase/safari/home.dart rename to example/lib/showcase/safari/home.dart diff --git a/cookbook/lib/showcase/safari/main.dart b/example/lib/showcase/safari/main.dart similarity index 100% rename from cookbook/lib/showcase/safari/main.dart rename to example/lib/showcase/safari/main.dart diff --git a/cookbook/lib/showcase/safari/menu.dart b/example/lib/showcase/safari/menu.dart similarity index 100% rename from cookbook/lib/showcase/safari/menu.dart rename to example/lib/showcase/safari/menu.dart diff --git a/cookbook/lib/showcase/todo_list/main.dart b/example/lib/showcase/todo_list/main.dart similarity index 100% rename from cookbook/lib/showcase/todo_list/main.dart rename to example/lib/showcase/todo_list/main.dart diff --git a/cookbook/lib/showcase/todo_list/models.dart b/example/lib/showcase/todo_list/models.dart similarity index 100% rename from cookbook/lib/showcase/todo_list/models.dart rename to example/lib/showcase/todo_list/models.dart diff --git a/cookbook/lib/showcase/todo_list/todo_editor.dart b/example/lib/showcase/todo_list/todo_editor.dart similarity index 100% rename from cookbook/lib/showcase/todo_list/todo_editor.dart rename to example/lib/showcase/todo_list/todo_editor.dart diff --git a/cookbook/lib/tutorial/bottom_bar_visibility.dart b/example/lib/tutorial/bottom_bar_visibility.dart similarity index 100% rename from cookbook/lib/tutorial/bottom_bar_visibility.dart rename to example/lib/tutorial/bottom_bar_visibility.dart diff --git a/cookbook/lib/tutorial/bouncing_behaviors.dart b/example/lib/tutorial/bouncing_behaviors.dart similarity index 100% rename from cookbook/lib/tutorial/bouncing_behaviors.dart rename to example/lib/tutorial/bouncing_behaviors.dart diff --git a/cookbook/lib/tutorial/cupertino_modal_sheet.dart b/example/lib/tutorial/cupertino_modal_sheet.dart similarity index 100% rename from cookbook/lib/tutorial/cupertino_modal_sheet.dart rename to example/lib/tutorial/cupertino_modal_sheet.dart diff --git a/cookbook/lib/tutorial/declarative_modal_sheet.dart b/example/lib/tutorial/declarative_modal_sheet.dart similarity index 100% rename from cookbook/lib/tutorial/declarative_modal_sheet.dart rename to example/lib/tutorial/declarative_modal_sheet.dart diff --git a/cookbook/lib/tutorial/declarative_navigation_sheet.dart b/example/lib/tutorial/declarative_navigation_sheet.dart similarity index 100% rename from cookbook/lib/tutorial/declarative_navigation_sheet.dart rename to example/lib/tutorial/declarative_navigation_sheet.dart diff --git a/cookbook/lib/tutorial/draggable_sheet.dart b/example/lib/tutorial/draggable_sheet.dart similarity index 100% rename from cookbook/lib/tutorial/draggable_sheet.dart rename to example/lib/tutorial/draggable_sheet.dart diff --git a/cookbook/lib/tutorial/extent_driven_animation.dart b/example/lib/tutorial/extent_driven_animation.dart similarity index 100% rename from cookbook/lib/tutorial/extent_driven_animation.dart rename to example/lib/tutorial/extent_driven_animation.dart diff --git a/cookbook/lib/tutorial/imperative_modal_sheet.dart b/example/lib/tutorial/imperative_modal_sheet.dart similarity index 100% rename from cookbook/lib/tutorial/imperative_modal_sheet.dart rename to example/lib/tutorial/imperative_modal_sheet.dart diff --git a/cookbook/lib/tutorial/imperative_navigation_sheet.dart b/example/lib/tutorial/imperative_navigation_sheet.dart similarity index 100% rename from cookbook/lib/tutorial/imperative_navigation_sheet.dart rename to example/lib/tutorial/imperative_navigation_sheet.dart diff --git a/cookbook/lib/tutorial/ios_style_declarative_modal_navigation_sheet.dart b/example/lib/tutorial/ios_style_declarative_modal_navigation_sheet.dart similarity index 100% rename from cookbook/lib/tutorial/ios_style_declarative_modal_navigation_sheet.dart rename to example/lib/tutorial/ios_style_declarative_modal_navigation_sheet.dart diff --git a/cookbook/lib/tutorial/keyboard_dismiss_behavior.dart b/example/lib/tutorial/keyboard_dismiss_behavior.dart similarity index 100% rename from cookbook/lib/tutorial/keyboard_dismiss_behavior.dart rename to example/lib/tutorial/keyboard_dismiss_behavior.dart diff --git a/cookbook/lib/tutorial/navigation_sheet_and_keyboard.dart b/example/lib/tutorial/navigation_sheet_and_keyboard.dart similarity index 100% rename from cookbook/lib/tutorial/navigation_sheet_and_keyboard.dart rename to example/lib/tutorial/navigation_sheet_and_keyboard.dart diff --git a/cookbook/lib/tutorial/scrollable_pageview_sheet.dart b/example/lib/tutorial/scrollable_pageview_sheet.dart similarity index 100% rename from cookbook/lib/tutorial/scrollable_pageview_sheet.dart rename to example/lib/tutorial/scrollable_pageview_sheet.dart diff --git a/cookbook/lib/tutorial/scrollable_sheet.dart b/example/lib/tutorial/scrollable_sheet.dart similarity index 100% rename from cookbook/lib/tutorial/scrollable_sheet.dart rename to example/lib/tutorial/scrollable_sheet.dart diff --git a/cookbook/lib/tutorial/sheet_content_scaffold.dart b/example/lib/tutorial/sheet_content_scaffold.dart similarity index 100% rename from cookbook/lib/tutorial/sheet_content_scaffold.dart rename to example/lib/tutorial/sheet_content_scaffold.dart diff --git a/cookbook/lib/tutorial/sheet_controller.dart b/example/lib/tutorial/sheet_controller.dart similarity index 100% rename from cookbook/lib/tutorial/sheet_controller.dart rename to example/lib/tutorial/sheet_controller.dart diff --git a/cookbook/lib/tutorial/sheet_draggable.dart b/example/lib/tutorial/sheet_draggable.dart similarity index 100% rename from cookbook/lib/tutorial/sheet_draggable.dart rename to example/lib/tutorial/sheet_draggable.dart diff --git a/cookbook/lib/tutorial/sheet_physics.dart b/example/lib/tutorial/sheet_physics.dart similarity index 100% rename from cookbook/lib/tutorial/sheet_physics.dart rename to example/lib/tutorial/sheet_physics.dart diff --git a/cookbook/pubspec.lock b/example/pubspec.lock similarity index 99% rename from cookbook/pubspec.lock rename to example/pubspec.lock index 49ad1536..dcbd692b 100644 --- a/cookbook/pubspec.lock +++ b/example/pubspec.lock @@ -192,10 +192,10 @@ packages: smooth_sheets: dependency: "direct main" description: - path: "../package" + path: ".." relative: true source: path - version: "0.8.2" + version: "0.9.3" source_span: dependency: transitive description: diff --git a/cookbook/pubspec.yaml b/example/pubspec.yaml similarity index 94% rename from cookbook/pubspec.yaml rename to example/pubspec.yaml index ae76337d..113f14c9 100644 --- a/cookbook/pubspec.yaml +++ b/example/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: go_router: ^12.1.3 smooth_sheets: - path: ../package + path: ../ dev_dependencies: flutter_test: diff --git a/package/lib/smooth_sheets.dart b/lib/smooth_sheets.dart similarity index 100% rename from package/lib/smooth_sheets.dart rename to lib/smooth_sheets.dart diff --git a/package/lib/src/draggable/draggable.dart b/lib/src/draggable/draggable.dart similarity index 100% rename from package/lib/src/draggable/draggable.dart rename to lib/src/draggable/draggable.dart diff --git a/package/lib/src/draggable/draggable_sheet.dart b/lib/src/draggable/draggable_sheet.dart similarity index 100% rename from package/lib/src/draggable/draggable_sheet.dart rename to lib/src/draggable/draggable_sheet.dart diff --git a/package/lib/src/draggable/draggable_sheet_extent.dart b/lib/src/draggable/draggable_sheet_extent.dart similarity index 100% rename from package/lib/src/draggable/draggable_sheet_extent.dart rename to lib/src/draggable/draggable_sheet_extent.dart diff --git a/package/lib/src/draggable/draggable_sheet_extent_scope.dart b/lib/src/draggable/draggable_sheet_extent_scope.dart similarity index 100% rename from package/lib/src/draggable/draggable_sheet_extent_scope.dart rename to lib/src/draggable/draggable_sheet_extent_scope.dart diff --git a/package/lib/src/draggable/sheet_draggable.dart b/lib/src/draggable/sheet_draggable.dart similarity index 100% rename from package/lib/src/draggable/sheet_draggable.dart rename to lib/src/draggable/sheet_draggable.dart diff --git a/package/lib/src/foundation/extent_driven_animation.dart b/lib/src/foundation/extent_driven_animation.dart similarity index 100% rename from package/lib/src/foundation/extent_driven_animation.dart rename to lib/src/foundation/extent_driven_animation.dart diff --git a/package/lib/src/foundation/foundation.dart b/lib/src/foundation/foundation.dart similarity index 100% rename from package/lib/src/foundation/foundation.dart rename to lib/src/foundation/foundation.dart diff --git a/package/lib/src/foundation/keyboard_dismissible.dart b/lib/src/foundation/keyboard_dismissible.dart similarity index 100% rename from package/lib/src/foundation/keyboard_dismissible.dart rename to lib/src/foundation/keyboard_dismissible.dart diff --git a/package/lib/src/foundation/sheet_activity.dart b/lib/src/foundation/sheet_activity.dart similarity index 100% rename from package/lib/src/foundation/sheet_activity.dart rename to lib/src/foundation/sheet_activity.dart diff --git a/package/lib/src/foundation/sheet_content_scaffold.dart b/lib/src/foundation/sheet_content_scaffold.dart similarity index 100% rename from package/lib/src/foundation/sheet_content_scaffold.dart rename to lib/src/foundation/sheet_content_scaffold.dart diff --git a/package/lib/src/foundation/sheet_context.dart b/lib/src/foundation/sheet_context.dart similarity index 100% rename from package/lib/src/foundation/sheet_context.dart rename to lib/src/foundation/sheet_context.dart diff --git a/package/lib/src/foundation/sheet_controller.dart b/lib/src/foundation/sheet_controller.dart similarity index 100% rename from package/lib/src/foundation/sheet_controller.dart rename to lib/src/foundation/sheet_controller.dart diff --git a/package/lib/src/foundation/sheet_drag.dart b/lib/src/foundation/sheet_drag.dart similarity index 100% rename from package/lib/src/foundation/sheet_drag.dart rename to lib/src/foundation/sheet_drag.dart diff --git a/package/lib/src/foundation/sheet_extent.dart b/lib/src/foundation/sheet_extent.dart similarity index 100% rename from package/lib/src/foundation/sheet_extent.dart rename to lib/src/foundation/sheet_extent.dart diff --git a/package/lib/src/foundation/sheet_extent_scope.dart b/lib/src/foundation/sheet_extent_scope.dart similarity index 100% rename from package/lib/src/foundation/sheet_extent_scope.dart rename to lib/src/foundation/sheet_extent_scope.dart diff --git a/package/lib/src/foundation/sheet_gesture_tamperer.dart b/lib/src/foundation/sheet_gesture_tamperer.dart similarity index 100% rename from package/lib/src/foundation/sheet_gesture_tamperer.dart rename to lib/src/foundation/sheet_gesture_tamperer.dart diff --git a/package/lib/src/foundation/sheet_notification.dart b/lib/src/foundation/sheet_notification.dart similarity index 100% rename from package/lib/src/foundation/sheet_notification.dart rename to lib/src/foundation/sheet_notification.dart diff --git a/package/lib/src/foundation/sheet_physics.dart b/lib/src/foundation/sheet_physics.dart similarity index 100% rename from package/lib/src/foundation/sheet_physics.dart rename to lib/src/foundation/sheet_physics.dart diff --git a/package/lib/src/foundation/sheet_status.dart b/lib/src/foundation/sheet_status.dart similarity index 100% rename from package/lib/src/foundation/sheet_status.dart rename to lib/src/foundation/sheet_status.dart diff --git a/package/lib/src/foundation/sheet_theme.dart b/lib/src/foundation/sheet_theme.dart similarity index 100% rename from package/lib/src/foundation/sheet_theme.dart rename to lib/src/foundation/sheet_theme.dart diff --git a/package/lib/src/foundation/sheet_viewport.dart b/lib/src/foundation/sheet_viewport.dart similarity index 100% rename from package/lib/src/foundation/sheet_viewport.dart rename to lib/src/foundation/sheet_viewport.dart diff --git a/package/lib/src/internal/double_utils.dart b/lib/src/internal/double_utils.dart similarity index 100% rename from package/lib/src/internal/double_utils.dart rename to lib/src/internal/double_utils.dart diff --git a/package/lib/src/internal/float_comp.dart b/lib/src/internal/float_comp.dart similarity index 100% rename from package/lib/src/internal/float_comp.dart rename to lib/src/internal/float_comp.dart diff --git a/package/lib/src/internal/monodrag.dart b/lib/src/internal/monodrag.dart similarity index 100% rename from package/lib/src/internal/monodrag.dart rename to lib/src/internal/monodrag.dart diff --git a/package/lib/src/internal/transition_observer.dart b/lib/src/internal/transition_observer.dart similarity index 100% rename from package/lib/src/internal/transition_observer.dart rename to lib/src/internal/transition_observer.dart diff --git a/package/lib/src/modal/cupertino.dart b/lib/src/modal/cupertino.dart similarity index 100% rename from package/lib/src/modal/cupertino.dart rename to lib/src/modal/cupertino.dart diff --git a/package/lib/src/modal/modal.dart b/lib/src/modal/modal.dart similarity index 100% rename from package/lib/src/modal/modal.dart rename to lib/src/modal/modal.dart diff --git a/package/lib/src/modal/modal_sheet.dart b/lib/src/modal/modal_sheet.dart similarity index 100% rename from package/lib/src/modal/modal_sheet.dart rename to lib/src/modal/modal_sheet.dart diff --git a/package/lib/src/navigation/navigation.dart b/lib/src/navigation/navigation.dart similarity index 100% rename from package/lib/src/navigation/navigation.dart rename to lib/src/navigation/navigation.dart diff --git a/package/lib/src/navigation/navigation_route.dart b/lib/src/navigation/navigation_route.dart similarity index 100% rename from package/lib/src/navigation/navigation_route.dart rename to lib/src/navigation/navigation_route.dart diff --git a/package/lib/src/navigation/navigation_routes.dart b/lib/src/navigation/navigation_routes.dart similarity index 100% rename from package/lib/src/navigation/navigation_routes.dart rename to lib/src/navigation/navigation_routes.dart diff --git a/package/lib/src/navigation/navigation_sheet.dart b/lib/src/navigation/navigation_sheet.dart similarity index 100% rename from package/lib/src/navigation/navigation_sheet.dart rename to lib/src/navigation/navigation_sheet.dart diff --git a/package/lib/src/navigation/navigation_sheet_activity.dart b/lib/src/navigation/navigation_sheet_activity.dart similarity index 100% rename from package/lib/src/navigation/navigation_sheet_activity.dart rename to lib/src/navigation/navigation_sheet_activity.dart diff --git a/package/lib/src/navigation/navigation_sheet_extent.dart b/lib/src/navigation/navigation_sheet_extent.dart similarity index 100% rename from package/lib/src/navigation/navigation_sheet_extent.dart rename to lib/src/navigation/navigation_sheet_extent.dart diff --git a/package/lib/src/navigation/navigation_sheet_extent_scope.dart b/lib/src/navigation/navigation_sheet_extent_scope.dart similarity index 100% rename from package/lib/src/navigation/navigation_sheet_extent_scope.dart rename to lib/src/navigation/navigation_sheet_extent_scope.dart diff --git a/package/lib/src/navigation/navigation_sheet_viewport.dart b/lib/src/navigation/navigation_sheet_viewport.dart similarity index 100% rename from package/lib/src/navigation/navigation_sheet_viewport.dart rename to lib/src/navigation/navigation_sheet_viewport.dart diff --git a/package/lib/src/scrollable/scrollable.dart b/lib/src/scrollable/scrollable.dart similarity index 100% rename from package/lib/src/scrollable/scrollable.dart rename to lib/src/scrollable/scrollable.dart diff --git a/package/lib/src/scrollable/scrollable_sheet.dart b/lib/src/scrollable/scrollable_sheet.dart similarity index 100% rename from package/lib/src/scrollable/scrollable_sheet.dart rename to lib/src/scrollable/scrollable_sheet.dart diff --git a/package/lib/src/scrollable/scrollable_sheet_activity.dart b/lib/src/scrollable/scrollable_sheet_activity.dart similarity index 100% rename from package/lib/src/scrollable/scrollable_sheet_activity.dart rename to lib/src/scrollable/scrollable_sheet_activity.dart diff --git a/package/lib/src/scrollable/scrollable_sheet_extent.dart b/lib/src/scrollable/scrollable_sheet_extent.dart similarity index 100% rename from package/lib/src/scrollable/scrollable_sheet_extent.dart rename to lib/src/scrollable/scrollable_sheet_extent.dart diff --git a/package/lib/src/scrollable/scrollable_sheet_extent_scope.dart b/lib/src/scrollable/scrollable_sheet_extent_scope.dart similarity index 100% rename from package/lib/src/scrollable/scrollable_sheet_extent_scope.dart rename to lib/src/scrollable/scrollable_sheet_extent_scope.dart diff --git a/package/lib/src/scrollable/scrollable_sheet_physics.dart b/lib/src/scrollable/scrollable_sheet_physics.dart similarity index 100% rename from package/lib/src/scrollable/scrollable_sheet_physics.dart rename to lib/src/scrollable/scrollable_sheet_physics.dart diff --git a/package/lib/src/scrollable/sheet_content_scroll_activity.dart b/lib/src/scrollable/sheet_content_scroll_activity.dart similarity index 100% rename from package/lib/src/scrollable/sheet_content_scroll_activity.dart rename to lib/src/scrollable/sheet_content_scroll_activity.dart diff --git a/package/lib/src/scrollable/sheet_content_scroll_position.dart b/lib/src/scrollable/sheet_content_scroll_position.dart similarity index 100% rename from package/lib/src/scrollable/sheet_content_scroll_position.dart rename to lib/src/scrollable/sheet_content_scroll_position.dart diff --git a/package/lib/src/scrollable/sheet_scrollable.dart b/lib/src/scrollable/sheet_scrollable.dart similarity index 100% rename from package/lib/src/scrollable/sheet_scrollable.dart rename to lib/src/scrollable/sheet_scrollable.dart diff --git a/docs/migration-guide-0.3.x.md b/migrations/migration-guide-0.3.x.md similarity index 100% rename from docs/migration-guide-0.3.x.md rename to migrations/migration-guide-0.3.x.md diff --git a/docs/migration-guide-0.4.x.md b/migrations/migration-guide-0.4.x.md similarity index 100% rename from docs/migration-guide-0.4.x.md rename to migrations/migration-guide-0.4.x.md diff --git a/docs/migration-guide-0.5.x.md b/migrations/migration-guide-0.5.x.md similarity index 100% rename from docs/migration-guide-0.5.x.md rename to migrations/migration-guide-0.5.x.md diff --git a/docs/migration-guide-0.6.x.md b/migrations/migration-guide-0.6.x.md similarity index 100% rename from docs/migration-guide-0.6.x.md rename to migrations/migration-guide-0.6.x.md diff --git a/docs/migration-guide-0.7.x.md b/migrations/migration-guide-0.7.x.md similarity index 100% rename from docs/migration-guide-0.7.x.md rename to migrations/migration-guide-0.7.x.md diff --git a/docs/migration-guide-0.8.x.md b/migrations/migration-guide-0.8.x.md similarity index 100% rename from docs/migration-guide-0.8.x.md rename to migrations/migration-guide-0.8.x.md diff --git a/docs/migration-guide-0.9.x.md b/migrations/migration-guide-0.9.x.md similarity index 100% rename from docs/migration-guide-0.9.x.md rename to migrations/migration-guide-0.9.x.md diff --git a/package/.gitignore b/package/.gitignore deleted file mode 100644 index 6bc4ab47..00000000 --- a/package/.gitignore +++ /dev/null @@ -1,24 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ -migrate_working_dir/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# Flutter/Dart/Pub related -/pubspec.lock -**/doc/api/ -.dart_tool/ -.packages -build/ diff --git a/package/.metadata b/package/.metadata deleted file mode 100644 index fa347fc6..00000000 --- a/package/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: f468f3366c26a5092eb964a230ce7892fda8f2f8 - channel: stable - -project_type: package diff --git a/package/LICENSE b/package/LICENSE deleted file mode 100644 index 0e89d180..00000000 --- a/package/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2023 Daichi Fujita - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/package/README.md b/package/README.md deleted file mode 100644 index ed516365..00000000 --- a/package/README.md +++ /dev/null @@ -1,387 +0,0 @@ -# smooth_sheets - -[![GitHub Repo stars](https://img.shields.io/github/stars/fujidaiti/smooth_sheets)](https://github.com/fujidaiti/smooth_sheets) [![GitHub last commit (branch)](https://img.shields.io/github/last-commit/fujidaiti/smooth_sheets/main?logo=git)](https://github.com/fujidaiti/smooth_sheets/commits/main/) [![Pub Version](https://img.shields.io/pub/v/smooth_sheets)](https://pub.dev/packages/smooth_sheets) ![Pub Likes](https://img.shields.io/pub/likes/smooth_sheets) ![Pub Points](https://img.shields.io/pub/points/smooth_sheets) ![Pub Popularity](https://img.shields.io/pub/popularity/smooth_sheets) - - -**smooth_sheets** offers modal and persistent sheet widgets for Flutter apps. The key features are: - -- **Smooth motion**: The sheets respond to user interaction with smooth, graceful motion. -- **Highly flexible**: Not restricted to a specific design. Both modal and persistent styles are supp/orted, as well as scrollable and non-scrollable widgets. -- **Supports nested navigation**: A sheet is able to have multiple pages and to navigate between the pages with motion animation for transitions. -- **Works with imperative & declarative Navigator API**: No special navigation mechanism is required. The traditional ways such as `Navigator.push` is supported and it works with Navigator 2.0 packages like go_route as well. -- **iOS flavor**: The modal sheets in the style of iOS 15 are supported. - -
- -**CAUTION🚨** - -This library is currently in the experimental stage. The API may undergo changes without prior notice. For documentation of the latest published version, please visit the [package site](https://pub.dev/packages/smooth_sheets) on pub.dev. - -
- -## Migration guide - -- [0.8.x to 0.9.x](https://github.com/fujidaiti/smooth_sheets/blob/main/docs/migration-guide-0.9.x.md) 🆕 -- [0.7.x to 0.8.x](https://github.com/fujidaiti/smooth_sheets/blob/main/docs/migration-guide-0.8.x.md) - -See [here](https://github.com/fujidaiti/smooth_sheets/blob/main/docs/) for older versions. - -
- -## Showcases - - - - - - - - - - - - - - - - - - -
-

AI Playlist Generator

-

An AI assistant that helps create a music playlist based on the user's preferences. See the cookbook for more details.

-

Key components:

-
    -
  • NavigationSheet
  • -
  • ModalSheetPage
  • -
  • DraggableNavigationSheetPage
  • -
  • ScrollableNavigationSheetPage
  • -
  • SheetDismissible
  • -
-
-

Safari app

-

A practical example of ios-style modal sheets. See the cookbook for more details.

-

Key components:

-
    -
  • CupertinoStackedTransition
  • -
  • CupertinoModalSheetRoute
  • -
-
-

Airbnb mobile app clone

-

A partial clone of the Airbnb mobile app. The user can drag the house list down to reveal the map behind it. See the cookbook for more details.

-

Key components:

-
    -
  • ScrollableSheet
  • -
  • SheetPhysics
  • -
  • SheetController
  • -
  • ExtentDrivenAnimation
  • -
-
-

Todo List

-

A simple Todo app that shows how a sheet handles the on-screen keyboard. See the cookbook for more details.

-

Used components:

-
    -
  • ScrollableSheet
  • -
  • SheetContentScaffold
  • -
  • SheetKeyboardDismissBehavior
  • -
  • SheetDismissible
  • -
  • StickyBottomBarVisibility
  • -
-
- - - - -
- -## Why use this? - -There are few packages on pub.dev that supports nested navigation with motion animation for page transitions. One of the great choices for this usecase is [wolt_modal_sheet](https://github.com/woltapp/wolt_modal_sheet), which this package is inspired by. Although smooth_sheet has similar features with wolt_modal_sheet, it does not intended to be a replacement of that package. Here is some differences between those 2 packages: - -| | wolt_modal_sheet | smooth_sheets | -| :--------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | -| Design | Based on Wolt's [design guideline](https://careers.wolt.com/en/blog/tech/an-overview-of-the-multi-page-scrollable-bottom-sheet-ui-design) | Not restricted to a specific design, fully customizable | -| Navigation mechanism | [Manage the page index in ValueNotifier](https://github.com/woltapp/wolt_modal_sheet#usage) | Works with built-in Navigator API (both of imperative and declarative) | -| Scrollable content | [Supported](https://github.com/woltapp/wolt_modal_sheet#scrollable-content) | Supported | -| Persistent sheets | Not supported | Supported | -| Screen size adaptation | [The sheet appears as a dialog on large screens](https://github.com/woltapp/wolt_modal_sheet#responsive-design) | Not supported | - -
- -## Usage - -Several resources are available for learning the functionalities of this package. - -- Tutorials: See [cookbook/lib/tutorial/](https://github.com/fujidaiti/smooth_sheets/tree/main/cookbook/lib/tutorial) to learn the basic usage of the core components. -- Showcases: More practical examples are available in [cookbook/lib/showcase/](https://github.com/fujidaiti/smooth_sheets/tree/main/cookbook/lib/showcase). -- Documentation: WORK IN PROGRESS! Please see the source code for a while. - -
- -## Ingredients - -This section provides descriptions for each core component and links to related resources for further learning. - -
- -### Extent - -Extent represents the visible height of the sheet. It is used in a variety of situations, for example, to specify how much area of a sheet is initially visible at first build, or to limit the range of sheet dragging. - -
- -### DraggableSheet - -
- -
- - -A sheet that can be dragged. The height will be equal to the content. The behavior of the sheet when over-dragged or under-dragged is determined by [SheetPhysics](#sheetphysics). Note that this widget does not work with scrollable widgets. Instead, use [ScrollableSheet](#scrollablesheet) for this usecase. - - - -See also: - -- [draggable_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/draggable_sheet.dart) for basic usage. - -
- -### ScrollableSheet - -
- -
- - -A sheet that is similar to [DraggableSheet](#draggablesheet), but specifically designed to be integrated with scrollable widgets. It will begin to be dragged when the content is over-scrolled or under-scrolled. - - - -See also: - -- [scrollable_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/scrollable_sheet.dart) for basic usage. - -
- -### NavigationSheet - -
- -
- - -A sheet that is able to have multiple pages and performs graceful motion animation when page transitions. It supports both of imperative Navigator API such as `Navigator.push`, and declarative API (Navigator 2.0). - - - -See also: - -- [declarative_navigation_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/declarative_navigation_sheet.dart), tutorial of integration with Navigator 2.0 using [go_router](https://pub.dev/packages/go_router) package. -- [imperative_navigation_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/imperative_navigation_sheet.dart), a tutorial of integration with imperative Navigator API. - -
- -### ModalSheets - -
- -
- - - - -A sheet can be displayed as a modal sheet using ModalSheetRoute for imperative navigation, or ModalSheetPage for declarative navigation. To enable the *swipe-to-dismiss* action, which allows the user to dismiss the sheet by a swiping-down gesture, set `swipeDismissible` to true. - -
- -
- -Furthermore, [the modal sheets in the style of iOS 15](https://medium.com/surf-dev/bottomsheet-in-ios-15-uisheetpresentationcontroller-and-its-capabilities-5e913661c9f) are also supported. For imperative navigation, use CupertinoModalSheetRoute, and for declarative navigation, use CupertinoModalSheetPage, respectively. - - - - -See also: - -- [declarative_modal_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/declarative_modal_sheet.dart), a tutorial of integration with declarative navigation using [go_router](https://pub.dev/packages/go_router) package. -- [imperative_modal_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/imperative_modal_sheet.dart), a tutorial of integration with imperative Navigator API. -- [cupertino_modal_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/cupertino_modal_sheet.dart), a tutorial of iOS style modal sheets. -- [ios_style_declarative_modal_navigation_sheet.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/ios_style_declarative_modal_navigation_sheet.dart), an example of iOS-style modal NavigationSheet with go_router. -- [showcase/todo_list](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/showcase/todo_list), which uses SheetDismissible to show a confirmation dialog when the user tries to discard the todo editing sheet without saving the content. - -
- -### SheetPhysics - -
- -
- - -A physics determines how the sheet will behave when over-dragged or under-dragged, or when the user stops dragging. There are 3 predefined physics: - -- ClampingSheetPhysics: Prevents the sheet from reaching beyond the content bounds. -- BouncingSheetPhysics: Allows the sheet to go beyond the content bounds, but then bounce the sheet back to the edge of those bounds. Use [BouncingBehavior](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/BouncingBehavior-class.html) and its subclasses to tweak the bouncing behavior. -- SnappingSheetPhysics: Automatically snaps the sheet to a certain extent when the user stops dragging. - -These physics can be combined to create more complex behavior (e.g. bouncing behavior + snapping behavior). - - - -See also: - -- [sheet_physics.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/sheet_physics.dart) for basic usage. -- [bouncing_behaviors.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/bouncing_behaviors.dart), which shows how to tweak the bouncing behavior of BouncingSheetPhysics. - -
- -### SheetController - -
- -
- - -Like [ScrollController](https://api.flutter.dev/flutter/widgets/ScrollController-class.html) for scrollable widget, the SheetController can be used to animate or observe the extent of a sheet. - - - -See also: - -- [sheet_controller.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/sheet_controller.dart) for basic usage. - -
- -### SheetContentScaffold - -
- -
- - -A special kind of [Scaffold](https://api.flutter.dev/flutter/material/Scaffold-class.html) designed for use in a sheet. It has slots for an app bar and a bottom bar, similar to Scaffold. However, it differs in that its height reduces to fit the content widget. - - - -See also: - -- [SheetContentScaffold](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/SheetContentScaffold-class.html), the API documentation. -- [BottomBarVisibility](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/BottomBarVisibility-class.html), which can be used to control the visibility of the bottom bar based on the sheet position. -- [tutorial/sheet_content_scaffold.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/sheet_content_scaffold.dart), which shows the basic usage of SheetContentScaffold. -- [tutorial/bottom_bar_visibility.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/bottom_bar_visibility.dart), which shows the basic usage of BottomBarVisibility widgets. - -
- -### SheetDraggable - -
- -
- -SheetDraggable enables its child widget to act as a drag handle for the sheet. Typically, you will want to use this widget when placing non-scrollable widget(s) in a [ScrollableSheet](#scrollablesheet), since it only works with scrollable widgets, so you can't drag the sheet by touching a non-scrollable area. Try removing SheetDraggable and you will see that the drag handle doesn't work as it should. -Note that SheetDraggable is not needed when using DraggableSheet since it implicitly wraps the child widget with SheetDraggable. - - - -See also: - -- [sheet_draggable.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/sheet_draggable.dart) for basic usage. - -
- -### ExtentDrivenAnimation - -
- -
- -It is easy to create sheet extent driven animations by using ExtentDrivenAnimation, a special kind of [Animation](https://api.flutter.dev/flutter/animation/Animation-class.html) whose value changes from 0 to 1 as the sheet extent changes from 'startExtent' to 'endExtent'. - - - -See also: - -- [extent_driven_animation](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/extent_driven_animation.dart) for basic usage. -- [airbnb_mobile_app.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/showcase/airbnb_mobile_app.dart), which show how ExtentDrivenAnimation can be used to hide the bottom navigation bar and a FAB when the sheet is dragged down, and to show them when the sheet is dragged up again. - -
- -### SheetNotification - -A sheet dispatches a [SheetNotification](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/SheetNotification-class.html) when its extent changes. This can be used to observe the extent of a descendant sheet from an ancestor widget. - -```dart -NotificationListener( - onNotification: (notification) { - debugPrint('${notification.metrics}'); - return false; - }, - child: DraggableSheet(...), -), -``` - - - -See also: - -- [SheetDragUpdateNotification](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/SheetDragUpdateNotification-class.html), which is dispatched when the sheet is dragged by the user. -- [SheetUpdateNotification](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/SheetUpdateNotification-class.html), which is dispatched when the sheet extent is updated by other than user interaction such as animation. -- [SheetOverflowNotification](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/SheetOverflowNotification-class.html), which is dispatched when the user tries to drag the sheet beyond its draggable bounds but the sheet has not changed its extent because its [SheetPhysics](#sheetphysics) does not allow it to be. -- [NotificationListener](https://api.flutter.dev/flutter/widgets/NotificationListener-class.html), which can be used to listen for the notifications in a subtree. - -
- -### SheetKeyboardDismissBehavior - -
- -
-
- -[SheetKeyboardDismissBehavior](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/SheetKeyboardDismissBehavior-class.html) determines when the sheet should dismiss the on-screen keyboard. This feature is similar to [ScrollViewKeyboardDismissBehavior](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/ScrollViewKeyboardDismissBehavior.html) for scrollable widgets. - -Although it is easy to create custom behaviors by implementing SheetKeyboardDismissBehavior interface, there are 3 types of predefined behaviors for convenience. - -- [DragSheetKeyboardDismissBehavior](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/DragSheetKeyboardDismissBehavior-class.html), which always dismisses the on-screen keyboard when the sheet is dragged. -- [DragDownSheetKeyboardDismissBehavior](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/DragDownSheetKeyboardDismissBehavior-class.html), which always dismisses the on-screen keyboard only when the sheet is dragged down. -- [DragUpSheetKeyboardDismissBehavior](https://pub.dev/documentation/smooth_sheets/latest/smooth_sheets/DragUpSheetKeyboardDismissBehavior-class.html), which always dismisses the on-screen keyboard only when the sheet is dragged up. - - - -See also: - -- [tutorial/keyboard_dismiss_behavior.dart](https://github.com/fujidaiti/smooth_sheets/blob/main/cookbook/lib/tutorial/keyboard_dismiss_behavior.dart) for basic usage. - -
- -## Questions - -If you have any questions, feel free to ask them on [the discussions page](https://github.com/fujidaiti/smooth_sheets/discussions). - -
- -## Contributing - -Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. - -If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". -Don't forget to give the project a star! Thanks again! - -1. Fork the Project -2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) -3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) -4. Push to the Branch (`git push origin feature/AmazingFeature`) -5. Open a Pull Request - -
- -## Links - -- [Roadmap](https://github.com/fujidaiti/smooth_sheets/issues?q=is%3Aissue+is%3Aopen+label%3A%22feature+request%22) -- [API Documentation](https://pub.dev/documentation/smooth_sheets/latest/) -- [pub.dev](https://pub.dev/packages/smooth_sheets) -- [norelease.dev](https://pub.dev/publishers/norelease.dev/packages) - -
- diff --git a/package/example/.metadata b/package/example/.metadata deleted file mode 100644 index a778330b..00000000 --- a/package/example/.metadata +++ /dev/null @@ -1,45 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: "d211f42860350d914a5ad8102f9ec32764dc6d06" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - - platform: android - create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - - platform: ios - create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - - platform: linux - create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - - platform: macos - create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - - platform: web - create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - - platform: windows - create_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - base_revision: d211f42860350d914a5ad8102f9ec32764dc6d06 - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/package/example/README.md b/package/example/README.md deleted file mode 100644 index 0e84df66..00000000 --- a/package/example/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Examples - -Many examples are available in the [cookbook](https://github.com/fujidaiti/smooth_sheets/tree/main/cookbook/lib). diff --git a/package/pubspec.yaml b/pubspec.yaml similarity index 92% rename from package/pubspec.yaml rename to pubspec.yaml index 215b675b..d29e7391 100644 --- a/package/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.9.3 repository: https://github.com/fujidaiti/smooth_sheets screenshots: - description: Practical examples of smooth_sheets. - path: resources/smooth-sheets-thumbnail.png + path: art/smooth-sheets-thumbnail.png topics: - ui - widget diff --git a/resources/cookbook-ai-playlist-generator.mp4 b/resources/cookbook-ai-playlist-generator.mp4 deleted file mode 100644 index c1dcf3b1..00000000 Binary files a/resources/cookbook-ai-playlist-generator.mp4 and /dev/null differ diff --git a/resources/cookbook-airbnb.mp4 b/resources/cookbook-airbnb.mp4 deleted file mode 100644 index 5f24e44a..00000000 Binary files a/resources/cookbook-airbnb.mp4 and /dev/null differ diff --git a/resources/cookbook-declarative-modal-sheet.mp4 b/resources/cookbook-declarative-modal-sheet.mp4 deleted file mode 100644 index 6c4e93d2..00000000 Binary files a/resources/cookbook-declarative-modal-sheet.mp4 and /dev/null differ diff --git a/resources/cookbook-declarative-navigation-sheet.mp4 b/resources/cookbook-declarative-navigation-sheet.mp4 deleted file mode 100644 index e85cff6a..00000000 Binary files a/resources/cookbook-declarative-navigation-sheet.mp4 and /dev/null differ diff --git a/resources/cookbook-draggable-sheet.mp4 b/resources/cookbook-draggable-sheet.mp4 deleted file mode 100644 index 0b5594ae..00000000 Binary files a/resources/cookbook-draggable-sheet.mp4 and /dev/null differ diff --git a/resources/cookbook-imperative-modal-sheet.mp4 b/resources/cookbook-imperative-modal-sheet.mp4 deleted file mode 100644 index 74577d96..00000000 Binary files a/resources/cookbook-imperative-modal-sheet.mp4 and /dev/null differ diff --git a/resources/cookbook-imperative-navigation-sheet.mp4 b/resources/cookbook-imperative-navigation-sheet.mp4 deleted file mode 100644 index 474cd81b..00000000 Binary files a/resources/cookbook-imperative-navigation-sheet.mp4 and /dev/null differ diff --git a/resources/cookbook-scrollable-sheet.mp4 b/resources/cookbook-scrollable-sheet.mp4 deleted file mode 100644 index 5199d008..00000000 Binary files a/resources/cookbook-scrollable-sheet.mp4 and /dev/null differ diff --git a/resources/cookbook-sheet-content-scaffold.mp4 b/resources/cookbook-sheet-content-scaffold.mp4 deleted file mode 100644 index c0d2983e..00000000 Binary files a/resources/cookbook-sheet-content-scaffold.mp4 and /dev/null differ diff --git a/resources/cookbook-sheet-controller.mp4 b/resources/cookbook-sheet-controller.mp4 deleted file mode 100644 index 6219eda0..00000000 Binary files a/resources/cookbook-sheet-controller.mp4 and /dev/null differ diff --git a/resources/cookbook-sheet-draggable.mp4 b/resources/cookbook-sheet-draggable.mp4 deleted file mode 100644 index ad396215..00000000 Binary files a/resources/cookbook-sheet-draggable.mp4 and /dev/null differ diff --git a/resources/cookbook-sheet-physics.mp4 b/resources/cookbook-sheet-physics.mp4 deleted file mode 100644 index 3d05a822..00000000 Binary files a/resources/cookbook-sheet-physics.mp4 and /dev/null differ diff --git a/scripts/copilot/pattern_checker_session.json b/scripts/copilot/pattern_checker_session.json deleted file mode 100644 index 7a992032..00000000 --- a/scripts/copilot/pattern_checker_session.json +++ /dev/null @@ -1,496 +0,0 @@ -{ - "requesterUsername": "fujidaiti", - "requesterAvatarIconUri": { - "$mid": 1, - "path": "/fujidaiti", - "scheme": "https", - "authority": "avatars.githubusercontent.com" - }, - "responderUsername": "GitHub Copilot", - "welcomeMessage": [ - "Hi **@fujidaiti**, how can I help you?" - ], - "requests": [ - { - "message": { - "parts": [ - { - "range": { - "start": 0, - "endExclusive": 1019 - }, - "editorRange": { - "startLineNumber": 1, - "startColumn": 1, - "endLineNumber": 13, - "endColumn": 120 - }, - "text": "Could you write a shell script which fails if specified words or patterns are found in local files? The inputs are:\n\nA list of patterns of local files (e.g. *.dart), which will be targets of this script.\nA list of disallowed words or patterns (regex), for which this script will fail if at least one of them is found in the target files.\nThis script must exit with 1 (error status) if any disallowed words or patterns are found in the target files, othwerwise, it must exist with 0. Make sure the all of the target files must be processed even if an problem is found within a file in the middle of the entier process.\n\nIn addition, this script must echo human friendly logs for each problem found in the process. Each log must contains the following information:\n\nFile name\nThe line number in which a disallowed word or a pattenrn is found\nA snippet of the single line in which the problem is found\n\nNote that this script must not modify the original files. It just scans them and prints diagnosis found in the process.", - "kind": "text" - } - ], - "text": "Could you write a shell script which fails if specified words or patterns are found in local files? The inputs are:\n\nA list of patterns of local files (e.g. *.dart), which will be targets of this script.\nA list of disallowed words or patterns (regex), for which this script will fail if at least one of them is found in the target files.\nThis script must exit with 1 (error status) if any disallowed words or patterns are found in the target files, othwerwise, it must exist with 0. Make sure the all of the target files must be processed even if an problem is found within a file in the middle of the entier process.\n\nIn addition, this script must echo human friendly logs for each problem found in the process. Each log must contains the following information:\n\nFile name\nThe line number in which a disallowed word or a pattenrn is found\nA snippet of the single line in which the problem is found\n\nNote that this script must not modify the original files. It just scans them and prints diagnosis found in the process." - }, - "response": [ - { - "value": "Here is a shell script that meets your requirements. This script uses `grep` to search for the disallowed patterns in the specified files. If a match is found, it prints the filename, line number, and the matching line. If any matches are found, the script exits with a status of 1.\n\n```bash\n#!/bin/bash\n\n# List of file patterns\nfile_patterns=(\"*.dart\")\n\n# List of disallowed words or patterns\ndisallowed_patterns=(\"pattern1\" \"pattern2\")\n\n# Flag to track if any disallowed pattern is found\nerror_found=0\n\n# Loop over each file pattern\nfor file_pattern in \"${file_patterns[@]}\"; do\n # Find files matching the pattern\n files=$(find . -name \"$file_pattern\")\n\n # Loop over each file\n for file in $files; do\n # Loop over each disallowed pattern\n for pattern in \"${disallowed_patterns[@]}\"; do\n # Search for the pattern in the file\n result=$(grep -n \"$pattern\" \"$file\")\n\n # If a match is found\n if [[ $result ]]; then\n # Set the error flag\n error_found=1\n\n # Print the filename, line number, and matching line\n echo \"Disallowed pattern found in file: $file\"\n echo \"$result\"\n fi\n done\n done\ndone\n\n# If any disallowed pattern was found, exit with status 1\nif [[ $error_found -eq 1 ]]; then\n exit 1\nfi\n\n# If no disallowed pattern was found, exit with status 0\nexit 0\n```\n\nYou can customize the `file_patterns` and `disallowed_patterns` arrays as needed. This script will recursively search for files in the current directory and its subdirectories. If you want to search in a different directory, you can change the `.` in the `find` command to the path of the directory you want to search in.", - "isTrusted": false, - "supportThemeIcons": false, - "supportHtml": false - } - ], - "followups": [ - { - "kind": "reply", - "message": "How can I exclude certain directories from the file search in the shell script?", - "title": "How can I exclude certain directories from the file search in the shell script?" - } - ], - "isCanceled": false, - "agent": { - "id": "", - "metadata": { - "description": "", - "fullName": "GitHub Copilot", - "hasSlashCommands": true, - "hasFollowups": true, - "isDefault": true, - "helpTextPrefix": "You can ask me general programming questions, or chat with the following agents which have specialized expertise and can perform actions:", - "helpTextPostfix": { - "value": "To have a great conversation, ask me questions as if I was a real programmer:\n\n* **Show me the code** you want to talk about by having the files open and selecting the most important lines.\n* **Make refinements** by asking me follow-up questions, adding clarifications, providing errors, etc.\n* **Review my suggested code** and tell me about issues or improvements, so I can iterate on it.\n\nYou can also ask me questions about your editor selection by [starting an inline chat session](command:inlineChat.start).\n\nLearn more about [GitHub Copilot](https://docs.github.com/copilot/getting-started-with-github-copilot?tool=vscode) in [Visual Studio Code](https://code.visualstudio.com/docs/editor/artificial-intelligence).", - "isTrusted": { - "enabledCommands": [ - "inlineChat.start" - ] - }, - "supportThemeIcons": false, - "supportHtml": false, - "uris": { - "command:inlineChat.start": { - "$mid": 1, - "path": "inlineChat.start", - "scheme": "command" - }, - "https://docs.github.com/copilot/getting-started-with-github-copilot?tool=vscode": { - "$mid": 1, - "path": "/copilot/getting-started-with-github-copilot", - "scheme": "https", - "authority": "docs.github.com", - "query": "tool=vscode" - }, - "https://code.visualstudio.com/docs/editor/artificial-intelligence": { - "$mid": 1, - "path": "/docs/editor/artificial-intelligence", - "scheme": "https", - "authority": "code.visualstudio.com" - } - } - }, - "supportIssueReporting": false - } - }, - "contentReferences": [] - }, - { - "message": { - "parts": [ - { - "range": { - "start": 0, - "endExclusive": 135 - }, - "editorRange": { - "startLineNumber": 1, - "startColumn": 1, - "endLineNumber": 1, - "endColumn": 136 - }, - "text": "Nice! Could you modify the script so that we can get the target file patterns and the disallowed patterns from the script's argumenets?", - "kind": "text" - } - ], - "text": "Nice! Could you modify the script so that we can get the target file patterns and the disallowed patterns from the script's argumenets?" - }, - "response": [ - { - "value": "Sure, here's how you can modify the script to accept the target file patterns and disallowed patterns as arguments. The first argument will be the target file pattern, and all subsequent arguments will be treated as disallowed patterns.\n\n```bash\n#!/bin/bash\n\n# File pattern from the first argument\nfile_pattern=$1\n\n# Disallowed patterns from the rest of the arguments\ndisallowed_patterns=${@:2}\n\n# Flag to track if any disallowed pattern is found\nerror_found=0\n\n# Find files matching the pattern\nfiles=$(find . -name \"$file_pattern\")\n\n# Loop over each file\nfor file in $files; do\n # Loop over each disallowed pattern\n for pattern in $disallowed_patterns; do\n # Search for the pattern in the file\n result=$(grep -n \"$pattern\" \"$file\")\n\n # If a match is found\n if [[ $result ]]; then\n # Set the error flag\n error_found=1\n\n # Print the filename, line number, and matching line\n echo \"Disallowed pattern found in file: $file\"\n echo \"$result\"\n fi\n done\ndone\n\n# If any disallowed pattern was found, exit with status 1\nif [[ $error_found -eq 1 ]]; then\n exit 1\nfi\n\n# If no disallowed pattern was found, exit with status 0\nexit 0\n```\n\nYou can run this script with the file pattern as the first argument and the disallowed patterns as the rest of the arguments. For example:\n\n```bash\n./script.sh \"*.dart\" \"pattern1\" \"pattern2\"\n```", - "isTrusted": false, - "supportThemeIcons": false, - "supportHtml": false - } - ], - "followups": [ - { - "kind": "reply", - "message": "How can I pass multiple file patterns to the shell script?", - "title": "How can I pass multiple file patterns to the shell script?" - } - ], - "isCanceled": false, - "agent": { - "id": "", - "metadata": { - "description": "", - "fullName": "GitHub Copilot", - "hasSlashCommands": true, - "hasFollowups": true, - "isDefault": true, - "helpTextPrefix": "You can ask me general programming questions, or chat with the following agents which have specialized expertise and can perform actions:", - "helpTextPostfix": { - "value": "To have a great conversation, ask me questions as if I was a real programmer:\n\n* **Show me the code** you want to talk about by having the files open and selecting the most important lines.\n* **Make refinements** by asking me follow-up questions, adding clarifications, providing errors, etc.\n* **Review my suggested code** and tell me about issues or improvements, so I can iterate on it.\n\nYou can also ask me questions about your editor selection by [starting an inline chat session](command:inlineChat.start).\n\nLearn more about [GitHub Copilot](https://docs.github.com/copilot/getting-started-with-github-copilot?tool=vscode) in [Visual Studio Code](https://code.visualstudio.com/docs/editor/artificial-intelligence).", - "isTrusted": { - "enabledCommands": [ - "inlineChat.start" - ] - }, - "supportThemeIcons": false, - "supportHtml": false, - "uris": { - "command:inlineChat.start": { - "$mid": 1, - "path": "inlineChat.start", - "scheme": "command" - }, - "https://docs.github.com/copilot/getting-started-with-github-copilot?tool=vscode": { - "$mid": 1, - "path": "/copilot/getting-started-with-github-copilot", - "scheme": "https", - "authority": "docs.github.com", - "query": "tool=vscode" - }, - "https://code.visualstudio.com/docs/editor/artificial-intelligence": { - "$mid": 1, - "path": "/docs/editor/artificial-intelligence", - "scheme": "https", - "authority": "code.visualstudio.com" - } - } - }, - "supportIssueReporting": false - } - }, - "contentReferences": [] - }, - { - "message": { - "parts": [ - { - "range": { - "start": 0, - "endExclusive": 41 - }, - "editorRange": { - "startLineNumber": 1, - "startColumn": 1, - "endLineNumber": 1, - "endColumn": 42 - }, - "text": "How can I specify multiple file patterns?", - "kind": "text" - } - ], - "text": "How can I specify multiple file patterns?" - }, - "response": [ - { - "value": "To specify multiple file patterns, you can pass them as separate arguments and modify the script to treat each argument before the disallowed patterns as a file pattern. You'll need to specify a delimiter argument (like `--`) to separate the file patterns from the disallowed patterns.\n\nHere's how you can modify the script:\n\n```bash\n#!/bin/bash\n\n# Arrays to hold file patterns and disallowed patterns\nfile_patterns=()\ndisallowed_patterns=()\n\n# Flag to track if we're still reading file patterns\nreading_patterns=1\n\n# Loop over each argument\nfor arg in \"$@\"; do\n # If we encounter the delimiter, stop reading file patterns\n if [[ $arg == \"--\" ]]; then\n reading_patterns=0\n # If we're still reading file patterns\n elif [[ $reading_patterns -eq 1 ]]; then\n file_patterns+=(\"$arg\")\n # If we're reading disallowed patterns\n else\n disallowed_patterns+=(\"$arg\")\n fi\ndone\n\n# Flag to track if any disallowed pattern is found\nerror_found=0\n\n# Loop over each file pattern\nfor file_pattern in \"${file_patterns[@]}\"; do\n # Find files matching the pattern\n files=$(find . -name \"$file_pattern\")\n\n # Loop over each file\n for file in $files; do\n # Loop over each disallowed pattern\n for pattern in \"${disallowed_patterns[@]}\"; do\n # Search for the pattern in the file\n result=$(grep -n \"$pattern\" \"$file\")\n\n # If a match is found\n if [[ $result ]]; then\n # Set the error flag\n error_found=1\n\n # Print the filename, line number, and matching line\n echo \"Disallowed pattern found in file: $file\"\n echo \"$result\"\n fi\n done\n done\ndone\n\n# If any disallowed pattern was found, exit with status 1\nif [[ $error_found -eq 1 ]]; then\n exit 1\nfi\n\n# If no disallowed pattern was found, exit with status 0\nexit 0\n```\n\nYou can run this script with the file patterns as the first set of arguments, the delimiter `--`, and the disallowed patterns as the rest of the arguments. For example:\n\n```bash\n./script.sh \"*.dart\" \"*.txt\" \"--\" \"pattern1\" \"pattern2\"\n```", - "isTrusted": false, - "supportThemeIcons": false, - "supportHtml": false - } - ], - "followups": [ - { - "kind": "reply", - "message": "How can I exclude certain directories from the file search in the shell script?", - "title": "How can I exclude certain directories from the file search in the shell script?" - } - ], - "isCanceled": false, - "agent": { - "id": "", - "metadata": { - "description": "", - "fullName": "GitHub Copilot", - "hasSlashCommands": true, - "hasFollowups": true, - "isDefault": true, - "helpTextPrefix": "You can ask me general programming questions, or chat with the following agents which have specialized expertise and can perform actions:", - "helpTextPostfix": { - "value": "To have a great conversation, ask me questions as if I was a real programmer:\n\n* **Show me the code** you want to talk about by having the files open and selecting the most important lines.\n* **Make refinements** by asking me follow-up questions, adding clarifications, providing errors, etc.\n* **Review my suggested code** and tell me about issues or improvements, so I can iterate on it.\n\nYou can also ask me questions about your editor selection by [starting an inline chat session](command:inlineChat.start).\n\nLearn more about [GitHub Copilot](https://docs.github.com/copilot/getting-started-with-github-copilot?tool=vscode) in [Visual Studio Code](https://code.visualstudio.com/docs/editor/artificial-intelligence).", - "isTrusted": { - "enabledCommands": [ - "inlineChat.start" - ] - }, - "supportThemeIcons": false, - "supportHtml": false, - "uris": { - "command:inlineChat.start": { - "$mid": 1, - "path": "inlineChat.start", - "scheme": "command" - }, - "https://docs.github.com/copilot/getting-started-with-github-copilot?tool=vscode": { - "$mid": 1, - "path": "/copilot/getting-started-with-github-copilot", - "scheme": "https", - "authority": "docs.github.com", - "query": "tool=vscode" - }, - "https://code.visualstudio.com/docs/editor/artificial-intelligence": { - "$mid": 1, - "path": "/docs/editor/artificial-intelligence", - "scheme": "https", - "authority": "code.visualstudio.com" - } - } - }, - "supportIssueReporting": false - } - }, - "contentReferences": [] - }, - { - "message": { - "parts": [ - { - "range": { - "start": 0, - "endExclusive": 77 - }, - "editorRange": { - "startLineNumber": 1, - "startColumn": 1, - "endLineNumber": 1, - "endColumn": 78 - }, - "text": "Soooooooooo nice, thanks! Lastly, what is the good name of this great script?", - "kind": "text" - } - ], - "text": "Soooooooooo nice, thanks! Lastly, what is the good name of this great script?" - }, - "response": [ - { - "value": "You're welcome! A good name for this script could be `pattern_checker.sh` or `disallowed_pattern_detector.sh`. This name suggests that the script checks for certain patterns in files, which is its main function. Remember to make the script executable with the command `chmod +x pattern_checker.sh` before running it.", - "isTrusted": false, - "supportThemeIcons": false, - "supportHtml": false - } - ], - "followups": [ - { - "kind": "reply", - "message": "How can I exclude specific directories from the file search in the script?", - "title": "How can I exclude specific directories from the file search in the script?" - } - ], - "isCanceled": false, - "agent": { - "id": "", - "metadata": { - "description": "", - "fullName": "GitHub Copilot", - "hasSlashCommands": true, - "hasFollowups": true, - "isDefault": true, - "helpTextPrefix": "You can ask me general programming questions, or chat with the following agents which have specialized expertise and can perform actions:", - "helpTextPostfix": { - "value": "To have a great conversation, ask me questions as if I was a real programmer:\n\n* **Show me the code** you want to talk about by having the files open and selecting the most important lines.\n* **Make refinements** by asking me follow-up questions, adding clarifications, providing errors, etc.\n* **Review my suggested code** and tell me about issues or improvements, so I can iterate on it.\n\nYou can also ask me questions about your editor selection by [starting an inline chat session](command:inlineChat.start).\n\nLearn more about [GitHub Copilot](https://docs.github.com/copilot/getting-started-with-github-copilot?tool=vscode) in [Visual Studio Code](https://code.visualstudio.com/docs/editor/artificial-intelligence).", - "isTrusted": { - "enabledCommands": [ - "inlineChat.start" - ] - }, - "supportThemeIcons": false, - "supportHtml": false, - "uris": { - "command:inlineChat.start": { - "$mid": 1, - "path": "inlineChat.start", - "scheme": "command" - }, - "https://docs.github.com/copilot/getting-started-with-github-copilot?tool=vscode": { - "$mid": 1, - "path": "/copilot/getting-started-with-github-copilot", - "scheme": "https", - "authority": "docs.github.com", - "query": "tool=vscode" - }, - "https://code.visualstudio.com/docs/editor/artificial-intelligence": { - "$mid": 1, - "path": "/docs/editor/artificial-intelligence", - "scheme": "https", - "authority": "code.visualstudio.com" - } - } - }, - "supportIssueReporting": false - } - }, - "contentReferences": [] - }, - { - "message": { - "parts": [ - { - "range": { - "start": 0, - "endExclusive": 60 - }, - "editorRange": { - "startLineNumber": 1, - "startColumn": 1, - "endLineNumber": 1, - "endColumn": 61 - }, - "text": "Thanks. Can you write a small documentation for this script?", - "kind": "text" - } - ], - "text": "Thanks. Can you write a small documentation for this script?" - }, - "response": [ - { - "value": "Sure, here's a brief documentation for the `pattern_checker.sh` script:\n\n---\n\n# Pattern Checker Script\n\nThe `pattern_checker.sh` script is a utility for scanning files for disallowed patterns. It accepts a list of file patterns and a list of disallowed patterns as arguments, and scans all files matching the file patterns for the disallowed patterns.\n\n## Usage\n\n```bash\n./pattern_checker.sh [file patterns] -- [disallowed patterns]\n```\n\n### Parameters:\n\n- `[file patterns]`: A list of file patterns to scan. Each pattern should be quoted and separated by a space. For example, `\"*.dart\" \"*.txt\"`.\n- `[disallowed patterns]`: A list of disallowed patterns to search for in the files. Each pattern should be quoted and separated by a space. For example, `\"pattern1\" \"pattern2\"`.\n\nThe `--` argument is used to separate the file patterns from the disallowed patterns.\n\n### Example:\n\n```bash\n./pattern_checker.sh \"*.dart\" \"*.txt\" -- \"pattern1\" \"pattern2\"\n```\n\nThis command will scan all `.dart` and `.txt` files for the patterns `pattern1` and `pattern2`.\n\n## Output\n\nIf a disallowed pattern is found in a file, the script will print the filename, line number, and the matching line. If any disallowed patterns are found, the script will exit with a status of 1. If no disallowed patterns are found, the script will exit with a status of 0.\n\n---\n\nRemember to make the script executable with the command `chmod +x pattern_checker.sh` before running it.", - "isTrusted": false, - "supportThemeIcons": false, - "supportHtml": false - } - ], - "followups": [ - { - "kind": "reply", - "message": "How can I exclude certain directories from being scanned by the `pattern_checker.sh` script?", - "title": "How can I exclude certain directories from being scanned by the `pattern_checker.sh` script?" - } - ], - "isCanceled": false, - "agent": { - "id": "", - "metadata": { - "description": "", - "fullName": "GitHub Copilot", - "hasSlashCommands": true, - "hasFollowups": true, - "isDefault": true, - "helpTextPrefix": "You can ask me general programming questions, or chat with the following agents which have specialized expertise and can perform actions:", - "helpTextPostfix": { - "value": "To have a great conversation, ask me questions as if I was a real programmer:\n\n* **Show me the code** you want to talk about by having the files open and selecting the most important lines.\n* **Make refinements** by asking me follow-up questions, adding clarifications, providing errors, etc.\n* **Review my suggested code** and tell me about issues or improvements, so I can iterate on it.\n\nYou can also ask me questions about your editor selection by [starting an inline chat session](command:inlineChat.start).\n\nLearn more about [GitHub Copilot](https://docs.github.com/copilot/getting-started-with-github-copilot?tool=vscode) in [Visual Studio Code](https://code.visualstudio.com/docs/editor/artificial-intelligence).", - "isTrusted": { - "enabledCommands": [ - "inlineChat.start" - ] - }, - "supportThemeIcons": false, - "supportHtml": false, - "uris": { - "command:inlineChat.start": { - "$mid": 1, - "path": "inlineChat.start", - "scheme": "command" - }, - "https://docs.github.com/copilot/getting-started-with-github-copilot?tool=vscode": { - "$mid": 1, - "path": "/copilot/getting-started-with-github-copilot", - "scheme": "https", - "authority": "docs.github.com", - "query": "tool=vscode" - }, - "https://code.visualstudio.com/docs/editor/artificial-intelligence": { - "$mid": 1, - "path": "/docs/editor/artificial-intelligence", - "scheme": "https", - "authority": "code.visualstudio.com" - } - } - }, - "supportIssueReporting": false - } - }, - "contentReferences": [] - }, - { - "message": { - "parts": [ - { - "range": { - "start": 0, - "endExclusive": 158 - }, - "editorRange": { - "startLineNumber": 1, - "startColumn": 1, - "endLineNumber": 1, - "endColumn": 159 - }, - "text": "Thanks. Can you write a small documentation comments for this script? I will put it at the top of the script file, so each line must begins with a single `#`.", - "kind": "text" - } - ], - "text": "Thanks. Can you write a small documentation comments for this script? I will put it at the top of the script file, so each line must begins with a single `#`." - }, - "response": [ - { - "value": "Absolutely, here's a brief documentation comment for the `pattern_checker.sh` script:\n\n```bash\n# Pattern Checker Script\n#\n# This script is a utility for scanning files for disallowed patterns. It accepts a list of file patterns and a list of disallowed patterns as arguments, and scans all files matching the file patterns for the disallowed patterns.\n#\n# Usage:\n# ./pattern_checker.sh [file patterns] -- [disallowed patterns]\n#\n# Parameters:\n# [file patterns]: A list of file patterns to scan. Each pattern should be quoted and separated by a space. For example, \"*.dart\" \"*.txt\".\n# [disallowed patterns]: A list of disallowed patterns to search for in the files. Each pattern should be quoted and separated by a space. For example, \"pattern1\" \"pattern2\".\n# The -- argument is used to separate the file patterns from the disallowed patterns.\n#\n# Example:\n# ./pattern_checker.sh \"*.dart\" \"*.txt\" -- \"pattern1\" \"pattern2\"\n# This command will scan all .dart and .txt files for the patterns pattern1 and pattern2.\n#\n# Output:\n# If a disallowed pattern is found in a file, the script will print the filename, line number, and the matching line. If any disallowed patterns are found, the script will exit with a status of 1. If no disallowed patterns are found, the script will exit with a status of 0.\n#\n# Remember to make the script executable with the command chmod +x pattern_checker.sh before running it.\n```\n\nYou can place this comment at the top of your script file. It provides a brief overview of what the script does, how to use it, and what output to expect.", - "isTrusted": false, - "supportThemeIcons": false, - "supportHtml": false - } - ], - "followups": [ - { - "kind": "reply", - "message": "How can I exclude specific directories from being scanned by the `pattern_checker.sh` script?", - "title": "How can I exclude specific directories from being scanned by the `pattern_checker.sh` script?" - } - ], - "isCanceled": false, - "agent": { - "id": "", - "metadata": { - "description": "", - "fullName": "GitHub Copilot", - "hasSlashCommands": true, - "hasFollowups": true, - "isDefault": true, - "helpTextPrefix": "You can ask me general programming questions, or chat with the following agents which have specialized expertise and can perform actions:", - "helpTextPostfix": { - "value": "To have a great conversation, ask me questions as if I was a real programmer:\n\n* **Show me the code** you want to talk about by having the files open and selecting the most important lines.\n* **Make refinements** by asking me follow-up questions, adding clarifications, providing errors, etc.\n* **Review my suggested code** and tell me about issues or improvements, so I can iterate on it.\n\nYou can also ask me questions about your editor selection by [starting an inline chat session](command:inlineChat.start).\n\nLearn more about [GitHub Copilot](https://docs.github.com/copilot/getting-started-with-github-copilot?tool=vscode) in [Visual Studio Code](https://code.visualstudio.com/docs/editor/artificial-intelligence).", - "isTrusted": { - "enabledCommands": [ - "inlineChat.start" - ] - }, - "supportThemeIcons": false, - "supportHtml": false, - "uris": { - "command:inlineChat.start": { - "$mid": 1, - "path": "inlineChat.start", - "scheme": "command" - }, - "https://docs.github.com/copilot/getting-started-with-github-copilot?tool=vscode": { - "$mid": 1, - "path": "/copilot/getting-started-with-github-copilot", - "scheme": "https", - "authority": "docs.github.com", - "query": "tool=vscode" - }, - "https://code.visualstudio.com/docs/editor/artificial-intelligence": { - "$mid": 1, - "path": "/docs/editor/artificial-intelligence", - "scheme": "https", - "authority": "code.visualstudio.com" - } - } - }, - "supportIssueReporting": false - } - }, - "contentReferences": [] - } - ], - "providerId": "copilot" -} \ No newline at end of file diff --git a/package/test/draggable/draggable_sheet_test.dart b/test/draggable/draggable_sheet_test.dart similarity index 100% rename from package/test/draggable/draggable_sheet_test.dart rename to test/draggable/draggable_sheet_test.dart diff --git a/package/test/flutter_test_config.dart b/test/flutter_test_config.dart similarity index 100% rename from package/test/flutter_test_config.dart rename to test/flutter_test_config.dart diff --git a/package/test/foundation/physics_test.dart b/test/foundation/physics_test.dart similarity index 100% rename from package/test/foundation/physics_test.dart rename to test/foundation/physics_test.dart diff --git a/package/test/foundation/sheet_notification_test.dart b/test/foundation/sheet_notification_test.dart similarity index 100% rename from package/test/foundation/sheet_notification_test.dart rename to test/foundation/sheet_notification_test.dart diff --git a/package/test/foundation/sheet_viewport_test.dart b/test/foundation/sheet_viewport_test.dart similarity index 100% rename from package/test/foundation/sheet_viewport_test.dart rename to test/foundation/sheet_viewport_test.dart diff --git a/package/test/navigation/navigation_sheet_test.dart b/test/navigation/navigation_sheet_test.dart similarity index 100% rename from package/test/navigation/navigation_sheet_test.dart rename to test/navigation/navigation_sheet_test.dart diff --git a/package/test/scrollable/scrollable_sheet_test.dart b/test/scrollable/scrollable_sheet_test.dart similarity index 100% rename from package/test/scrollable/scrollable_sheet_test.dart rename to test/scrollable/scrollable_sheet_test.dart diff --git a/package/test/src/keyboard_inset_simulation.dart b/test/src/keyboard_inset_simulation.dart similarity index 100% rename from package/test/src/keyboard_inset_simulation.dart rename to test/src/keyboard_inset_simulation.dart