Skip to content

Commit

Permalink
Merge pull request #664 from guyluz11/upgrade_flutter_version
Browse files Browse the repository at this point in the history
Upgrade flutter version
  • Loading branch information
guyluz11 authored Oct 1, 2023
2 parents 0140a86 + f981f30 commit 47d4891
Show file tree
Hide file tree
Showing 176 changed files with 375 additions and 383 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
flutter_channel: 'stable' # or: 'dev' or 'beta'
flutter_version: '3.7.7'
flutter_version: '3.13.5'

jobs:
build:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
# Enable version updates for flutter's pub package manager
- package-ecosystem: "pub"
# Look for `pubspec.yaml` and `pubspec.lock` files in the `root` directory
directory: "/"
# Check the pub.dev registry for updates every day (weekdays)
schedule:
interval: "monthly"
# # Add default reviewers
# reviewers:
# - "guyluz11"

3 changes: 0 additions & 3 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,3 @@ linter:
avoid_classes_with_only_static_members: false

sort_constructors_first: true

# Good packages document everything
public_member_api_docs: true
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
4 changes: 2 additions & 2 deletions lib/application/add_new_action/add_new_action_bloc.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:async';

import 'package:bloc/bloc.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/device_entity_abstract.dart';
import 'package:cybear_jinni/domain/device/i_device_repository.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/device_entity_abstract.dart';
import 'package:cybear_jinni/domain/room/i_room_repository.dart';
import 'package:cybear_jinni/domain/room/room_entity.dart';
import 'package:cybear_jinni/domain/vendors/login_abstract/core_login_failures.dart';
Expand Down Expand Up @@ -65,7 +65,7 @@ class AddNewActionBloc extends Bloc<AddNewActionEvent, AddNewActionState> {
emit(
state.copyWith(
allDevicesWithNewAction: [
MapEntry(device, const MapEntry(null, null))
MapEntry(device, const MapEntry(null, null)),
],
actionsName: '',
authFailureOrSuccessOption: none(),
Expand Down
2 changes: 1 addition & 1 deletion lib/application/add_new_binding/add_new_binding_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'dart:async';

import 'package:bloc/bloc.dart';
import 'package:cybear_jinni/domain/binding/i_binding_cbj_repository.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/device_entity_abstract.dart';
import 'package:cybear_jinni/domain/device/i_device_repository.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/device_entity_abstract.dart';
import 'package:cybear_jinni/domain/generic_devices/generic_light_device/generic_light_entity.dart';
import 'package:cybear_jinni/domain/vendors/login_abstract/core_login_failures.dart';
import 'package:dartz/dartz.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/application/add_new_routine/add_new_routine_bloc.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:async';

import 'package:bloc/bloc.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/device_entity_abstract.dart';
import 'package:cybear_jinni/domain/device/i_device_repository.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/device_entity_abstract.dart';
import 'package:cybear_jinni/domain/generic_devices/generic_light_device/generic_light_entity.dart';
import 'package:cybear_jinni/domain/routine/i_routine_cbj_repository.dart';
import 'package:cybear_jinni/domain/routine/value_objects_routine_cbj.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/application/add_new_scene/add_new_scene_bloc.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:async';

import 'package:bloc/bloc.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/device_entity_abstract.dart';
import 'package:cybear_jinni/domain/device/i_device_repository.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/device_entity_abstract.dart';
import 'package:cybear_jinni/domain/generic_devices/generic_light_device/generic_light_entity.dart';
import 'package:cybear_jinni/domain/scene/i_scene_cbj_repository.dart';
import 'package:cybear_jinni/domain/vendors/login_abstract/core_login_failures.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import 'package:cybear_jinni/domain/cbj_comp/cbj_comp_entity.dart';
import 'package:cybear_jinni/domain/cbj_comp/cbj_comp_failures.dart';
import 'package:cybear_jinni/domain/cbj_comp/cbj_comp_value_objects.dart';
import 'package:cybear_jinni/domain/cbj_comp/i_cbj_comp_repository.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/value_objects_core.dart';
import 'package:cybear_jinni/domain/device/devices_failures.dart';
import 'package:cybear_jinni/domain/device/i_device_repository.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/value_objects_core.dart';
import 'package:cybear_jinni/domain/generic_devices/generic_light_device/generic_light_entity.dart';
import 'package:cybear_jinni/domain/manage_network/i_manage_network_repository.dart';
import 'package:cybear_jinni/domain/manage_network/manage_network_entity.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/application/hub_in_network/hub_in_network_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'dart:async';

import 'package:auto_route/auto_route.dart';
import 'package:bloc/bloc.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/device_entity_abstract.dart';
import 'package:cybear_jinni/domain/device/devices_failures.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/device_entity_abstract.dart';
import 'package:cybear_jinni/domain/hub/hub_failures.dart';
import 'package:cybear_jinni/domain/hub/i_hub_connection_repository.dart';
import 'package:cybear_jinni/presentation/routes/app_router.gr.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'dart:async';

import 'package:auto_route/auto_route.dart';
import 'package:bloc/bloc.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/device_entity_abstract.dart';
import 'package:cybear_jinni/domain/device/devices_failures.dart';
import 'package:cybear_jinni/domain/generic_devices/abstract_device/device_entity_abstract.dart';
import 'package:cybear_jinni/domain/hub/hub_failures.dart';
import 'package:cybear_jinni/domain/hub/i_hub_connection_repository.dart';
import 'package:cybear_jinni/presentation/routes/app_router.gr.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class PrintersActorBloc extends Bloc<PrintersActorEvent, PrintersActorState> {
linearProgressIndicator: const LinearProgressIndicator(),
).show(event.context);

final String? printerIp = event.printer.deviceLastKnownIp.getOrCrash();
final String printerIp = event.printer.deviceLastKnownIp.getOrCrash();
if (printerIp != null) {
launchUrl(
Uri.parse('http://$printerIp'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class DeviceEntityNotAbstract extends DeviceEntityAbstract {
entityOriginalName:
EntityOriginalName('Entity original name is empty'),
deviceOriginalName: DeviceOriginalName(
'Device original name that entity is exists on is empty'),
'Device original name that entity is exists on is empty',),
entityTypes: EntityType(EntityTypes.light.toString()),
senderDeviceModel: DeviceSenderDeviceModel('a'),
senderDeviceOs: DeviceSenderDeviceOs('b'),
Expand All @@ -194,7 +194,7 @@ class DeviceEntityNotAbstract extends DeviceEntityAbstract {
entityKey: EntityKey('entityKey is empty'),
requestTimeStamp: RequestTimeStamp('requestTimeStamp is empty'),
lastResponseFromDeviceTimeStamp: LastResponseFromDeviceTimeStamp(
'lastResponseFromDeviceTimeStamp is empty'),
'lastResponseFromDeviceTimeStamp is empty',),
deviceCbjUniqueId: CoreUniqueId(),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class GenericDimmableLightSwitchState extends ValueObjectCore<String> {
class GenericDimmableLightBrightness extends ValueObjectCore<String> {
factory GenericDimmableLightBrightness(String? input) {
assert(input != null);
String tempInput = input!;
final String tempInput = input!;

return GenericDimmableLightBrightness._(
validateGenericDimmableLightNotEmpty(tempInput),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// const AddUserDtos._();
//
// const factory AddUserDtos({
// @JsonKey(ignore: true) String id,
// @JsonKey(includeFromJson: true) String id,
// required AddUserEmail email,
// required AddUserPermission permission,
// required String name,
Expand Down
2 changes: 1 addition & 1 deletion lib/infrastructure/bindings/binding_cbj_dtos.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ part 'binding_cbj_dtos.g.dart';
@freezed
abstract class BindingCbjDtos implements _$BindingCbjDtos {
factory BindingCbjDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String uniqueId,
required String name,
required String backgroundColor,
Expand Down
2 changes: 1 addition & 1 deletion lib/infrastructure/core/shared_methods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Future<String?> getCurrentWifiName() async {
logger.w('Does not support this platform');
}
} on PlatformException catch (e) {
logger.e('Failed to get Wifi Name\n${e.toString()}');
logger.e('Failed to get Wifi Name\n$e');
// wifiName = "Failed to get Wifi Name";
} catch (exception) {
logger.e(exception.toString());
Expand Down
4 changes: 2 additions & 2 deletions lib/infrastructure/create_home/create_home_dtos.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ abstract class CreateHomeDtos implements _$CreateHomeDtos {
required String homeDevicesUserId,
required String homeDevicesUserEmail,
required String homeDevicesUserPassword,
@JsonKey(ignore: true) String? id,
@JsonKey(ignore: true) String? name,
@JsonKey(includeFromJson: true) String? id,
@JsonKey(includeFromJson: true) String? name,
// required @ServerTimestampConverter() FieldValue serverTimeStamp,
}) = _CreateHomeDtos;

Expand Down
2 changes: 1 addition & 1 deletion lib/infrastructure/devices/device/device_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class DeviceRepository implements IDeviceRepository {
} else if (Platform.isIOS) {
final IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
logger.i(iosInfo.utsname.machine);
deviceModelString = iosInfo.model!;
deviceModelString = iosInfo.model;
}

final UserEntity currentUserEntity =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_blinds_device_dtos.g.dart';
abstract class GenericBlindsDeviceDtos
implements _$GenericBlindsDeviceDtos, DeviceEntityDtoAbstract {
factory GenericBlindsDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_boiler_device_dtos.g.dart';
abstract class GenericBoilerDeviceDtos
implements _$GenericBoilerDeviceDtos, DeviceEntityDtoAbstract {
factory GenericBoilerDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_dimmable_light_device_dtos.g.dart';
abstract class GenericDimmableLightDeviceDtos
implements _$GenericDimmableLightDeviceDtos, DeviceEntityDtoAbstract {
factory GenericDimmableLightDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_empty_device_dtos.g.dart';
abstract class GenericEmptyDeviceDtos
implements _$GenericEmptyDeviceDtos, DeviceEntityDtoAbstract {
factory GenericEmptyDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_light_device_dtos.g.dart';
abstract class GenericLightDeviceDtos
implements _$GenericLightDeviceDtos, DeviceEntityDtoAbstract {
factory GenericLightDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_ping_device_dtos.g.dart';
abstract class GenericPingDeviceDtos
implements _$GenericPingDeviceDtos, DeviceEntityDtoAbstract {
factory GenericPingDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_printer_device_dtos.g.dart';
abstract class GenericPrinterDeviceDtos
implements _$GenericPrinterDeviceDtos, DeviceEntityDtoAbstract {
factory GenericPrinterDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_rgbw_light_device_dtos.g.dart';
abstract class GenericRgbwLightDeviceDtos
implements _$GenericRgbwLightDeviceDtos, DeviceEntityDtoAbstract {
factory GenericRgbwLightDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_smart_computer_device_dtos.g.dart';
abstract class GenericSmartComputerDeviceDtos
implements _$GenericSmartComputerDeviceDtos, DeviceEntityDtoAbstract {
factory GenericSmartComputerDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_smart_plug_device_dtos.g.dart';
abstract class GenericSmartPlugDeviceDtos
implements _$GenericSmartPlugDeviceDtos, DeviceEntityDtoAbstract {
factory GenericSmartPlugDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_smart_tv_device_dtos.g.dart';
abstract class GenericSmartTvDeviceDtos
implements _$GenericSmartTvDeviceDtos, DeviceEntityDtoAbstract {
factory GenericSmartTvDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ abstract class GenericSmartTypeNotSupportedDeviceDtos
_$GenericSmartTypeNotSupportedDeviceDtos,
DeviceEntityDtoAbstract {
factory GenericSmartTypeNotSupportedDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_switch_device_dtos.g.dart';
abstract class GenericSwitchDeviceDtos
implements _$GenericSwitchDeviceDtos, DeviceEntityDtoAbstract {
factory GenericSwitchDeviceDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String id,
required String entityUniqueId,
required String? cbjEntityName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_esphome_login_dtos.g.dart';
abstract class GenericEspHomeLoginDtos
implements _$GenericEspHomeLoginDtos, LoginEntityDtoAbstract {
factory GenericEspHomeLoginDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String? senderUniqueId,
required String? loginVendor,
required String? esphomeDevicePass,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_ewelink_login_dtos.g.dart';
abstract class GenericEwelinkLoginDtos
implements _$GenericEwelinkLoginDtos, LoginEntityDtoAbstract {
factory GenericEwelinkLoginDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String? senderUniqueId,
required String? loginVendor,
required String? ewelinkAccountEmail,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_lifx_login_dtos.g.dart';
abstract class GenericLifxLoginDtos
implements _$GenericLifxLoginDtos, LoginEntityDtoAbstract {
factory GenericLifxLoginDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String? senderUniqueId,
required String? loginVendor,
required String? lifxApiKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_tuya_login_dtos.g.dart';
abstract class GenericTuyaLoginDtos
implements _$GenericTuyaLoginDtos, LoginEntityDtoAbstract {
factory GenericTuyaLoginDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String? senderUniqueId,
required String? loginVendor,
required String? userName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ part 'generic_xiaomi_mi_login_dtos.g.dart';
abstract class GenericXiaomiMiLoginDtos
implements _$GenericXiaomiMiLoginDtos, LoginEntityDtoAbstract {
factory GenericXiaomiMiLoginDtos({
// @JsonKey(ignore: true)
// @JsonKey(includeFromJson: true)
required String? senderUniqueId,
required String? loginVendor,
required String? xiaomiMiAccountEmail,
Expand Down
2 changes: 1 addition & 1 deletion lib/infrastructure/home_user/home_user_dtos.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ abstract class HomeUserDtos implements _$HomeUserDtos {
required String? email,
required String? name,
required String? permission,
@JsonKey(ignore: true) String? id,
@JsonKey(includeFromJson: true) String? id,
}) = _HomeUserDtos;

const HomeUserDtos._();
Expand Down
6 changes: 3 additions & 3 deletions lib/infrastructure/hub_client/hub_client_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class HubClientDemo {
AreaPurposesTypes.bedroom.value.toString(),
AreaPurposesTypes.studyRoom.value.toString(),
AreaPurposesTypes.workRoom.value.toString(),
AreaPurposesTypes.videoGames.value.toString()
AreaPurposesTypes.videoGames.value.toString(),
]),
roomDevicesId: RoomDevicesId(const [
'a31523m6-463s-32ge-7426-g33c642r7m25',
Expand Down Expand Up @@ -128,7 +128,7 @@ class HubClientDemo {
AreaPurposesTypes.bedroom.value.toString(),
AreaPurposesTypes.studyRoom.value.toString(),
AreaPurposesTypes.workRoom.value.toString(),
AreaPurposesTypes.livingRoom.value.toString()
AreaPurposesTypes.livingRoom.value.toString(),
]),
roomDevicesId:
RoomDevicesId(const ['gcvweg3y-bv2s-cvwe-bdmf-7h4f3f2dw2d1']),
Expand Down Expand Up @@ -161,7 +161,7 @@ class HubClientDemo {
AreaPurposesTypes.bedroom.value.toString(),
AreaPurposesTypes.studyRoom.value.toString(),
AreaPurposesTypes.workRoom.value.toString(),
AreaPurposesTypes.livingRoom.value.toString()
AreaPurposesTypes.livingRoom.value.toString(),
]),
roomDevicesId: RoomDevicesId(const [
'7189ed76-4351-11ed-b249-63fd7e165c16',
Expand Down
Loading

0 comments on commit 47d4891

Please sign in to comment.