Skip to content

Conversation

chunhtai
Copy link
Contributor

fixes flutter/flutter#123570

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Copy link
Contributor

@johnpryan johnpryan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Removes GoRouter.location and GoRouter.canPop.
- Removes GoRouter.location and GoRouter.canPop. Use GoRouterState.of().location and Navigator.of().canPop instead.

sfshaza2 pushed a commit to flutter/website that referenced this pull request Jun 22, 2023
breaking change doc for flutter/packages#4227

## Presubmit checklist

- [ ] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [ ] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [ ] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.
@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 23, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 23, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 23, 2023

auto label is removed for flutter/packages, pr: 4227, due to - The status or check suite cla/google has failed. Please fix the issues identified (or deflake) before re-applying this label.

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 23, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 23, 2023

auto label is removed for flutter/packages, pr: 4227, due to - The status or check suite cla/google has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 23, 2023
@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 23, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 23, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 23, 2023

auto label is removed for flutter/packages, pr: 4227, due to - The status or check suite Mac_arm64 ios_platform_tests_shard_1 master has failed. Please fix the issues identified (or deflake) before re-applying this label.

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 23, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Jun 23, 2023

auto label is removed for flutter/packages, pr: 4227, due to - The status or check suite repo_checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 23, 2023
@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 23, 2023
@auto-submit auto-submit bot merged commit 6b70804 into flutter:main Jun 23, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 26, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jun 26, 2023
flutter/packages@d041934...6b70804

2023-06-23 [email protected] [go_router] Reduces excessive rebuilds due to inherited look up. (flutter/packages#4227)
2023-06-23 [email protected] [image_picker] Update to 1.0 (flutter/packages#4285)
2023-06-23 [email protected] [tool] Consider comment-only changes to be dev-only (flutter/packages#4279)
2023-06-23 [email protected] [ci] Switch to LUCI for Android build-all (flutter/packages#4274)
2023-06-23 [email protected] [file_selector] Add file group to save return value (flutter/packages#4222)
2023-06-23 [email protected] [go_router] Adds onException to GoRouter constructor. (flutter/packages#4216)
2023-06-23 [email protected] [file_selector] Add file group to save return value - implementations (flutter/packages#4273)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@houssam15
Copy link

houssam15 commented Sep 22, 2024

the solutions for it for my case , is to make the build method don't break ui or duplicate data make it handling the case when data is already loaded

class ReportsScreen extends StatefulWidget {
final String title;
static String route = Config.route;
const ReportsScreen({super.key, required this.title});
@OverRide
State createState() => _ReportsScreenState();
}

class _ReportsScreenState extends State {

bool isLoaded = false;

@OverRide
Widget build(BuildContext context) {
return FutureBuilder(
future: _myFuture,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return const LoadingWidget();
} else if (snapshot.data == null) {
return AlertWidget(
title: AppLocalizations.of(context)!.fetchingFailed,
description: AppLocalizations.of(context)!.cantFatchDataFromServer,
btnText: AppLocalizations.of(context)!.ok,
);
} else {
if(isLoaded==false) _generateItems(snapshot.data!);
isLoaded=true;
pagination?.setNumberOfPages(snapshot.data!.number_of_pages);
return Container(
child: WebViewWidget(
controller: _controller,
),
);
}
},
);
}

}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: go_router

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[go_router] Remove dependency looks up in GoRouter.of to reduce unwanted rebuild

4 participants