Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/_flutterfire_internals/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ version: 1.3.79
resolution: workspace

environment:
sdk: '^3.10.0'
flutter: '>=3.38.0'
sdk: '^3.12.0'
flutter: '>=3.44.0'

dependencies:
collection: ^1.0.0
Expand Down
4 changes: 2 additions & 2 deletions packages/cloud_firestore/cloud_firestore/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: Demonstrates how to use the firestore plugin.
resolution: workspace

environment:
sdk: '^3.10.0'
flutter: '>=3.38.0'
sdk: '^3.12.0'
flutter: '>=3.44.0'

dependencies:
cloud_firestore: ^7.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class AliasedAggregateFunction implements PipelineSerializable {
final PipelineAggregateFunction aggregateFunction;

AliasedAggregateFunction({
required String alias,
required this._alias,
required this.aggregateFunction,
}) : _alias = alias;
});

String get alias => _alias;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1952,8 +1952,7 @@ class AliasedExpression extends Selectable {
@override
final Expression expression;

AliasedExpression({required String alias, required this.expression})
: _alias = alias;
AliasedExpression({required this._alias, required this.expression});

@override
String get name => 'alias';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,15 @@ final class SearchStage implements PipelineSerializable {
final int? _retrievalDepth;

SearchStage._({
required _SearchQueryType queryType,
required Object query,
List<Ordering>? sort,
List<Selectable>? addFields,
String? languageCode,
int? limit,
int? offset,
int? retrievalDepth,
}) : _queryType = queryType,
_query = query,
_sort = sort,
_addFields = addFields,
_languageCode = languageCode,
_limit = limit,
_offset = offset,
_retrievalDepth = retrievalDepth;
required this._queryType,
required this._query,
this._sort,
this._addFields,
this._languageCode,
this._limit,
this._offset,
this._retrievalDepth,
});

/// Creates a search stage from a raw query string.
SearchStage.withQuery(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@ class PipelineResult {
/// Retrieves all fields in the result as a map.
final Map<String, dynamic>? _data;

PipelineResult({
this.document,
this.createTime,
this.updateTime,
Map<String, dynamic>? data,
}) : _data = data;
PipelineResult({this.document, this.createTime, this.updateTime, this._data});

/// Retrieves all fields in the result as a map.
Map<String, dynamic>? data() => _data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ version: 1.0.0+1
resolution: workspace

environment:
sdk: '^3.10.0'
flutter: '>=3.38.0'
sdk: '^3.12.0'
flutter: '>=3.44.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand Down
4 changes: 2 additions & 2 deletions packages/cloud_firestore/cloud_firestore/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ false_secrets:
- dartpad/**

environment:
sdk: '^3.10.0'
flutter: '>=3.38.0'
sdk: '^3.12.0'
flutter: '>=3.44.0'

dependencies:
cloud_firestore_platform_interface: ^8.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ import 'package:plugin_platform_interface/plugin_platform_interface.dart';
/// [AggregateQuerySnapshotPlatform] represents a response to an [AggregateQueryPlatform] request.
class AggregateQuerySnapshotPlatform extends PlatformInterface {
AggregateQuerySnapshotPlatform({
required int? count,
required List<AggregateQueryResponse> sum,
required List<AggregateQueryResponse> average,
}) : _count = count,
_sum = sum,
_average = average,
super(token: _token);
required this._count,
required this._sum,
required this._average,
}) : super(token: _token);

static final Object _token = Object();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ homepage: https://github.com/firebase/flutterfire/tree/main/packages/cloud_fires
repository: https://github.com/firebase/flutterfire/tree/main/packages/cloud_firestore/cloud_firestore_platform_interface

environment:
sdk: '^3.10.0'
flutter: '>=3.38.0'
sdk: '^3.12.0'
flutter: '>=3.44.0'

dependencies:
_flutterfire_internals: ^1.3.79
Expand Down
4 changes: 2 additions & 2 deletions packages/cloud_firestore/cloud_firestore_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ version: 5.8.0
resolution: workspace

environment:
sdk: '^3.10.0'
flutter: '>=3.38.0'
sdk: '^3.12.0'
flutter: '>=3.44.0'

dependencies:
_flutterfire_internals: ^1.3.79
Expand Down
17 changes: 12 additions & 5 deletions packages/cloud_functions/cloud_functions/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ version = '1.0-SNAPSHOT'
apply plugin: 'com.android.library'
apply from: file("local-config.gradle")

// AGP 9+ has built-in Kotlin support unless Flutter opts out via android.builtInKotlin=false.
// AGP 9+ uses built-in Kotlin unless android.builtInKotlin=false.
// Do not apply the Kotlin Gradle Plugin. Flutter flags that apply line
// even inside a version check, and AGP 10 rejects it.
def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0] as int
def builtInKotlin = providers.gradleProperty("android.builtInKotlin")
.map { it.toBoolean() }
.orElse(agpMajor >= 9)
.get()
if (agpMajor < 9 || !builtInKotlin) {
apply plugin: 'kotlin-android'
}

buildscript {
repositories {
Expand Down Expand Up @@ -87,12 +86,20 @@ android {

}

plugins.withId("org.jetbrains.kotlin.android") {
if (agpMajor >= 9 && builtInKotlin) {
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(project.ext.javaVersion.toString())
}
}
} else {
plugins.withId("org.jetbrains.kotlin.android") {
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(project.ext.javaVersion.toString())
}
}
}
}

apply from: file("./user-agent.gradle")
4 changes: 2 additions & 2 deletions packages/cloud_functions/cloud_functions/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: Demonstrates how to use the cloud_functions plugin.
resolution: workspace

environment:
sdk: '^3.10.0'
flutter: '>=3.38.0'
sdk: '^3.12.0'
flutter: '>=3.44.0'

dependencies:
cloud_functions: ^7.0.1
Expand Down
4 changes: 2 additions & 2 deletions packages/cloud_functions/cloud_functions/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ false_secrets:
- example/**

environment:
sdk: '^3.10.0'
flutter: '>=3.38.0'
sdk: '^3.12.0'
flutter: '>=3.44.0'

dependencies:
cloud_functions_platform_interface: ^6.1.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ version: 6.1.1
resolution: workspace

environment:
sdk: '^3.10.0'
flutter: '>=3.38.0'
sdk: '^3.12.0'
flutter: '>=3.44.0'

dependencies:
firebase_core: ^5.1.0
Expand Down
4 changes: 2 additions & 2 deletions packages/cloud_functions/cloud_functions_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ version: 5.1.15
resolution: workspace

environment:
sdk: '^3.10.0'
flutter: '>=3.38.0'
sdk: '^3.12.0'
flutter: '>=3.44.0'

dependencies:
cloud_functions_platform_interface: ^6.1.1
Expand Down
17 changes: 12 additions & 5 deletions packages/firebase_ai/firebase_ai/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ version = '1.0-SNAPSHOT'
apply plugin: 'com.android.library'
apply from: file("local-config.gradle")

// AGP 9+ has built-in Kotlin support unless Flutter opts out via android.builtInKotlin=false.
// AGP 9+ uses built-in Kotlin unless android.builtInKotlin=false.
// Do not apply the Kotlin Gradle Plugin. Flutter flags that apply line
// even inside a version check, and AGP 10 rejects it.
def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0] as int
def builtInKotlin = providers.gradleProperty("android.builtInKotlin")
.map { it.toBoolean() }
.orElse(agpMajor >= 9)
.get()
if (agpMajor < 9 || !builtInKotlin) {
apply plugin: 'kotlin-android'
}

buildscript {
repositories {
Expand Down Expand Up @@ -75,12 +74,20 @@ android {
}
}

plugins.withId("org.jetbrains.kotlin.android") {
if (agpMajor >= 9 && builtInKotlin) {
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(project.ext.javaVersion.toString())
}
}
} else {
plugins.withId("org.jetbrains.kotlin.android") {
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(project.ext.javaVersion.toString())
}
}
}
}

apply from: file("./user-agent.gradle")
4 changes: 2 additions & 2 deletions packages/firebase_ai/firebase_ai/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ version: 1.0.0+1
resolution: workspace

environment:
sdk: '^3.10.0'
flutter: '>=3.38.0'
sdk: '^3.12.0'
flutter: '>=3.44.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand Down
15 changes: 5 additions & 10 deletions packages/firebase_ai/firebase_ai/lib/src/base_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,7 @@ final class _TemplateGoogleAIUri implements _TemplateUri {
/// This class provides the basic functionality for interacting with the
/// Firebase AI API. It is not intended to be instantiated directly.
abstract class BaseModel {
BaseModel._({
required SerializationStrategy serializationStrategy,
required _ModelUri modelUri,
}) : _serializationStrategy = serializationStrategy,
_modelUri = modelUri;
BaseModel._({required this._serializationStrategy, required this._modelUri});

final SerializationStrategy _serializationStrategy;
final _ModelUri _modelUri;
Expand Down Expand Up @@ -339,9 +335,8 @@ abstract class BaseApiClientModel extends BaseModel {
BaseApiClientModel({
required super.serializationStrategy,
required super.modelUri,
required ApiClient client,
}) : _client = client,
super._();
required this._client,
}) : super._();

final ApiClient _client;

Expand All @@ -368,8 +363,8 @@ abstract class BaseTemplateApiClientModel extends BaseApiClientModel {
required super.serializationStrategy,
required super.modelUri,
required super.client,
required _TemplateUri templateUri,
}) : _templateUri = templateUri;
required this._templateUri,
});

final _TemplateUri _templateUri;

Expand Down
10 changes: 4 additions & 6 deletions packages/firebase_ai/firebase_ai/lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ final _utf8Json = json.fuse(utf8);
final class HttpApiClient implements ApiClient {
///Constructor
HttpApiClient({
required String apiKey,
required this._apiKey,
http.Client? httpClient,
FutureOr<Map<String, String>> Function()? requestHeaders,
}) : _apiKey = apiKey,
// package:http top-level helpers (http.post, Request.send) create and
this._requestHeaders,
}) : // package:http top-level helpers (http.post, Request.send) create and
// close a Client per call, which prevents TCP/TLS connection reuse.
_httpClient = httpClient ?? http.Client(),
_requestHeaders = requestHeaders;
_httpClient = httpClient ?? http.Client();
final String _apiKey;
final http.Client _httpClient;

Expand Down
3 changes: 1 addition & 2 deletions packages/firebase_ai/firebase_ai/lib/src/content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ Part parsePart(Object? jsonObject) {
/// A datatype containing media that is part of a multi-part [Content] message.
sealed class Part {
// ignore: public_member_api_docs
const Part({this.isThought, String? thoughtSignature})
: _thoughtSignature = thoughtSignature;
const Part({this.isThought, this._thoughtSignature});
// ignore: public_member_api_docs
final bool? isThought;

Expand Down
5 changes: 2 additions & 3 deletions packages/firebase_ai/firebase_ai/lib/src/firebase_ai.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ class FirebaseAI extends FirebasePlugin {
FirebaseAI._({
required this.app,
required this.location,
required bool useAgentPlatform,
required this._useAgentPlatform,
this.appCheck,
this.auth,
this.useLimitedUseAppCheckTokens = false,
}) : _useAgentPlatform = useAgentPlatform,
super(app.name, 'plugins.flutter.io/firebase_vertexai') {
}) : super(app.name, 'plugins.flutter.io/firebase_vertexai') {
registerWebLibraryVersion('flutter-fire-ai', packageVersion);
}

Expand Down
Loading
Loading