Skip to content

Commit

Permalink
Merge pull request #27 from matsuyani556/fix/dependencies-package_inf…
Browse files Browse the repository at this point in the history
…o_plus

Update dependencies
  • Loading branch information
matsuyani556 authored Dec 19, 2024
2 parents d5f31a7 + 895b096 commit 152fc18
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/patapata_core/lib/src/analytics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class Analytics {
/// Convert the data type of [object] to int, double, or String using the default judgment and return it.
/// Additionally, in this function, data for the Analytics system trims the value side of key-value pairs to a maximum of 100 characters.
/// This is because the average length limitation for the value strings of third-party Analytics systems is around 100 characters.
static Object? defaultMakeLoggableToNative(Object? object) {
static Object defaultMakeLoggableToNative(Object? object) {
if (object == null) {
return '';
} else if (object is int || object is double || object is String) {
Expand Down
13 changes: 11 additions & 2 deletions packages/patapata_core/lib/src/device_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ class DeviceInfoPlugin extends Plugin {
static Map<String, dynamic> mockIosDeviceInfoMap = <String, dynamic>{
'name': 'name',
'model': 'model',
'modelName': 'modelName',
'utsname': <String, dynamic>{
'release': 'release',
'version': 'version',
Expand All @@ -248,6 +249,7 @@ class DeviceInfoPlugin extends Plugin {
'systemName': 'systemName',
'systemVersion': 'systemVersion',
'isPhysicalDevice': true,
'isiOSAppOnMac': true,
'localizedModel': 'localizedModel',
'identifierForVendor': 'identifierForVendor',
};
Expand All @@ -257,21 +259,25 @@ class DeviceInfoPlugin extends Plugin {
static void setMockIosDeviceInfo({
String? name,
String? model,
String? modelName,
Map<String, dynamic>? utsname,
String? systemName,
String? systemVersion,
bool? isPhysicalDevice,
bool? isiOSAppOnMac,
String? localizedModel,
String? identifierForVendor,
}) {
mockIosDeviceInfoMap = <String, dynamic>{
'name': name ?? mockIosDeviceInfoMap['name'],
'model': model ?? mockIosDeviceInfoMap['model'],
'modelName': modelName ?? mockIosDeviceInfoMap['modelName'],
'utsname': utsname ?? mockIosDeviceInfoMap['utsname'],
'systemName': systemName ?? mockIosDeviceInfoMap['systemName'],
'systemVersion': systemVersion ?? mockIosDeviceInfoMap['systemVersion'],
'isPhysicalDevice':
isPhysicalDevice ?? mockIosDeviceInfoMap['isPhysicalDevice'],
'isiOSAppOnMac': isiOSAppOnMac ?? mockIosDeviceInfoMap['isiOSAppOnMac'],
'localizedModel':
localizedModel ?? mockIosDeviceInfoMap['localizedModel'],
'identifierForVendor':
Expand Down Expand Up @@ -330,6 +336,7 @@ class DeviceInfoPlugin extends Plugin {
'hostName': 'hostName',
'arch': 'arch',
'model': 'model',
'modelName': 'modelName',
'kernelVersion': 'kernelVersion',
'osRelease': 'osRelease',
'majorVersion': 10,
Expand All @@ -346,6 +353,7 @@ class DeviceInfoPlugin extends Plugin {
static void setMockMacosDeviceInfo({
String? arch,
String? model,
String? modelName,
int? activeCPUs,
int? memorySize,
int? cpuFrequency,
Expand All @@ -361,6 +369,7 @@ class DeviceInfoPlugin extends Plugin {
mockMacosDeviceInfoMap = <String, dynamic>{
'arch': arch ?? mockMacosDeviceInfoMap['arch'],
'model': model ?? mockMacosDeviceInfoMap['model'],
'modelName': modelName ?? mockMacosDeviceInfoMap['modelName'],
'activeCPUs': activeCPUs ?? mockMacosDeviceInfoMap['activeCPUs'],
'memorySize': memorySize ?? mockMacosDeviceInfoMap['memorySize'],
'cpuFrequency': cpuFrequency ?? mockMacosDeviceInfoMap['cpuFrequency'],
Expand Down Expand Up @@ -473,7 +482,7 @@ class DeviceInfoPlugin extends Plugin {
'appCodeName': 'appCodeName',
'appName': 'appName',
'appVersion': 'appVersion',
'deviceMemory': 42,
'deviceMemory': 42.0,
'language': 'language',
'languages': ['en', 'es'],
'platform': 'platform',
Expand All @@ -493,7 +502,7 @@ class DeviceInfoPlugin extends Plugin {
String? appCodeName,
String? appName,
String? appVersion,
int? deviceMemory,
double? deviceMemory,
String? language,
List<String>? languages,
String? platform,
Expand Down
8 changes: 4 additions & 4 deletions packages/patapata_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ dependencies:
provider: ^6.1.2
connectivity_plus: ^6.0.2
visibility_detector: ^0.4.0+2
collection: ">=1.17.2 <1.19.0"
collection: ">=1.17.2 <1.20.0"
yaml: ^3.1.2
package_info_plus: ^6.0.0
device_info_plus: ^10.1.0
device_info_plus_platform_interface: ^7.0.0
package_info_plus: ">=6.0.0 <9.0.0"
device_info_plus: ^11.2.0
device_info_plus_platform_interface: any
flutter_local_notifications: ^17.0.1

flutter_web_plugins:
Expand Down
11 changes: 10 additions & 1 deletion packages/patapata_core/test/device_info_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ void main() {
DeviceInfoPlugin.mockIosDeviceInfoMap);
expect(deviceInfoPlugin.iosDeviceInfo!.name, 'name');
expect(deviceInfoPlugin.iosDeviceInfo!.model, 'model');
expect(deviceInfoPlugin.iosDeviceInfo!.modelName, 'modelName');
expect(deviceInfoPlugin.iosDeviceInfo!.utsname.release, 'release');
expect(deviceInfoPlugin.iosDeviceInfo!.utsname.version, 'version');
expect(deviceInfoPlugin.iosDeviceInfo!.utsname.machine, 'machine');
Expand All @@ -180,6 +181,7 @@ void main() {
expect(deviceInfoPlugin.iosDeviceInfo!.systemVersion, 'systemVersion');
expect(deviceInfoPlugin.iosDeviceInfo!.localizedModel, 'localizedModel');
expect(deviceInfoPlugin.iosDeviceInfo!.isPhysicalDevice, isTrue);
expect(deviceInfoPlugin.iosDeviceInfo!.isiOSAppOnMac, isTrue);
expect(deviceInfoPlugin.iosDeviceInfo!.identifierForVendor,
'identifierForVendor');
});
Expand All @@ -188,6 +190,7 @@ void main() {
DeviceInfoPlugin.setMockIosDeviceInfo(
name: '',
model: '',
modelName: '',
utsname: <String, dynamic>{
'release': '',
'version': '',
Expand All @@ -198,6 +201,7 @@ void main() {
systemName: '',
systemVersion: '',
isPhysicalDevice: false,
isiOSAppOnMac: false,
localizedModel: '',
identifierForVendor: '',
);
Expand All @@ -208,6 +212,7 @@ void main() {
DeviceInfoPlugin.mockIosDeviceInfoMap);
expect(deviceInfoPlugin.iosDeviceInfo!.name, '');
expect(deviceInfoPlugin.iosDeviceInfo!.model, '');
expect(deviceInfoPlugin.iosDeviceInfo!.modelName, '');
expect(deviceInfoPlugin.iosDeviceInfo!.utsname.release, '');
expect(deviceInfoPlugin.iosDeviceInfo!.utsname.version, '');
expect(deviceInfoPlugin.iosDeviceInfo!.utsname.machine, '');
Expand All @@ -217,6 +222,7 @@ void main() {
expect(deviceInfoPlugin.iosDeviceInfo!.systemVersion, '');
expect(deviceInfoPlugin.iosDeviceInfo!.localizedModel, '');
expect(deviceInfoPlugin.iosDeviceInfo!.isPhysicalDevice, isFalse);
expect(deviceInfoPlugin.iosDeviceInfo!.isiOSAppOnMac, isFalse);
expect(deviceInfoPlugin.iosDeviceInfo!.identifierForVendor, '');
});
});
Expand Down Expand Up @@ -248,6 +254,7 @@ void main() {
DeviceInfoPlugin.mockMacosDeviceInfoMap);
expect(deviceInfoPlugin.macOsInfo!.arch, 'arch');
expect(deviceInfoPlugin.macOsInfo!.model, 'model');
expect(deviceInfoPlugin.macOsInfo!.modelName, 'modelName');
expect(deviceInfoPlugin.macOsInfo!.activeCPUs, 4);
expect(deviceInfoPlugin.macOsInfo!.memorySize, 16);
expect(deviceInfoPlugin.macOsInfo!.cpuFrequency, 2);
Expand All @@ -262,6 +269,7 @@ void main() {
DeviceInfoPlugin.setMockMacosDeviceInfo(
arch: '',
model: '',
modelName: '',
activeCPUs: 0,
memorySize: 0,
cpuFrequency: 0,
Expand All @@ -281,6 +289,7 @@ void main() {
DeviceInfoPlugin.mockMacosDeviceInfoMap);
expect(deviceInfoPlugin.macOsInfo!.arch, '');
expect(deviceInfoPlugin.macOsInfo!.model, '');
expect(deviceInfoPlugin.macOsInfo!.modelName, '');
expect(deviceInfoPlugin.macOsInfo!.activeCPUs, 0);
expect(deviceInfoPlugin.macOsInfo!.memorySize, 0);
expect(deviceInfoPlugin.macOsInfo!.cpuFrequency, 0);
Expand Down Expand Up @@ -506,7 +515,7 @@ void main() {
appCodeName: 'appCodeName',
appName: 'appName',
appVersion: 'appVersion',
deviceMemory: 42,
deviceMemory: 42.0,
language: 'language',
languages: ['en', 'es'],
platform: 'platform',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class FirebaseAnalyticsPlugin extends Plugin {

backend.logEvent(
name: event.name,
parameters: <String, Object?>{
parameters: <String, Object>{
if (event.navigationInteractionContextData != null)
for (var i in event.navigationInteractionContextData!.entries)
'nic_${i.key}': Analytics.defaultMakeLoggableToNative(i.value),
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_analytics/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:

patapata_firebase_core: ^1.1.1

firebase_analytics: ^10.10.1
firebase_analytics: ^11.3.5

dev_dependencies:
flutter_test:
Expand Down
4 changes: 3 additions & 1 deletion packages/patapata_firebase_auth/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ dependencies:

patapata_core: ^1.1.0

firebase_auth: ^4.19.1
patapata_firebase_core: ^1.1.1

firebase_auth: ^5.3.3

dev_dependencies:
flutter_test:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:

patapata_core: ^1.1.0

firebase_core: ^2.29.0
firebase_core: ^3.8.1

dev_dependencies:
flutter_test:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_crashlytics/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:

patapata_firebase_core: ^1.1.1

firebase_crashlytics: ^3.5.1
firebase_crashlytics: ^4.1.5
stack_trace: ^1.11.0

dev_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_dynamic_links/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:

patapata_firebase_core: ^1.1.1

firebase_dynamic_links: ^5.5.1
firebase_dynamic_links: ^6.0.10

dev_dependencies:
flutter_test:
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_messaging/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:

patapata_firebase_core: ^1.1.1

firebase_messaging: ^14.8.1
firebase_messaging: ^15.1.5
path_provider: ">=2.0.9 <3.0.0"
crypto: ">=3.0.3 <4.0.0"
flutter_local_notifications: ^17.0.1
Expand Down
2 changes: 1 addition & 1 deletion packages/patapata_firebase_remote_config/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:

patapata_firebase_core: ^1.1.1

firebase_remote_config: ^4.4.1
firebase_remote_config: ^5.1.5

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 152fc18

Please sign in to comment.