1
0
mirror of https://github.com/flutter/samples.git synced 2026-08-25 01:21:59 +00:00

Release 3.47 (#2879)

Minor updates for release 3.47

## 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: Parker Lougheed <parlough@gmail.com>
This commit is contained in:
Eric Windmill
2026-08-12 12:21:23 -07:00
committed by GitHub
parent e0136e5ebb
commit 0c5ca75d29
96 changed files with 1711 additions and 723 deletions

View File

@@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
flutter_version: [stable]
flutter_version: [stable, beta]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

View File

@@ -1,4 +0,0 @@
include: package:flutter_lints/flutter.yaml
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

View File

@@ -1 +0,0 @@
include: package:analysis_defaults/flutter.yaml

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../../../analysis_options.yaml

11
analysis_options.yaml Normal file
View File

@@ -0,0 +1,11 @@
include: package:analysis_defaults/flutter.yaml
analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -0,0 +1,32 @@
#
# Generated file, do not edit.
#
import lldb
def handle_new_rx_page(frame: lldb.SBFrame, bp_loc, extra_args, intern_dict):
"""Intercept NOTIFY_DEBUGGER_ABOUT_RX_PAGES and touch the pages."""
base = frame.register["x0"].GetValueAsAddress()
page_len = frame.register["x1"].GetValueAsUnsigned()
# Note: NOTIFY_DEBUGGER_ABOUT_RX_PAGES will check contents of the
# first page to see if handled it correctly. This makes diagnosing
# misconfiguration (e.g. missing breakpoint) easier.
data = bytearray(page_len)
data[0:8] = b'IHELPED!'
error = lldb.SBError()
frame.GetThread().GetProcess().WriteMemory(base, data, error)
if not error.Success():
print(f'Failed to write into {base}[+{page_len}]', error)
return
def __lldb_init_module(debugger: lldb.SBDebugger, _):
target = debugger.GetDummyTarget()
# Caveat: must use BreakpointCreateByRegEx here and not
# BreakpointCreateByName. For some reasons callback function does not
# get carried over from dummy target for the later.
bp = target.BreakpointCreateByRegex("^NOTIFY_DEBUGGER_ABOUT_RX_PAGES$")
bp.SetScriptCallbackFunction('{}.handle_new_rx_page'.format(__name__))
bp.SetAutoContinue(True)
print("-- LLDB integration loaded --")

View File

@@ -0,0 +1,5 @@
#
# Generated file, do not edit.
#
command script import --relative-to-command-file flutter_lldb_helper.py

View File

@@ -0,0 +1,12 @@
FLUTTER_ROOT=/Users/ewindmill/development/flutter
FLUTTER_APPLICATION_PATH=/Users/ewindmill/development/samples/animation_gallery
FLUTTER_FRAMEWORK_SWIFT_PACKAGE_PATH=/Users/ewindmill/development/samples/animation_gallery/ios/Flutter/ephemeral/Packages/.packages/FlutterFramework
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json

View File

@@ -0,0 +1,12 @@
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/Users/ewindmill/development/flutter
FLUTTER_APPLICATION_PATH=/Users/ewindmill/development/samples/animation_gallery
FLUTTER_FRAMEWORK_SWIFT_PACKAGE_PATH=/Users/ewindmill/development/samples/animation_gallery/macos/Flutter/ephemeral/Packages/.packages/FlutterFramework
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json

View File

@@ -0,0 +1,13 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/ewindmill/development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/ewindmill/development/samples/animation_gallery"
export "FLUTTER_FRAMEWORK_SWIFT_PACKAGE_PATH=/Users/ewindmill/development/samples/animation_gallery/macos/Flutter/ephemeral/Packages/.packages/FlutterFramework"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.dart_tool/package_config.json"

View File

@@ -0,0 +1,11 @@
FLUTTER_ROOT=/Users/ewindmill/development/flutter
FLUTTER_APPLICATION_PATH=/Users/ewindmill/development/samples/animation_gallery
FLUTTER_FRAMEWORK_SWIFT_PACKAGE_PATH=/Users/ewindmill/development/samples/animation_gallery/macos/Flutter/ephemeral/Packages/.packages/FlutterFramework
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_BUILD_DIR=build
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=.dart_tool/package_config.json

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -1,30 +1,10 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.
include: package:lints/recommended.yaml
# Uncomment the following section to specify additional rules.
# linter:
# rules:
# - camel_case_types
# analyzer:
# exclude:
# - path/to/excluded/files/**
# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints
# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**
include: ../../analysis_options.yaml

View File

@@ -16,8 +16,8 @@ int main(List<String> arguments) {
..addOption(outputOptionName, mandatory: true, abbr: 'o');
ArgResults argResults = parser.parse(arguments);
final String inputFilePath = argResults[inputOptionName];
final String outputFilePath = argResults[outputOptionName];
final String inputFilePath = argResults[inputOptionName] as String;
final String outputFilePath = argResults[outputOptionName] as String;
try {
final Image image = decodeImage(File(inputFilePath).readAsBytesSync())!;

View File

@@ -1,8 +1,8 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:asset_transformation/main.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
testWidgets('app can render without exceptions', (WidgetTester tester) async {
testWidgets('app can render without exceptions', (tester) async {
await tester.pumpWidget(const MainApp());
});
}

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -1,5 +1,3 @@
include: package:flutter_lints/flutter.yaml
linter:
rules:
- combinators_ordering
@@ -9,3 +7,14 @@ linter:
- prefer_final_in_for_each
- prefer_final_locals
- prefer_relative_imports
analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**

View File

@@ -31,7 +31,7 @@ class BookingRepositoryRemote implements BookingRepository {
.map((activity) => activity.ref)
.toList(),
);
return _apiClient.postBooking(bookingApiModel);
return await _apiClient.postBooking(bookingApiModel);
} on Exception catch (e) {
return Result.error(e);
}
@@ -121,7 +121,7 @@ class BookingRepositoryRemote implements BookingRepository {
@override
Future<Result<void>> delete(int id) async {
try {
return _apiClient.deleteBooking(id);
return await _apiClient.deleteBooking(id);
} on Exception catch (e) {
return Result.error(e);
}

View File

@@ -85,7 +85,6 @@ class BookingCreateUseCase {
switch (saveBookingResult) {
case Ok<void>():
_log.fine('Booking saved successfully');
break;
case Error<void>():
_log.warning('Failed to save booking', saveBookingResult.error);
return Result.error(saveBookingResult.error);

View File

@@ -46,9 +46,7 @@ GoRouter router(AuthRepository authRepository) => GoRouter(
authRepository: context.read(),
itineraryConfigRepository: context.read(),
);
return HomeScreenContainer(
logoutViewModel: logoutViewModel,
);
return HomeScreenContainer(logoutViewModel: logoutViewModel);
},
routes: [
GoRoute(

View File

@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
class AppLocalization {
static AppLocalization of(BuildContext context) {
return Localizations.of(context, AppLocalization);
return Localizations.of<AppLocalization>(context, AppLocalization)!;
}
static const _strings = <String, String>{

View File

@@ -8,10 +8,7 @@ import '../view_models/home_viewmodel.dart';
import 'home_screen.dart';
class HomeScreenContainer extends StatefulWidget {
const HomeScreenContainer({
super.key,
required this.logoutViewModel,
});
const HomeScreenContainer({super.key, required this.logoutViewModel});
final LogoutViewModel logoutViewModel;

View File

@@ -52,7 +52,7 @@ class SearchFormContinent extends StatelessWidget {
scrollDirection: Axis.horizontal,
itemCount: viewModel.continents.length,
padding: Dimens.of(context).edgeInsetsScreenHorizontal,
itemBuilder: (BuildContext context, int index) {
itemBuilder: (context, index) {
final Continent(:imageUrl, :name) = viewModel.continents[index];
return _CarouselItem(
key: ValueKey(name),
@@ -61,7 +61,7 @@ class SearchFormContinent extends StatelessWidget {
viewModel: viewModel,
);
},
separatorBuilder: (BuildContext context, int index) {
separatorBuilder: (context, index) {
return const SizedBox(width: 8);
},
);

View File

@@ -5,13 +5,11 @@
import FlutterMacOS
import Foundation
import path_provider_foundation
import share_plus
import shared_preferences_foundation
import sqflite_darwin
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))

View File

@@ -45,14 +45,14 @@ void main() {
);
}
testWidgets('should load screen', (WidgetTester tester) async {
testWidgets('should load screen', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
expect(find.byType(ActivitiesScreen), findsOneWidget);
});
});
testWidgets('should list activity', (WidgetTester tester) async {
testWidgets('should list activity', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
expect(find.byType(ActivityEntry), findsOneWidget);
@@ -60,9 +60,7 @@ void main() {
});
});
testWidgets('should select activity and confirm', (
WidgetTester tester,
) async {
testWidgets('should select activity and confirm', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
// Select one activity

View File

@@ -32,14 +32,14 @@ void main() {
);
}
testWidgets('should load screen', (WidgetTester tester) async {
testWidgets('should load screen', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
expect(find.byType(LoginScreen), findsOneWidget);
});
});
testWidgets('should perform login', (WidgetTester tester) async {
testWidgets('should perform login', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);

View File

@@ -43,14 +43,14 @@ void main() {
);
}
testWidgets('should load widget', (WidgetTester tester) async {
testWidgets('should load widget', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
expect(find.byType(LogoutButton), findsOneWidget);
});
});
testWidgets('should perform logout', (WidgetTester tester) async {
testWidgets('should perform logout', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);

View File

@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:compass_app/domain/models/itinerary_config/itinerary_config.dart';
import 'package:compass_app/domain/use_cases/booking/booking_create_use_case.dart';
import 'package:compass_app/domain/use_cases/booking/booking_share_use_case.dart';
@@ -62,20 +64,20 @@ void main() {
);
}
testWidgets('should load screen', (WidgetTester tester) async {
testWidgets('should load screen', (tester) async {
await loadScreen(tester);
expect(find.byType(BookingScreen), findsOneWidget);
});
testWidgets('should display booking from ID', (WidgetTester tester) async {
testWidgets('should display booking from ID', (tester) async {
// Add a booking to repository
bookingRepository.createBooking(kBooking);
unawaited(bookingRepository.createBooking(kBooking));
// Load screen
await loadScreen(tester);
// Load booking with ID 0
viewModel.loadBooking.execute(0);
unawaited(viewModel.loadBooking.execute(0));
// Wait for booking to load
await tester.pumpAndSettle();
@@ -84,13 +86,11 @@ void main() {
expect(find.text(kBooking.destination.tags.first), findsOneWidget);
});
testWidgets('should create booking from itinerary config', (
WidgetTester tester,
) async {
testWidgets('should create booking from itinerary config', (tester) async {
await loadScreen(tester);
// Create a new booking from stored itinerary config
viewModel.createBooking.execute();
unawaited(viewModel.createBooking.execute());
// Wait for booking to load
await tester.pumpAndSettle();
@@ -102,10 +102,10 @@ void main() {
expect(bookingRepository.bookings.length, 1);
});
testWidgets('should share booking', (WidgetTester tester) async {
bookingRepository.createBooking(kBooking);
testWidgets('should share booking', (tester) async {
unawaited(bookingRepository.createBooking(kBooking));
await loadScreen(tester);
viewModel.loadBooking.execute(0);
unawaited(viewModel.loadBooking.execute(0));
await tester.pumpAndSettle();
await tester.tap(find.byKey(const Key('share-button')));
expect(shared, true);

View File

@@ -43,10 +43,7 @@ void main() {
Future<void> loadWidget(WidgetTester tester) async {
await testApp(
tester,
HomeScreen(
viewModel: viewModel,
logoutViewModel: logoutViewModel,
),
HomeScreen(viewModel: viewModel, logoutViewModel: logoutViewModel),
goRouter: goRouter,
);
}

View File

@@ -42,14 +42,14 @@ void main() {
);
}
testWidgets('should load screen', (WidgetTester tester) async {
testWidgets('should load screen', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
expect(find.byType(ResultsScreen), findsOneWidget);
});
});
testWidgets('should display destination', (WidgetTester tester) async {
testWidgets('should display destination', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);
@@ -62,9 +62,7 @@ void main() {
});
});
testWidgets('should tap and navigate to activities', (
WidgetTester tester,
) async {
testWidgets('should tap and navigate to activities', (tester) async {
await mockNetworkImages(() async {
await loadScreen(tester);

View File

@@ -25,9 +25,7 @@ void main() {
await testApp(tester, SearchFormContinent(viewModel: viewModel));
}
testWidgets('Should load and select continent', (
WidgetTester tester,
) async {
testWidgets('Should load and select continent', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormContinent), findsOneWidget);

View File

@@ -26,9 +26,7 @@ void main() {
await testApp(tester, SearchFormDate(viewModel: viewModel));
}
testWidgets('should display date in different month', (
WidgetTester tester,
) async {
testWidgets('should display date in different month', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormDate), findsOneWidget);
@@ -45,9 +43,7 @@ void main() {
expect(find.text('12 Jun - 23 Jul'), findsOneWidget);
});
testWidgets('should display date in same month', (
WidgetTester tester,
) async {
testWidgets('should display date in same month', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormDate), findsOneWidget);

View File

@@ -26,7 +26,7 @@ void main() {
await testApp(tester, SearchFormGuests(viewModel: viewModel));
}
testWidgets('Increase number of guests', (WidgetTester tester) async {
testWidgets('Increase number of guests', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormGuests), findsOneWidget);
@@ -39,7 +39,7 @@ void main() {
expect(find.text('1'), findsOneWidget);
});
testWidgets('Decrease number of guests', (WidgetTester tester) async {
testWidgets('Decrease number of guests', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormGuests), findsOneWidget);

View File

@@ -46,9 +46,7 @@ void main() {
);
}
testWidgets('Should fill form and perform search', (
WidgetTester tester,
) async {
testWidgets('Should fill form and perform search', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormScreen), findsOneWidget);

View File

@@ -34,7 +34,7 @@ void main() {
);
}
testWidgets('Should be enabled and allow tap', (WidgetTester tester) async {
testWidgets('Should be enabled and allow tap', (tester) async {
await loadWidget(tester);
expect(find.byType(SearchFormSubmit), findsOneWidget);

View File

@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'package:compass_app/utils/command.dart';
import 'package:compass_app/utils/result.dart';
import 'package:flutter_test/flutter_test.dart';
@@ -53,10 +55,10 @@ void main() {
final future = command.execute();
// Run multiple times
command.execute();
command.execute();
command.execute();
command.execute();
unawaited(command.execute());
unawaited(command.execute());
unawaited(command.execute());
unawaited(command.execute());
// Await execution
await future;

View File

@@ -0,0 +1,19 @@
linter:
rules:
- combinators_ordering
- directives_ordering
- omit_local_variable_types
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
- prefer_relative_imports
analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**

View File

@@ -35,5 +35,6 @@ void main(List<String> args) async {
// For running in containers, we respect the PORT environment variable.
final port = int.parse(Platform.environment['PORT'] ?? '8080');
final server = await serve(handler, ip, port);
// ignore: avoid_print
print('Server listening on port ${server.port}');
}

View File

@@ -1,28 +1 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
include: ../analysis_options.yaml

View File

@@ -31,9 +31,9 @@ class GalleryHome extends StatelessWidget {
),
],
),
tabBuilder: (BuildContext context, int index) {
tabBuilder: (context, index) {
return CupertinoTabView(
builder: (BuildContext context) {
builder: (context) {
return switch (index) {
0 => const WidgetsPage(),
1 => SettingsPage(

View File

@@ -54,7 +54,7 @@ class _SettingsPageState extends State<SettingsPage> {
title: const Text('Dark Mode'),
trailing: CupertinoSwitch(
value: isDarkMode,
onChanged: (bool isActive) {
onChanged: (isActive) {
setState(() {
isDarkMode = isActive;
widget.onThemeChange(isActive);
@@ -70,7 +70,7 @@ class _SettingsPageState extends State<SettingsPage> {
value: _textSize,
min: 0.5,
max: 1.5,
onChanged: (double value) {
onChanged: (value) {
setState(() {
_textSize = value;
});
@@ -103,7 +103,7 @@ class _SettingsPageState extends State<SettingsPage> {
onTap: () {
showCupertinoDialog<void>(
context: context,
builder: (BuildContext context) => CupertinoAlertDialog(
builder: (context) => CupertinoAlertDialog(
title: const Text('Reset Settings'),
content: const Text(
'Are you sure you want to reset all settings?',

View File

@@ -13,7 +13,7 @@ class ActionSheetPage extends StatelessWidget {
onPressed: () {
showCupertinoModalPopup<void>(
context: context,
builder: (BuildContext context) => CupertinoActionSheet(
builder: (context) => CupertinoActionSheet(
title: const Text('Title'),
message: const Text('Message'),
actions: <CupertinoActionSheetAction>[

View File

@@ -13,7 +13,7 @@ class AlertDialogPage extends StatelessWidget {
onPressed: () {
showCupertinoDialog<void>(
context: context,
builder: (BuildContext context) => CupertinoAlertDialog(
builder: (context) => CupertinoAlertDialog(
title: const Text('Alert'),
content: const Text('This is a sample alert dialog.'),
actions: <CupertinoDialogAction>[

View File

@@ -17,7 +17,7 @@ class _CheckboxPageState extends State<CheckboxPage> {
child: Center(
child: CupertinoCheckbox(
value: _value,
onChanged: (bool? value) {
onChanged: (value) {
setState(() {
_value = value!;
});

View File

@@ -10,7 +10,7 @@ class DatePickerPage extends StatelessWidget {
child: Center(
child: SizedBox(
height: 200,
child: CupertinoDatePicker(onDateTimeChanged: (DateTime newDate) {}),
child: CupertinoDatePicker(onDateTimeChanged: (newDate) {}),
),
),
);

View File

@@ -12,7 +12,7 @@ class PickerPage extends StatelessWidget {
height: 200,
child: CupertinoPicker(
itemExtent: 32,
onSelectedItemChanged: (int index) {},
onSelectedItemChanged: (index) {},
children: const <Widget>[Text('One'), Text('Two'), Text('Three')],
),
),

View File

@@ -15,7 +15,7 @@ class PopupSurfacePage extends StatelessWidget {
onPressed: () {
showCupertinoModalPopup<void>(
context: context,
builder: (BuildContext context) {
builder: (context) {
return CupertinoPopupSurface(
child: Container(
color: CupertinoColors.white,

View File

@@ -17,7 +17,7 @@ class _RadioPageState extends State<RadioPage> {
child: Center(
child: RadioGroup(
groupValue: _selectedValue,
onChanged: (int? value) {
onChanged: (value) {
setState(() {
_selectedValue = value!;
});

View File

@@ -13,10 +13,10 @@ class ScrollbarPage extends StatelessWidget {
child: ListView.separated(
controller: controller,
itemCount: 100,
itemBuilder: (BuildContext context, int index) {
itemBuilder: (context, index) {
return CupertinoListTile(title: Text('Item $index'));
},
separatorBuilder: (BuildContext context, int index) {
separatorBuilder: (context, index) {
return Container(height: 1, color: CupertinoColors.opaqueSeparator);
},
),

View File

@@ -23,7 +23,7 @@ class _SegmentedControlPageState extends State<SegmentedControlPage> {
1: Text('Two'),
2: Text('Three'),
},
onValueChanged: (int val) {
onValueChanged: (val) {
setState(() {
_selectedIndex = val;
});

View File

@@ -13,20 +13,21 @@ class SheetPage extends StatelessWidget {
onPressed: () {
Navigator.of(context).push(
CupertinoSheetRoute<void>(
builder: (BuildContext context) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: const Text('Sheet'),
trailing: GestureDetector(
child: const Icon(CupertinoIcons.xmark),
onTap: () {
Navigator.of(context).pop();
},
),
),
child: const Center(child: Text('This is a sheet')),
);
},
scrollableBuilder:
(context, controller) {
return CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: const Text('Sheet'),
trailing: GestureDetector(
child: const Icon(CupertinoIcons.xmark),
onTap: () {
Navigator.of(context).pop();
},
),
),
child: const Center(child: Text('This is a sheet')),
);
},
),
);
},

View File

@@ -17,7 +17,7 @@ class _SliderPageState extends State<SliderPage> {
child: Center(
child: CupertinoSlider(
value: _value,
onChanged: (double value) {
onChanged: (value) {
setState(() {
_value = value;
});

View File

@@ -25,7 +25,7 @@ class _SlidingSegmentedControlPageState
1: Text('Two'),
2: Text('Three'),
},
onValueChanged: (int? value) {
onValueChanged: (value) {
setState(() {
_groupValue = value;
});

View File

@@ -17,7 +17,7 @@ class _SwitchPageState extends State<SwitchPage> {
child: Center(
child: CupertinoSwitch(
value: _value,
onChanged: (bool value) {
onChanged: (value) {
setState(() {
_value = value;
});

View File

@@ -11,7 +11,7 @@ class TimePickerPage extends StatelessWidget {
child: SizedBox(
height: 200,
child: CupertinoTimerPicker(
onTimerDurationChanged: (Duration newDuration) {},
onTimerDurationChanged: (newDuration) {},
),
),
),

View File

@@ -54,7 +54,7 @@ class CustomCupertinoListTile extends StatelessWidget {
onTap: () {
Navigator.of(context).push(
CupertinoPageRoute<void>(
builder: (BuildContext context) {
builder: (context) {
return WidgetDetailPage(title: title);
},
),

View File

@@ -1,28 +1,5 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
include: ../analysis_options.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
sort_pub_dependencies: true

View File

@@ -88,7 +88,8 @@ class _EventDetailState extends State<EventDetail> {
onChanged: (value) => event.title = value,
),
),
if (!widget.isEditing) Text(event.title, style: titleStyle),
if (!widget.isEditing)
Text(event.title, style: titleStyle),
],
),
const SizedBox(height: 12),

View File

@@ -16,7 +16,7 @@ class EventList extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Consumer<EventData>(
builder: (BuildContext context, EventData events, Widget? child) {
builder: (context, events, child) {
return CupertinoPageScaffold(
// TODO(mit-mit): Avoid having to pass nav bar manually.
//

View File

@@ -8,9 +8,9 @@ environment:
sdk: ^3.9.0-0
dependencies:
cupertino_icons: ^1.0.8
flutter:
sdk: flutter
cupertino_icons: ^1.0.8
intl:
provider:
uuid:

View File

@@ -1,4 +1,4 @@
include: package:analysis_defaults/flutter.yaml
include: ../../analysis_options.yaml
linter:
rules:

View File

@@ -1,4 +1,4 @@
include: package:analysis_defaults/flutter.yaml
include: ../../analysis_options.yaml
linter:
rules:

View File

@@ -1,28 +1 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
include: ../analysis_options.yaml

View File

@@ -166,7 +166,9 @@ class _ExampleState extends State<Example> {
try {
final prompt = StringBuffer();
prompt.writeln(message);
final response = await callWithActions([Content.text(prompt.toString())]);
final response = await callWithActions([
Content.text(prompt.toString()),
]);
if (response.text != null) {
addMessage(Sender.system, response.text!);
} else {
@@ -209,7 +211,6 @@ class _ExampleState extends State<Example> {
}),
);
}
break;
case 'change_theme_mode':
final mode = args['mode'] as String;
themeMode.value = switch (mode) {
@@ -224,7 +225,6 @@ class _ExampleState extends State<Example> {
'message': 'theme mode updated',
}),
);
break;
case 'change_text_scale_factor':
final value = args['scale'] as num;
textScaleFactor.value = value.toDouble();
@@ -234,7 +234,6 @@ class _ExampleState extends State<Example> {
'message': 'font scale updated',
}),
);
break;
default:
}
}

View File

@@ -21,7 +21,7 @@ class ApiKeyWidget extends StatelessWidget {
ApiKeyWidget({super.key, required this.onSubmitted, required this.title});
final String title;
final ValueChanged onSubmitted;
final ValueChanged<String> onSubmitted;
final _textController = TextEditingController();
@override

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -1,5 +1,12 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml
analyzer:
exclude:
- lib/src/*.g.dart
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -1,4 +1,11 @@
include: package:flutter_lints/flutter.yaml
include: ../analysis_options.yaml
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**

View File

@@ -1,29 +1 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
include: ../../analysis_options.yaml

View File

@@ -54,7 +54,7 @@ class _HomeState extends State<Home> {
super.initState();
}
void runPedometer() async {
Future<void> runPedometer() async {
final now = DateTime.now();
hourlySteps = await StepsRepo.instance.getSteps();
lastUpdated = now;

View File

@@ -90,7 +90,7 @@ class _IOSStepsRepo implements StepsRepo {
return [];
}
final handlers = [];
final handlers = <ffi.Finalizable>[];
final futures = <Future<Steps?>>[];
final now = DateTime.now();
@@ -102,8 +102,8 @@ class _IOSStepsRepo implements StepsRepo {
final handler = helpLib.wrapCallback(
pd.ObjCBlock_ffiVoid_CMPedometerData_NSError.listener(lib, (
pd.CMPedometerData? result,
pd.NSError? error,
result,
error,
) {
if (result != null) {
final stepCount = result.numberOfSteps.intValue;

View File

@@ -254,7 +254,8 @@ final class $HealthConnectClient$Companion$NullableType
@core$_.override
bool operator ==(Object other) {
return other.runtimeType == ($HealthConnectClient$Companion$NullableType) &&
return other.runtimeType ==
($HealthConnectClient$Companion$NullableType) &&
other is $HealthConnectClient$Companion$NullableType;
}
}
@@ -406,7 +407,9 @@ class HealthConnectClient extends jni$_.JObject {
jni$_.JList<jni$_.JObject?> list,
) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$list = list.reference;
_insertRecords(
reference.pointer,
@@ -459,7 +462,9 @@ class HealthConnectClient extends jni$_.JObject {
jni$_.JList<jni$_.JObject?> list,
) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$list = list.reference;
_updateRecords(
reference.pointer,
@@ -521,7 +526,9 @@ class HealthConnectClient extends jni$_.JObject {
jni$_.JList<jni$_.JString?> list1,
) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$kClass = kClass.reference;
final _$list = list.reference;
final _$list1 = list1.reference;
@@ -584,7 +591,9 @@ class HealthConnectClient extends jni$_.JObject {
TimeRangeFilter timeRangeFilter,
) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$kClass = kClass.reference;
final _$timeRangeFilter = timeRangeFilter.reference;
_deleteRecords$1(
@@ -646,7 +655,9 @@ class HealthConnectClient extends jni$_.JObject {
required jni$_.JObjType<$T> T,
}) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$kClass = kClass.reference;
final _$string = string.reference;
_readRecord(
@@ -709,7 +720,9 @@ class HealthConnectClient extends jni$_.JObject {
])
as jni$_.JObjType<$T>;
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$readRecordsRequest = readRecordsRequest.reference;
_readRecords(
reference.pointer,
@@ -762,7 +775,9 @@ class HealthConnectClient extends jni$_.JObject {
AggregateRequest aggregateRequest,
) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$aggregateRequest = aggregateRequest.reference;
_aggregate(
reference.pointer,
@@ -815,7 +830,9 @@ class HealthConnectClient extends jni$_.JObject {
AggregateGroupByDurationRequest aggregateGroupByDurationRequest,
) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$aggregateGroupByDurationRequest =
aggregateGroupByDurationRequest.reference;
_aggregateGroupByDuration(
@@ -873,7 +890,9 @@ class HealthConnectClient extends jni$_.JObject {
AggregateGroupByPeriodRequest aggregateGroupByPeriodRequest,
) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$aggregateGroupByPeriodRequest =
aggregateGroupByPeriodRequest.reference;
_aggregateGroupByPeriod(
@@ -931,7 +950,9 @@ class HealthConnectClient extends jni$_.JObject {
ChangesTokenRequest changesTokenRequest,
) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$changesTokenRequest = changesTokenRequest.reference;
_getChangesToken(
reference.pointer,
@@ -990,7 +1011,9 @@ class HealthConnectClient extends jni$_.JObject {
jni$_.JObject iterable,
) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$string = string.reference;
final _$iterable = iterable.reference;
_registerForDataNotifications(
@@ -1045,7 +1068,9 @@ class HealthConnectClient extends jni$_.JObject {
jni$_.JString string,
) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$string = string.reference;
_unregisterFromDataNotifications(
reference.pointer,
@@ -1096,7 +1121,9 @@ class HealthConnectClient extends jni$_.JObject {
/// The returned object must be released after use, by calling the [release] method.
core$_.Future<jni$_.JObject> getChanges(jni$_.JString string) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$string = string.reference;
_getChanges(
reference.pointer,
@@ -1273,13 +1300,21 @@ class HealthConnectClient extends jni$_.JObject {
) {
return _$invokeMethod(
port,
jni$_.MethodInvocation.fromAddresses(0, descriptor.address, args.address),
jni$_.MethodInvocation.fromAddresses(
0,
descriptor.address,
args.address,
),
);
}
static final jni$_.Pointer<
jni$_.NativeFunction<
jni$_.JObjectPtr Function(jni$_.Int64, jni$_.JObjectPtr, jni$_.JObjectPtr)
jni$_.JObjectPtr Function(
jni$_.Int64,
jni$_.JObjectPtr,
jni$_.JObjectPtr,
)
>
>
_$invokePointer = jni$_.Pointer.fromFunction(_$invoke);
@@ -1872,9 +1907,15 @@ final class _$HealthConnectClient with $HealthConnectClient {
jni$_.JObject continuation,
)
_registerForDataNotifications;
final jni$_.JObject Function(jni$_.JString string, jni$_.JObject continuation)
final jni$_.JObject Function(
jni$_.JString string,
jni$_.JObject continuation,
)
_unregisterFromDataNotifications;
final jni$_.JObject Function(jni$_.JString string, jni$_.JObject continuation)
final jni$_.JObject Function(
jni$_.JString string,
jni$_.JObject continuation,
)
_getChanges;
final bool Function(Context context, jni$_.JList<jni$_.JString?> list)
_isAvailable;
@@ -1957,7 +1998,10 @@ final class _$HealthConnectClient with $HealthConnectClient {
AggregateGroupByPeriodRequest aggregateGroupByPeriodRequest,
jni$_.JObject continuation,
) {
return _aggregateGroupByPeriod(aggregateGroupByPeriodRequest, continuation);
return _aggregateGroupByPeriod(
aggregateGroupByPeriodRequest,
continuation,
);
}
jni$_.JObject getChangesToken(
@@ -2299,7 +2343,9 @@ class PermissionController extends jni$_.JObject {
jni$_.JSet<jni$_.JObject?> set,
) async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
final _$set = set.reference;
_getGrantedPermissions(
reference.pointer,
@@ -2351,7 +2397,9 @@ class PermissionController extends jni$_.JObject {
/// The returned object must be released after use, by calling the [release] method.
core$_.Future<jni$_.JObject> revokeAllPermissions() async {
final $p = jni$_.ReceivePort();
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p);
final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation(
$p,
);
_revokeAllPermissions(
reference.pointer,
@@ -2447,13 +2495,21 @@ class PermissionController extends jni$_.JObject {
) {
return _$invokeMethod(
port,
jni$_.MethodInvocation.fromAddresses(0, descriptor.address, args.address),
jni$_.MethodInvocation.fromAddresses(
0,
descriptor.address,
args.address,
),
);
}
static final jni$_.Pointer<
jni$_.NativeFunction<
jni$_.JObjectPtr Function(jni$_.Int64, jni$_.JObjectPtr, jni$_.JObjectPtr)
jni$_.JObjectPtr Function(
jni$_.Int64,
jni$_.JObjectPtr,
jni$_.JObjectPtr,
)
>
>
_$invokePointer = jni$_.Pointer.fromFunction(_$invoke);
@@ -4391,7 +4447,10 @@ class Context extends jni$_.JObject {
/// from: `static public final java.lang.String CARRIER_CONFIG_SERVICE`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get CARRIER_CONFIG_SERVICE =>
_id_CARRIER_CONFIG_SERVICE.get(_class, const jni$_.JStringNullableType());
_id_CARRIER_CONFIG_SERVICE.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_CLIPBOARD_SERVICE = _class.staticFieldId(
r'CLIPBOARD_SERVICE',
@@ -4551,7 +4610,10 @@ class Context extends jni$_.JObject {
/// from: `static public final java.lang.String FILE_INTEGRITY_SERVICE`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get FILE_INTEGRITY_SERVICE =>
_id_FILE_INTEGRITY_SERVICE.get(_class, const jni$_.JStringNullableType());
_id_FILE_INTEGRITY_SERVICE.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_FINGERPRINT_SERVICE = _class.staticFieldId(
r'FINGERPRINT_SERVICE',
@@ -5109,7 +5171,10 @@ class Context extends jni$_.JObject {
/// from: `static public final java.lang.String VPN_MANAGEMENT_SERVICE`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get VPN_MANAGEMENT_SERVICE =>
_id_VPN_MANAGEMENT_SERVICE.get(_class, const jni$_.JStringNullableType());
_id_VPN_MANAGEMENT_SERVICE.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_WALLPAPER_SERVICE = _class.staticFieldId(
r'WALLPAPER_SERVICE',
@@ -5671,7 +5736,11 @@ class Context extends jni$_.JObject {
/// from: `public abstract void setTheme(int i)`
void setTheme(int i) {
_setTheme(reference.pointer, _id_setTheme as jni$_.JMethodIDPtr, i).check();
_setTheme(
reference.pointer,
_id_setTheme as jni$_.JMethodIDPtr,
i,
).check();
}
static final _id_getTheme = _class.instanceMethodId(
@@ -9324,7 +9393,10 @@ class Context extends jni$_.JObject {
>();
/// from: `public abstract void enforceCallingPermission(java.lang.String string, java.lang.String string1)`
void enforceCallingPermission(jni$_.JString? string, jni$_.JString? string1) {
void enforceCallingPermission(
jni$_.JString? string,
jni$_.JString? string1,
) {
final _$string = string?.reference ?? jni$_.jNullReference;
final _$string1 = string1?.reference ?? jni$_.jNullReference;
_enforceCallingPermission(
@@ -9487,7 +9559,11 @@ class Context extends jni$_.JObject {
>();
/// from: `public abstract void revokeUriPermission(java.lang.String string, android.net.Uri uri, int i)`
void revokeUriPermission$1(jni$_.JString? string, jni$_.JObject? uri, int i) {
void revokeUriPermission$1(
jni$_.JString? string,
jni$_.JObject? uri,
int i,
) {
final _$string = string?.reference ?? jni$_.jNullReference;
final _$uri = uri?.reference ?? jni$_.jNullReference;
_revokeUriPermission$1(
@@ -10891,7 +10967,10 @@ class Intent$ShortcutIconResource extends jni$_.JObject {
/// The returned object must be released after use, by calling the [release] method.
factory Intent$ShortcutIconResource() {
return Intent$ShortcutIconResource.fromReference(
_new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr).reference,
_new$(
_class.reference.pointer,
_id_new$ as jni$_.JMethodIDPtr,
).reference,
);
}
@@ -11241,7 +11320,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_BATTERY_CHANGED`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_BATTERY_CHANGED =>
_id_ACTION_BATTERY_CHANGED.get(_class, const jni$_.JStringNullableType());
_id_ACTION_BATTERY_CHANGED.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_BATTERY_LOW = _class.staticFieldId(
r'ACTION_BATTERY_LOW',
@@ -11367,7 +11449,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_CREATE_DOCUMENT`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_CREATE_DOCUMENT =>
_id_ACTION_CREATE_DOCUMENT.get(_class, const jni$_.JStringNullableType());
_id_ACTION_CREATE_DOCUMENT.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_CREATE_REMINDER = _class.staticFieldId(
r'ACTION_CREATE_REMINDER',
@@ -11377,7 +11462,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_CREATE_REMINDER`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_CREATE_REMINDER =>
_id_ACTION_CREATE_REMINDER.get(_class, const jni$_.JStringNullableType());
_id_ACTION_CREATE_REMINDER.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_CREATE_SHORTCUT = _class.staticFieldId(
r'ACTION_CREATE_SHORTCUT',
@@ -11387,7 +11475,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_CREATE_SHORTCUT`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_CREATE_SHORTCUT =>
_id_ACTION_CREATE_SHORTCUT.get(_class, const jni$_.JStringNullableType());
_id_ACTION_CREATE_SHORTCUT.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_DATE_CHANGED = _class.staticFieldId(
r'ACTION_DATE_CHANGED',
@@ -11649,7 +11740,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_INSTALL_FAILURE`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_INSTALL_FAILURE =>
_id_ACTION_INSTALL_FAILURE.get(_class, const jni$_.JStringNullableType());
_id_ACTION_INSTALL_FAILURE.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_INSTALL_PACKAGE = _class.staticFieldId(
r'ACTION_INSTALL_PACKAGE',
@@ -11659,7 +11753,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_INSTALL_PACKAGE`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_INSTALL_PACKAGE =>
_id_ACTION_INSTALL_PACKAGE.get(_class, const jni$_.JStringNullableType());
_id_ACTION_INSTALL_PACKAGE.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_LOCALE_CHANGED = _class.staticFieldId(
r'ACTION_LOCALE_CHANGED',
@@ -11941,7 +12038,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_MEDIA_UNMOUNTED`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_MEDIA_UNMOUNTED =>
_id_ACTION_MEDIA_UNMOUNTED.get(_class, const jni$_.JStringNullableType());
_id_ACTION_MEDIA_UNMOUNTED.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_MY_PACKAGE_REPLACED = _class.staticFieldId(
r'ACTION_MY_PACKAGE_REPLACED',
@@ -12062,7 +12162,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_PACKAGE_CHANGED`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_PACKAGE_CHANGED =>
_id_ACTION_PACKAGE_CHANGED.get(_class, const jni$_.JStringNullableType());
_id_ACTION_PACKAGE_CHANGED.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_PACKAGE_DATA_CLEARED = _class.staticFieldId(
r'ACTION_PACKAGE_DATA_CLEARED',
@@ -12111,7 +12214,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_PACKAGE_INSTALL`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_PACKAGE_INSTALL =>
_id_ACTION_PACKAGE_INSTALL.get(_class, const jni$_.JStringNullableType());
_id_ACTION_PACKAGE_INSTALL.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_PACKAGE_NEEDS_VERIFICATION = _class.staticFieldId(
r'ACTION_PACKAGE_NEEDS_VERIFICATION',
@@ -12134,7 +12240,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_PACKAGE_REMOVED`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_PACKAGE_REMOVED =>
_id_ACTION_PACKAGE_REMOVED.get(_class, const jni$_.JStringNullableType());
_id_ACTION_PACKAGE_REMOVED.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_PACKAGE_REPLACED = _class.staticFieldId(
r'ACTION_PACKAGE_REPLACED',
@@ -12213,7 +12322,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_POWER_CONNECTED`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_POWER_CONNECTED =>
_id_ACTION_POWER_CONNECTED.get(_class, const jni$_.JStringNullableType());
_id_ACTION_POWER_CONNECTED.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_POWER_DISCONNECTED = _class.staticFieldId(
r'ACTION_POWER_DISCONNECTED',
@@ -12471,7 +12583,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_SYSTEM_TUTORIAL`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_SYSTEM_TUTORIAL =>
_id_ACTION_SYSTEM_TUTORIAL.get(_class, const jni$_.JStringNullableType());
_id_ACTION_SYSTEM_TUTORIAL.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_TIMEZONE_CHANGED = _class.staticFieldId(
r'ACTION_TIMEZONE_CHANGED',
@@ -12570,7 +12685,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_USER_BACKGROUND`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_USER_BACKGROUND =>
_id_ACTION_USER_BACKGROUND.get(_class, const jni$_.JStringNullableType());
_id_ACTION_USER_BACKGROUND.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_USER_FOREGROUND = _class.staticFieldId(
r'ACTION_USER_FOREGROUND',
@@ -12580,7 +12698,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_USER_FOREGROUND`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_USER_FOREGROUND =>
_id_ACTION_USER_FOREGROUND.get(_class, const jni$_.JStringNullableType());
_id_ACTION_USER_FOREGROUND.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_USER_INITIALIZE = _class.staticFieldId(
r'ACTION_USER_INITIALIZE',
@@ -12590,7 +12711,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String ACTION_USER_INITIALIZE`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get ACTION_USER_INITIALIZE =>
_id_ACTION_USER_INITIALIZE.get(_class, const jni$_.JStringNullableType());
_id_ACTION_USER_INITIALIZE.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_ACTION_USER_PRESENT = _class.staticFieldId(
r'ACTION_USER_PRESENT',
@@ -12827,7 +12951,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String CATEGORY_APP_MESSAGING`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get CATEGORY_APP_MESSAGING =>
_id_CATEGORY_APP_MESSAGING.get(_class, const jni$_.JStringNullableType());
_id_CATEGORY_APP_MESSAGING.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_CATEGORY_APP_MUSIC = _class.staticFieldId(
r'CATEGORY_APP_MUSIC',
@@ -13245,7 +13372,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String EXTRA_ATTRIBUTION_TAGS`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get EXTRA_ATTRIBUTION_TAGS =>
_id_EXTRA_ATTRIBUTION_TAGS.get(_class, const jni$_.JStringNullableType());
_id_EXTRA_ATTRIBUTION_TAGS.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_EXTRA_AUTO_LAUNCH_SINGLE_CHOICE = _class.staticFieldId(
r'EXTRA_AUTO_LAUNCH_SINGLE_CHOICE',
@@ -13337,7 +13467,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String EXTRA_CHANGED_UID_LIST`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get EXTRA_CHANGED_UID_LIST =>
_id_EXTRA_CHANGED_UID_LIST.get(_class, const jni$_.JStringNullableType());
_id_EXTRA_CHANGED_UID_LIST.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_EXTRA_CHOOSER_REFINEMENT_INTENT_SENDER = _class
.staticFieldId(
@@ -13371,7 +13504,10 @@ class Intent extends jni$_.JObject {
/// from: `static public final java.lang.String EXTRA_CHOSEN_COMPONENT`
/// The returned object must be released after use, by calling the [release] method.
static jni$_.JString? get EXTRA_CHOSEN_COMPONENT =>
_id_EXTRA_CHOSEN_COMPONENT.get(_class, const jni$_.JStringNullableType());
_id_EXTRA_CHOSEN_COMPONENT.get(
_class,
const jni$_.JStringNullableType(),
);
static final _id_EXTRA_CHOSEN_COMPONENT_INTENT_SENDER = _class.staticFieldId(
r'EXTRA_CHOSEN_COMPONENT_INTENT_SENDER',
@@ -14212,11 +14348,16 @@ class Intent extends jni$_.JObject {
/// The returned object must be released after use, by calling the [release] method.
factory Intent() {
return Intent.fromReference(
_new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr).reference,
_new$(
_class.reference.pointer,
_id_new$ as jni$_.JMethodIDPtr,
).reference,
);
}
static final _id_new$1 = _class.constructorId(r'(Landroid/content/Intent;)V');
static final _id_new$1 = _class.constructorId(
r'(Landroid/content/Intent;)V',
);
static final _new$1 =
jni$_.ProtectedJniExtensions.lookup<
@@ -15126,7 +15267,9 @@ class Intent extends jni$_.JObject {
reference.pointer,
_id_getCategories as jni$_.JMethodIDPtr,
).object<jni$_.JSet<jni$_.JString?>?>(
const jni$_.JSetNullableType<jni$_.JString?>(jni$_.JStringNullableType()),
const jni$_.JSetNullableType<jni$_.JString?>(
jni$_.JStringNullableType(),
),
);
}
@@ -15738,7 +15881,9 @@ class Intent extends jni$_.JObject {
/// from: `public android.os.Parcelable[] getParcelableArrayExtra(java.lang.String string)`
/// The returned object must be released after use, by calling the [release] method.
jni$_.JArray<jni$_.JObject?>? getParcelableArrayExtra(jni$_.JString? string) {
jni$_.JArray<jni$_.JObject?>? getParcelableArrayExtra(
jni$_.JString? string,
) {
final _$string = string?.reference ?? jni$_.jNullReference;
return _getParcelableArrayExtra(
reference.pointer,
@@ -15791,7 +15936,9 @@ class Intent extends jni$_.JObject {
_id_getParcelableArrayExtra$1 as jni$_.JMethodIDPtr,
_$string.pointer,
_$class$.pointer,
).object<jni$_.JArray<$T?>?>(jni$_.JArrayNullableType<$T?>(T.nullableType));
).object<jni$_.JArray<$T?>?>(
jni$_.JArrayNullableType<$T?>(T.nullableType),
);
}
static final _id_getParcelableArrayListExtra = _class.instanceMethodId(
@@ -19146,7 +19293,10 @@ class Activity extends jni$_.JObject {
/// The returned object must be released after use, by calling the [release] method.
factory Activity() {
return Activity.fromReference(
_new$(_class.reference.pointer, _id_new$ as jni$_.JMethodIDPtr).reference,
_new$(
_class.reference.pointer,
_id_new$ as jni$_.JMethodIDPtr,
).reference,
);
}
@@ -19457,10 +19607,11 @@ class Activity extends jni$_.JObject {
).object<jni$_.JObject?>(const jni$_.JObjectNullableType());
}
static final _id_registerActivityLifecycleCallbacks = _class.instanceMethodId(
r'registerActivityLifecycleCallbacks',
r'(Landroid/app/Application$ActivityLifecycleCallbacks;)V',
);
static final _id_registerActivityLifecycleCallbacks = _class
.instanceMethodId(
r'registerActivityLifecycleCallbacks',
r'(Landroid/app/Application$ActivityLifecycleCallbacks;)V',
);
static final _registerActivityLifecycleCallbacks =
jni$_.ProtectedJniExtensions.lookup<
@@ -22419,10 +22570,11 @@ class Activity extends jni$_.JObject {
).boolean;
}
static final _id_dispatchPopulateAccessibilityEvent = _class.instanceMethodId(
r'dispatchPopulateAccessibilityEvent',
r'(Landroid/view/accessibility/AccessibilityEvent;)Z',
);
static final _id_dispatchPopulateAccessibilityEvent = _class
.instanceMethodId(
r'dispatchPopulateAccessibilityEvent',
r'(Landroid/view/accessibility/AccessibilityEvent;)Z',
);
static final _dispatchPopulateAccessibilityEvent =
jni$_.ProtectedJniExtensions.lookup<
@@ -23263,7 +23415,10 @@ class Activity extends jni$_.JObject {
).check();
}
static final _id_showDialog = _class.instanceMethodId(r'showDialog', r'(I)V');
static final _id_showDialog = _class.instanceMethodId(
r'showDialog',
r'(I)V',
);
static final _showDialog =
jni$_.ProtectedJniExtensions.lookup<
@@ -23857,7 +24012,11 @@ class Activity extends jni$_.JObject {
/// from: `public void setTheme(int i)`
void setTheme(int i) {
_setTheme(reference.pointer, _id_setTheme as jni$_.JMethodIDPtr, i).check();
_setTheme(
reference.pointer,
_id_setTheme as jni$_.JMethodIDPtr,
i,
).check();
}
static final _id_requestPermissions = _class.instanceMethodId(
@@ -25209,7 +25368,10 @@ class Activity extends jni$_.JObject {
).object<jni$_.JObject?>(const jni$_.JObjectNullableType());
}
static final _id_setVisible = _class.instanceMethodId(r'setVisible', r'(Z)V');
static final _id_setVisible = _class.instanceMethodId(
r'setVisible',
r'(Z)V',
);
static final _setVisible =
jni$_.ProtectedJniExtensions.lookup<
@@ -27686,13 +27848,15 @@ class Instant extends jni$_.JObject {
/// from: `static public final java.time.Instant MAX`
/// The returned object must be released after use, by calling the [release] method.
static Instant? get MAX => _id_MAX.get(_class, const $Instant$NullableType());
static Instant? get MAX =>
_id_MAX.get(_class, const $Instant$NullableType());
static final _id_MIN = _class.staticFieldId(r'MIN', r'Ljava/time/Instant;');
/// from: `static public final java.time.Instant MIN`
/// The returned object must be released after use, by calling the [release] method.
static Instant? get MIN => _id_MIN.get(_class, const $Instant$NullableType());
static Instant? get MIN =>
_id_MIN.get(_class, const $Instant$NullableType());
static final _id_now = _class.staticMethodId(
r'now',
@@ -29447,7 +29611,8 @@ final class $AggregateGroupByPeriodRequest$NullableType
@core$_.override
bool operator ==(Object other) {
return other.runtimeType == ($AggregateGroupByPeriodRequest$NullableType) &&
return other.runtimeType ==
($AggregateGroupByPeriodRequest$NullableType) &&
other is $AggregateGroupByPeriodRequest$NullableType;
}
}
@@ -30953,13 +31118,21 @@ class AggregateMetric$Converter$FromDouble<$R extends jni$_.JObject>
) {
return _$invokeMethod(
port,
jni$_.MethodInvocation.fromAddresses(0, descriptor.address, args.address),
jni$_.MethodInvocation.fromAddresses(
0,
descriptor.address,
args.address,
),
);
}
static final jni$_.Pointer<
jni$_.NativeFunction<
jni$_.JObjectPtr Function(jni$_.Int64, jni$_.JObjectPtr, jni$_.JObjectPtr)
jni$_.JObjectPtr Function(
jni$_.Int64,
jni$_.JObjectPtr,
jni$_.JObjectPtr,
)
>
>
_$invokePointer = jni$_.Pointer.fromFunction(_$invoke);
@@ -31080,7 +31253,9 @@ final class $AggregateMetric$Converter$FromDouble$NullableType<
}
}
final class $AggregateMetric$Converter$FromDouble$Type<$R extends jni$_.JObject>
final class $AggregateMetric$Converter$FromDouble$Type<
$R extends jni$_.JObject
>
extends jni$_.JObjType<AggregateMetric$Converter$FromDouble<$R>> {
@jni$_.internal
final jni$_.JObjType<$R> R;
@@ -31166,13 +31341,21 @@ class AggregateMetric$Converter$FromLong<$R extends jni$_.JObject>
) {
return _$invokeMethod(
port,
jni$_.MethodInvocation.fromAddresses(0, descriptor.address, args.address),
jni$_.MethodInvocation.fromAddresses(
0,
descriptor.address,
args.address,
),
);
}
static final jni$_.Pointer<
jni$_.NativeFunction<
jni$_.JObjectPtr Function(jni$_.Int64, jni$_.JObjectPtr, jni$_.JObjectPtr)
jni$_.JObjectPtr Function(
jni$_.Int64,
jni$_.JObjectPtr,
jni$_.JObjectPtr,
)
>
>
_$invokePointer = jni$_.Pointer.fromFunction(_$invoke);
@@ -31230,8 +31413,9 @@ class AggregateMetric$Converter$FromLong<$R extends jni$_.JObject>
abstract base mixin class $AggregateMetric$Converter$FromLong<
$R extends jni$_.JObject
> {
factory $AggregateMetric$Converter$FromLong({required jni$_.JObjType<$R> R}) =
_$AggregateMetric$Converter$FromLong<$R>;
factory $AggregateMetric$Converter$FromLong({
required jni$_.JObjType<$R> R,
}) = _$AggregateMetric$Converter$FromLong<$R>;
jni$_.JObjType<$R> get R;
}
@@ -31387,13 +31571,21 @@ class AggregateMetric$Converter<
) {
return _$invokeMethod(
port,
jni$_.MethodInvocation.fromAddresses(0, descriptor.address, args.address),
jni$_.MethodInvocation.fromAddresses(
0,
descriptor.address,
args.address,
),
);
}
static final jni$_.Pointer<
jni$_.NativeFunction<
jni$_.JObjectPtr Function(jni$_.Int64, jni$_.JObjectPtr, jni$_.JObjectPtr)
jni$_.JObjectPtr Function(
jni$_.Int64,
jni$_.JObjectPtr,
jni$_.JObjectPtr,
)
>
>
_$invokePointer = jni$_.Pointer.fromFunction(_$invoke);
@@ -31549,8 +31741,9 @@ final class $AggregateMetric$Converter$Type<
@jni$_.internal
@core$_.override
AggregateMetric$Converter<$T, $R> fromReference(jni$_.JReference reference) =>
AggregateMetric$Converter<$T, $R>.fromReference(T, R, reference);
AggregateMetric$Converter<$T, $R> fromReference(
jni$_.JReference reference,
) => AggregateMetric$Converter<$T, $R>.fromReference(T, R, reference);
@jni$_.internal
@core$_.override
jni$_.JObjType get superType => const jni$_.JObjectNullableType();
@@ -31701,7 +31894,9 @@ final class $AggregateMetric$NullableType<$T extends jni$_.JObject>
@jni$_.internal
@core$_.override
AggregateMetric<$T>? fromReference(jni$_.JReference reference) =>
reference.isNull ? null : AggregateMetric<$T>.fromReference(T, reference);
reference.isNull
? null
: AggregateMetric<$T>.fromReference(T, reference);
@jni$_.internal
@core$_.override
jni$_.JObjType get superType => const jni$_.JObjectType();

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -4,6 +4,9 @@ description: A collection of samples for Dart and Flutter.
environment:
sdk: ^3.9.0-0
dependencies:
flutter_lints: ^6.0.0
workspace:
- add_to_app/android_view/flutter_module_using_plugin_android_view
- add_to_app/android_view/flutter_module_using_plugin_content_sizing_android_view

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -1 +1 @@
include: package:analysis_defaults/flutter.yaml
include: ../analysis_options.yaml

View File

@@ -1,5 +1,8 @@
// ignore_for_file: avoid_print,
import 'dart:convert';
import 'dart:io';
import 'package:path/path.dart' as path;
import 'package:yaml/yaml.dart';
@@ -38,8 +41,9 @@ Future<void> main() async {
final packages = workspace
.where((e) {
if (skipCiList != null && skipCiList.contains(e)) return false;
if (channelSkipList != null && channelSkipList.contains(e))
if (channelSkipList != null && channelSkipList.contains(e)) {
return false;
}
return true;
})
.map((e) => e.toString())
@@ -99,7 +103,9 @@ Future<String> _getFlutterChannel() async {
'--machine',
], runInShell: true);
if (result.exitCode != 0) {
print('Flutter version command failed with exit code ${result.exitCode}');
print(
'Flutter version command failed with exit code ${result.exitCode}',
);
print('Stdout: ${result.stdout}');
print('Stderr: ${result.stderr}');
return 'unknown';

View File

@@ -1,4 +1,7 @@
// ignore_for_file: avoid_print,
import 'dart:io';
import 'package:args/args.dart';
import 'package:path/path.dart' as path;
import 'package:yaml/yaml.dart';

View File

@@ -1,4 +1,7 @@
// ignore_for_file: avoid_print,
import 'dart:io';
import 'package:path/path.dart' as path;
import 'package:yaml/yaml.dart';

View File

@@ -163,7 +163,7 @@ class ReleaseScriptRunner {
Future<bool> _processProject(String projectPath, String dartVersion) async {
final projectName = p.basename(projectPath);
final projectDir = Directory(projectPath);
final issues = [];
final issues = <String>[];
if (!projectDir.existsSync()) {
log(red.wrap('Project directory not found: $projectPath'), stderr);
@@ -174,7 +174,10 @@ class ReleaseScriptRunner {
log(styleBold.wrap('Processing project: $projectName'), stdout);
log(styleBold.wrap('=========================================')!, stdout);
log(blue.wrap('Updating SDK constraints to use Dart $dartVersion'), stdout);
log(
blue.wrap('Updating SDK constraints to use Dart $dartVersion'),
stdout,
);
if (!_isDryRun) {
if (!await _updateSdkConstraints(projectPath, dartVersion)) {
log(
@@ -191,7 +194,10 @@ class ReleaseScriptRunner {
'--fatal-infos',
'--fatal-warnings',
]),
Command('dart format', 'Running dart format...', 'dart', ['format', '.']),
Command('dart format', 'Running dart format...', 'dart', [
'format',
'.',
]),
];
final testDir = Directory(p.join(projectPath, 'test'));
@@ -211,7 +217,10 @@ class ReleaseScriptRunner {
);
if (!didPass) {
log(red.wrap('${command.displayName} failed for $projectName'), stderr);
log(
red.wrap('${command.displayName} failed for $projectName'),
stderr,
);
if (command.displayName == 'pub upgrade' ||
command.displayName == 'pub get' &&
@@ -255,7 +264,7 @@ class ReleaseScriptRunner {
}
try {
final newConstraint = '^${versionString}-0';
final newConstraint = '^$versionString-0';
final content = await pubspecFile.readAsString();
final editor = YamlEditor(content);
@@ -307,16 +316,18 @@ class ReleaseScriptRunner {
.transform(SystemEncoding().decoder)
.forEach((line) {
log(line, stdout);
if (!_isOnlyWhitespace(line))
output.writeln('${line.trim().padLeft(2)}');
if (!_isOnlyWhitespace(line)) {
output.writeln(line.trim().padLeft(2));
}
});
final stderrFuture = process.stderr
.transform(SystemEncoding().decoder)
.forEach((line) {
log(red.wrap(line), stderr);
if (!_isOnlyWhitespace(line))
output.writeln('${line.trim().padLeft(2)}');
if (!_isOnlyWhitespace(line)) {
output.writeln(line.trim().padLeft(2));
}
});
await Future.wait([stdoutFuture, stderrFuture]);
@@ -325,7 +336,10 @@ class ReleaseScriptRunner {
}
void _printSummary(int total, List<String> failed) {
log(styleBold.wrap('\n=========================================')!, stdout);
log(
styleBold.wrap('\n=========================================')!,
stdout,
);
log(styleBold.wrap('Update Summary')!, stdout);
log(styleBold.wrap('=========================================')!, stdout);
log(blue.wrap('Total projects processed: $total'), stdout);

View File

@@ -90,16 +90,12 @@ class _MyAppState extends State<MyApp> {
switch (screenString) {
case 'counter':
_currentDemoScreen = DemoScreen.counter;
break;
case 'textField':
_currentDemoScreen = DemoScreen.textField;
break;
case 'custom':
_currentDemoScreen = DemoScreen.custom;
break;
default:
_currentDemoScreen = DemoScreen.counter;
break;
}
});
}

View File

@@ -1,6 +1,14 @@
include: package:flutter_lints/flutter.yaml
include: ../../../analysis_options.yaml
analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
- macos/**
- linux/**
language:
strict-casts: true
strict-inference: true