1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Update add to app code to run on modern versions of agp and gradle. (#2330)

## 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 updated/added relevant documentation (doc comments with `///`).
- [x] All existing and new tests are passing.

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
This commit is contained in:
Reid Baker
2024-06-28 11:47:08 -04:00
committed by GitHub
parent 4fa43138eb
commit 233c6613bb
16 changed files with 336 additions and 32 deletions

View File

@@ -6,7 +6,7 @@ import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:sensors/sensors.dart';
import 'package:sensors_plus/sensors_plus.dart';
// This is on alternate entrypoint for this module to display Flutter UI in
// a (multi-)view integration scenario.
@@ -109,7 +109,7 @@ class _CellState extends State<Cell> with WidgetsBindingObserver {
// Don't continuously rebuild for nothing when the
// cell isn't visible.
stream: appLifecycleState == AppLifecycleState.resumed
? accelerometerEvents
? accelerometerEventStream()
: Stream.value(defaultPosition),
initialData: defaultPosition,
builder: (context, snapshot) {

View File

@@ -11,7 +11,7 @@ dependencies:
sdk: flutter
provider: ^6.0.2
url_launcher: ^6.0.20
sensors: ^2.0.3
sensors_plus: ^5.0.1
dev_dependencies:
analysis_defaults: