diff --git a/packages/firebase_ai/firebase_ai/example/lib/main.dart b/packages/firebase_ai/firebase_ai/example/lib/main.dart index a7fd0363aba7..1b105c97c604 100644 --- a/packages/firebase_ai/firebase_ai/example/lib/main.dart +++ b/packages/firebase_ai/firebase_ai/example/lib/main.dart @@ -234,7 +234,7 @@ class _HomeScreenState extends State { onChanged: widget.onBackendChanged, activeTrackColor: Colors.green.withValues(alpha: 0.5), inactiveTrackColor: Colors.blueGrey.withValues(alpha: 0.5), - activeColor: Colors.green, + activeThumbColor: Colors.green, inactiveThumbColor: Colors.blueGrey, ), Text( diff --git a/packages/firebase_data_connect/firebase_data_connect/lib/src/core/ref.dart b/packages/firebase_data_connect/firebase_data_connect/lib/src/core/ref.dart index 3bfb50cf1e64..2565521caaf8 100644 --- a/packages/firebase_data_connect/firebase_data_connect/lib/src/core/ref.dart +++ b/packages/firebase_data_connect/firebase_data_connect/lib/src/core/ref.dart @@ -56,7 +56,7 @@ abstract class OperationRef { Future _shouldRetry() async { String? newToken; try { - newToken = await this.dataConnect.auth?.currentUser?.getIdToken(); + newToken = await dataConnect.auth?.currentUser?.getIdToken(); } catch (e) { // Don't retry if there was an issue getting the ID Token. log('There was an error attempting to retrieve the ID Token: $e'); @@ -152,12 +152,12 @@ class QueryRef extends OperationRef { Future> execute() async { bool shouldRetry = await _shouldRetry(); try { - QueryResult r = await this._executeOperation(_lastToken); + QueryResult r = await _executeOperation(_lastToken); return r; } on DataConnectError catch (e) { if (shouldRetry && e.code == DataConnectErrorCode.unauthorized.toString()) { - return this.execute(); + return execute(); } else { rethrow; } @@ -201,7 +201,7 @@ class QueryRef extends OperationRef { .cast>(); if (_queryManager.containsQuery(operationName, variables, varsSerialized)) { try { - this.execute(); + execute(); } catch (_) { // Call to `execute` should properly pass the error to the Stream. log('Error thrown by execute. The error will propagate via onError.'); @@ -234,13 +234,12 @@ class MutationRef extends OperationRef { try { // Logic below is duplicated due to the fact that `executeOperation` returns // an `OperationResult` here, and `QueryRef` expects a `QueryResult`. - OperationResult r = - await this._executeOperation(_lastToken); + OperationResult r = await _executeOperation(_lastToken); return r; } on DataConnectError catch (e) { if (shouldRetry && e.code == DataConnectErrorCode.unauthorized.toString()) { - return this.execute(); + return execute(); } else { rethrow; } diff --git a/packages/firebase_vertexai/firebase_vertexai/example/lib/main.dart b/packages/firebase_vertexai/firebase_vertexai/example/lib/main.dart index 4cef5dd9643d..3e80fd0d2fda 100644 --- a/packages/firebase_vertexai/firebase_vertexai/example/lib/main.dart +++ b/packages/firebase_vertexai/firebase_vertexai/example/lib/main.dart @@ -232,7 +232,7 @@ class _HomeScreenState extends State { onChanged: widget.onBackendChanged, activeTrackColor: Colors.green.withValues(alpha: 0.5), inactiveTrackColor: Colors.blueGrey.withValues(alpha: 0.5), - activeColor: Colors.green, + activeThumbColor: Colors.green, inactiveThumbColor: Colors.blueGrey, ), Text( diff --git a/scripts/generate_versions_gradle.dart b/scripts/generate_versions_gradle.dart index 072e984952b3..89892e2fc97e 100644 --- a/scripts/generate_versions_gradle.dart +++ b/scripts/generate_versions_gradle.dart @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// ignore_for_file: avoid_print + import 'dart:io'; import 'package:cli_util/cli_logging.dart' as logging; @@ -36,7 +38,7 @@ void main() async { // Define files using paths final globalConfig = File(globalConfigPath); - + // Check if the files exist if (!globalConfig.existsSync()) { throw Exception( @@ -68,7 +70,7 @@ void main() async { print('File copied to: ${copiedConfig.path}'); final gradlePropertiesFilePath = '${package.path}/example/android/gradle.properties'; - extractAndWriteProperty( + await extractAndWriteProperty( globalConfig: globalConfig, gradlePropertiesFile: File(gradlePropertiesFilePath), ); @@ -80,11 +82,10 @@ void main() async { final copiedConfig = await globalConfig.copy( localConfigGradleFilePath, ); - // ignore: avoid_print print('File copied to: ${copiedConfig.path}'); - + final gradlePropertiesFilePath = '${package.path}/example/android/gradle.properties'; - extractAndWriteProperty( + await extractAndWriteProperty( globalConfig: globalConfig, gradlePropertiesFile: File(gradlePropertiesFilePath), ); @@ -123,7 +124,7 @@ Future extractAndWriteProperty({ }) async { const String propertyName = 'androidGradlePluginVersion'; - if (!await globalConfig.exists()) { + if (!globalConfig.existsSync()) { print('Global config file not found: ${globalConfig.path}'); return; } @@ -141,7 +142,7 @@ Future extractAndWriteProperty({ final value = match.group(1); - final lines = await gradlePropertiesFile.exists() + final lines = gradlePropertiesFile.existsSync() ? await gradlePropertiesFile.readAsLines() : []; diff --git a/scripts/generate_versions_spm.dart b/scripts/generate_versions_spm.dart index 7977465ce2d9..d0f3b8a8ce1b 100644 --- a/scripts/generate_versions_spm.dart +++ b/scripts/generate_versions_spm.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// ignore_for_file: avoid_print + import 'package:melos/melos.dart' as melos; import 'package:glob/glob.dart'; import 'dart:io'; @@ -131,7 +133,11 @@ void updateVersionsPackageSwift(String firebaseiOSVersion) { void updateLibraryVersionPureSwiftPlugins() { // Packages that require updating library versions - const packages = ['firebase_ml_model_downloader', 'firebase_app_installations', 'cloud_functions']; + const packages = [ + 'firebase_ml_model_downloader', + 'firebase_app_installations', + 'cloud_functions', + ]; for (final package in packages) { final pubspecPath = 'packages/$package/$package/pubspec.yaml';