1
0
mirror of https://github.com/flutter/samples.git synced 2026-06-25 15:49:43 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
Eric Windmill
d9a2b781a2 Various simple fixes (#2866)
*Replace this paragraph with a description of what this PR is changing
or adding, and why. Consider including before/after screenshots.*

*List which issues are fixed by this PR. For larger changes, raising an
issue first helps
reduce redundant work.*

## Pre-launch Checklist

- [ ] I read the [Flutter Style Guide] _recently_, and have followed its
advice.
- [ ] I signed the [CLA].
- [ ] I read the [Contributors Guide].
- [ ] I have added sample code updates to the [changelog].
- [ ] I updated/added relevant documentation (doc comments with `///`).


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

<!-- Links -->
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md
[CLA]: https://cla.developers.google.com/
[Discord]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[Contributors Guide]:
https://github.com/flutter/samples/blob/main/CONTRIBUTING.md
[changelog]: ../CHANGELOG.md
2026-06-19 14:54:02 -07:00
Abdulrahman Bashir
effe13307c Migrate testing_app to UIScene lifecycle (#2836)
## Summary
[![talabat.com
contributions](https://img.shields.io/badge/talabat.com-contributions-FF5A00?style=flat&logo=flutter&logoColor=white)](https://www.talabat.com)
[![Talabat Flutter
PRs](https://img.shields.io/badge/Talabat_Flutter_PRs-26%20merged-97ca00?style=flat&logo=flutter&logoColor=white)](https://github.com/search?q=org%3Aflutter+talabat&type=pullrequests)

- Migrate `testing_app` iOS project to the UIScene lifecycle as per the
[migration
guide](https://docs.flutter.dev/release/breaking-changes/uiscenedelegate)
- Update `AppDelegate.swift` to use `@main`,
`FlutterImplicitEngineDelegate`, and move plugin registration to
`didInitializeImplicitFlutterEngine`
- Add `UIApplicationSceneManifest` to `Info.plist`

Part of flutter/flutter#176957

## Test plan
- [x] Ran `testing_app` on iOS simulator — app launches and works
correctly

---------

Co-authored-by: Eric Windmill <eric@ericwindmill.com>
2026-06-19 14:35:48 -07:00
Harsh Yadav
8bfffd4a84 docs: clarify HomeViewModel lifecycle in Compass sample (#2838)
Adds a comment explaining why `HomeViewModel` is not disposed in the
Compass sample.

This clarifies that the current implementation is safe because the
ViewModel does not manage disposable resources. It also highlights that
in real applications, proper lifecycle management is required when
working with streams, controllers, or subscriptions.

Fixes https://github.com/flutter/samples/issues/2788

## Pre-launch Checklist

* [x] I read the [[Flutter Style
Guide](https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md)]
recently, and have followed its advice.
* [x] I signed the [[CLA](https://cla.developers.google.com/)].
* [ ] I have added sample code updates to the
[[changelog](https://chatgpt.com/c/CHANGELOG.md)].
* [x] I updated/added relevant documentation (doc comments with `///`).

<!-- Links -->

[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md
[CLA]: https://cla.developers.google.com/
[changelog]: ./CHANGELOG.md

---------

Co-authored-by: Eric Windmill <eric@ericwindmill.com>
2026-06-19 14:16:31 -07:00
Mozammal Hossain
5f4c795695 [compass_app] Scope LogoutViewModel to route builder — fix #2604 (#2819)
## Description

**Problem:** `LogoutViewModel` was built inside `HomeHeader.build()`, so
each rebuild could create a new instance and a new `logout` command.
That does not match how other Compass view models are scoped (created in
the GoRouter route `builder` and passed in), and it can affect an
in-flight logout when the home screen rebuilds.

**Change:** Create `LogoutViewModel` once in the `/home` route next to
`HomeViewModel`, pass it through `HomeScreen` → `HomeHeader` →
`LogoutButton`, and remove inline construction in `home_title.dart`.
Update `home_screen_test.dart` to build `LogoutViewModel` with fakes and
remove `Provider` wrappers that only supported `context.read()` in the
header.

**Result:** Logout view model lifetime aligns with the home route; no
visual or copy changes (screenshots not needed).

Fixes https://github.com/flutter/samples/issues/2604

---

## Pre-launch Checklist

- [x] I read the [Flutter Style Guide] _recently_, and have followed its
advice.
- [x] I signed the [CLA].
- [x] I read the [Contributors Guide].
- [x] I have added sample code updates to the [changelog].
- [x] I updated/added relevant documentation (doc comments with `///`).

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

<!-- Links -->
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md
[CLA]: https://cla.developers.google.com/
[Discord]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[Contributors Guide]:
https://github.com/flutter/samples/blob/main/CONTRIBUTING.md
[changelog]: ../CHANGELOG.md

---------

Co-authored-by: Eric Windmill <eric@ericwindmill.com>
2026-06-19 14:11:27 -07:00
Eric Windmill
719fd72c38 Flutter 3.29 beta (#2571) 2025-02-12 18:08:01 -05:00
Parker Lougheed
e39638ebff Enable some extra lints for compass app client (#2560)
Enable a few more lints that were mostly followed already for
consistency.
2025-01-06 08:58:52 -05:00
Eric Windmill
46b5a26b26 Compass app (#2446) 2024-09-28 08:49:27 +10:00