Skip to content

Conversation

@rahul31124
Copy link
Contributor

@rahul31124 rahul31124 commented Aug 17, 2025

Fixes #2831

Changes

  • Added a dispose() method in robotic_arm_screen.dart.
  • Inside dispose(), called provider.disposeResources() so that the screen’s orientation is reset properly.

Summary by Sourcery

Bug Fixes:

  • Add a dispose method to RoboticArmScreen to call provider.disposeResources and reset orientation

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Aug 17, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Introduced a dispose override in the RoboticArmScreen state to invoke provider resource cleanup before calling super.dispose(), ensuring the screen orientation resets correctly.

Sequence diagram for RoboticArmScreen disposal and orientation reset

sequenceDiagram
participant RoboticArmScreenState
participant Provider
RoboticArmScreenState->>Provider: disposeResources()
RoboticArmScreenState->>State: super.dispose()
Loading

Class diagram for updated RoboticArmScreen resource disposal

classDiagram
class _RoboticArmScreenState {
  +dispose()
  -provider: ProviderType
}
_RoboticArmScreenState :> State
_RoboticArmScreenState --> ProviderType : uses
class ProviderType {
  +disposeResources()
}
Loading

File-Level Changes

Change Details Files
Reset screen orientation by disposing resources
  • Added override of dispose() in the state class
  • Called provider.disposeResources() inside dispose()
  • Ensured super.dispose() is invoked after resource disposal
lib/view/robotic_arm_screen.dart

Assessment against linked issues

Issue Objective Addressed Explanation
#2831 Ensure that the screen orientation resets to portrait mode when the user leaves the Robot Arm screen, regardless of whether the system back button or the action bar back arrow is used.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@rahul31124 rahul31124 requested a review from marcnause August 17, 2025 14:39
Copy link
Collaborator

@AsCress AsCress left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @rahul31124 You've verified that this works, right ?

@rahul31124
Copy link
Contributor Author

LGTM. @rahul31124 You've verified that this works, right ?

@AsCress Yes I have verified that

@github-actions
Copy link
Contributor

@AsCress
Copy link
Collaborator

AsCress commented Aug 17, 2025

CC: @marcnause Good to go.

@marcnause marcnause merged commit 86e4f12 into fossasia:flutter Aug 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Robot Arm screen: Orientation stays in landscape mode after using back button

3 participants