Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Oct 22, 2023
2 parents bd71270 + 1c7a980 commit 02a7679
Show file tree
Hide file tree
Showing 955 changed files with 35,898 additions and 35,146 deletions.
16 changes: 8 additions & 8 deletions .metadata
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
# This file should be version controlled and should not be manually edited.

version:
revision: c07f7888888435fd9df505aa2efc38d3cf65681b
channel: stable
revision: "ead455963c12b453cdb2358cad34969c76daf180"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: c07f7888888435fd9df505aa2efc38d3cf65681b
base_revision: c07f7888888435fd9df505aa2efc38d3cf65681b
- platform: linux
create_revision: c07f7888888435fd9df505aa2efc38d3cf65681b
base_revision: c07f7888888435fd9df505aa2efc38d3cf65681b
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180
- platform: windows
create_revision: ead455963c12b453cdb2358cad34969c76daf180
base_revision: ead455963c12b453cdb2358cad34969c76daf180

# User provided section

Expand Down
8 changes: 3 additions & 5 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
# in sync with this file.

analyzer:
strong-mode:
implicit-dynamic: false
errors:
# https://github.com/flutter/flutter/issues/41563#issuecomment-686481533
undefined_prefixed_name: ignore
Expand Down Expand Up @@ -51,7 +49,7 @@ linter:
- always_declare_return_types
- always_put_control_body_on_new_line
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
- always_require_non_null_named_parameters
# - always_require_non_null_named_parameters # deprecated
# - always_specify_types # not support by built_value
- annotate_overrides
# - avoid_annotating_with_dynamic # conflicts with always_specify_types
Expand Down Expand Up @@ -92,11 +90,11 @@ linter:
# hash_and_equals # For built_value memoized hash
- implementation_imports
# - invariant_booleans # https://github.com/flutter/flutter/issues/5790
- iterable_contains_unrelated_type
# - iterable_contains_unrelated_type # deprecated
# - join_return_with_assignment # not yet tested
- library_names
- library_prefixes
- list_remove_unrelated_type
# - list_remove_unrelated_type # deprecated
# - literal_only_boolean_expressions # https://github.com/flutter/flutter/issues/5791
- no_adjacent_strings_in_list
- no_duplicate_case_values
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.22'
repositories {
google()
mavenCentral()
Expand Down Expand Up @@ -27,6 +27,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion android/build.gradle.foss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.22'
repositories {
google()
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ workflows:
instance_type: linux
max_build_duration: 120
environment:
flutter: 3.7.5
flutter: 3.13.6
xcode: latest
cocoapods: default
vars:
Expand Down
132 changes: 66 additions & 66 deletions lib/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,146 +8,146 @@ import 'data/models/static/color_theme_model.dart';
class InvoiceStatusColors {
InvoiceStatusColors(this._colorTheme);

final ColorTheme _colorTheme;
final ColorTheme? _colorTheme;

Map<String, Color> get colors {
Map<String, Color?> get colors {
return {
kInvoiceStatusDraft: _colorTheme.colorLightGray,
kInvoiceStatusSent: _colorTheme.colorInfo,
kInvoiceStatusPartial: _colorTheme.colorPrimary,
kInvoiceStatusPaid: _colorTheme.colorSuccess,
kInvoiceStatusPastDue: _colorTheme.colorDanger,
kInvoiceStatusCancelled: _colorTheme.colorDarkGray,
kInvoiceStatusReversed: _colorTheme.colorDarkGray,
kInvoiceStatusViewed: _colorTheme.colorWarning,
kInvoiceStatusDraft: _colorTheme!.colorLightGray,
kInvoiceStatusSent: _colorTheme!.colorInfo,
kInvoiceStatusPartial: _colorTheme!.colorPrimary,
kInvoiceStatusPaid: _colorTheme!.colorSuccess,
kInvoiceStatusPastDue: _colorTheme!.colorDanger,
kInvoiceStatusCancelled: _colorTheme!.colorDarkGray,
kInvoiceStatusReversed: _colorTheme!.colorDarkGray,
kInvoiceStatusViewed: _colorTheme!.colorWarning,
};
}
}

class RecurringInvoiceStatusColors {
RecurringInvoiceStatusColors(this._colorTheme);

final ColorTheme _colorTheme;
final ColorTheme? _colorTheme;

Map<String, Color> get colors {
Map<String, Color?> get colors {
return {
kRecurringInvoiceStatusDraft: _colorTheme.colorLightGray,
kRecurringInvoiceStatusActive: _colorTheme.colorSuccess,
kRecurringInvoiceStatusPaused: _colorTheme.colorDarkGray,
kRecurringInvoiceStatusCompleted: _colorTheme.colorInfo,
kRecurringInvoiceStatusPending: _colorTheme.colorPrimary,
kRecurringInvoiceStatusDraft: _colorTheme!.colorLightGray,
kRecurringInvoiceStatusActive: _colorTheme!.colorSuccess,
kRecurringInvoiceStatusPaused: _colorTheme!.colorDarkGray,
kRecurringInvoiceStatusCompleted: _colorTheme!.colorInfo,
kRecurringInvoiceStatusPending: _colorTheme!.colorPrimary,
};
}
}

class CreditStatusColors {
CreditStatusColors(this._colorTheme);

final ColorTheme _colorTheme;
final ColorTheme? _colorTheme;

Map<String, Color> get colors {
Map<String, Color?> get colors {
return {
kCreditStatusDraft: _colorTheme.colorLightGray,
kCreditStatusSent: _colorTheme.colorInfo,
kCreditStatusPartial: _colorTheme.colorPrimary,
kCreditStatusApplied: _colorTheme.colorSuccess,
kCreditStatusViewed: _colorTheme.colorWarning,
kCreditStatusDraft: _colorTheme!.colorLightGray,
kCreditStatusSent: _colorTheme!.colorInfo,
kCreditStatusPartial: _colorTheme!.colorPrimary,
kCreditStatusApplied: _colorTheme!.colorSuccess,
kCreditStatusViewed: _colorTheme!.colorWarning,
};
}
}

class PurchaseOrderStatusColors {
PurchaseOrderStatusColors(this._colorTheme);

final ColorTheme _colorTheme;
final ColorTheme? _colorTheme;

Map<String, Color> get colors {
Map<String, Color?> get colors {
return {
kPurchaseOrderStatusDraft: _colorTheme.colorLightGray,
kPurchaseOrderStatusSent: _colorTheme.colorInfo,
kPurchaseOrderStatusAccepted: _colorTheme.colorPrimary,
kPurchaseOrderStatusReceived: _colorTheme.colorSuccess,
kPurchaseOrderStatusCancelled: _colorTheme.colorDanger,
kPurchaseOrderStatusViewed: _colorTheme.colorWarning,
kPurchaseOrderStatusDraft: _colorTheme!.colorLightGray,
kPurchaseOrderStatusSent: _colorTheme!.colorInfo,
kPurchaseOrderStatusAccepted: _colorTheme!.colorPrimary,
kPurchaseOrderStatusReceived: _colorTheme!.colorSuccess,
kPurchaseOrderStatusCancelled: _colorTheme!.colorDanger,
kPurchaseOrderStatusViewed: _colorTheme!.colorWarning,
};
}
}

class TransactionStatusColors {
TransactionStatusColors(this._colorTheme);

final ColorTheme _colorTheme;
final ColorTheme? _colorTheme;

Map<String, Color> get colors {
Map<String, Color?> get colors {
return {
kTransactionStatusUnmatched: _colorTheme.colorInfo,
kTransactionStatusMatched: _colorTheme.colorPrimary,
kTransactionStatusConverted: _colorTheme.colorSuccess,
kTransactionStatusUnmatched: _colorTheme!.colorInfo,
kTransactionStatusMatched: _colorTheme!.colorPrimary,
kTransactionStatusConverted: _colorTheme!.colorSuccess,
};
}
}

class QuoteStatusColors {
QuoteStatusColors(this._colorTheme);

final ColorTheme _colorTheme;
final ColorTheme? _colorTheme;

Map<String, Color> get colors {
Map<String, Color?> get colors {
return {
kQuoteStatusDraft: _colorTheme.colorLightGray,
kQuoteStatusSent: _colorTheme.colorInfo,
kQuoteStatusApproved: _colorTheme.colorPrimary,
kQuoteStatusConverted: _colorTheme.colorSuccess,
kQuoteStatusExpired: _colorTheme.colorDanger,
kQuoteStatusViewed: _colorTheme.colorWarning,
kQuoteStatusDraft: _colorTheme!.colorLightGray,
kQuoteStatusSent: _colorTheme!.colorInfo,
kQuoteStatusApproved: _colorTheme!.colorPrimary,
kQuoteStatusConverted: _colorTheme!.colorSuccess,
kQuoteStatusExpired: _colorTheme!.colorDanger,
kQuoteStatusViewed: _colorTheme!.colorWarning,
};
}
}

class PaymentStatusColors {
PaymentStatusColors(this._colorTheme);

final ColorTheme _colorTheme;
final ColorTheme? _colorTheme;

Map<String, Color> get colors {
Map<String, Color?> get colors {
return {
kPaymentStatusPending: _colorTheme.colorLightGray,
kPaymentStatusCancelled: _colorTheme.colorDarkGray,
kPaymentStatusFailed: _colorTheme.colorDanger,
kPaymentStatusCompleted: _colorTheme.colorSuccess,
kPaymentStatusPartiallyRefunded: _colorTheme.colorPrimary,
kPaymentStatusRefunded: _colorTheme.colorDarkGray,
kPaymentStatusUnapplied: _colorTheme.colorInfo,
kPaymentStatusPartiallyUnapplied: _colorTheme.colorInfo,
kPaymentStatusPending: _colorTheme!.colorLightGray,
kPaymentStatusCancelled: _colorTheme!.colorDarkGray,
kPaymentStatusFailed: _colorTheme!.colorDanger,
kPaymentStatusCompleted: _colorTheme!.colorSuccess,
kPaymentStatusPartiallyRefunded: _colorTheme!.colorPrimary,
kPaymentStatusRefunded: _colorTheme!.colorDarkGray,
kPaymentStatusUnapplied: _colorTheme!.colorInfo,
kPaymentStatusPartiallyUnapplied: _colorTheme!.colorInfo,
};
}
}

class ExpenseStatusColors {
ExpenseStatusColors(this._colorTheme);

final ColorTheme _colorTheme;
final ColorTheme? _colorTheme;

Map<String, Color> get colors {
Map<String, Color?> get colors {
return {
kExpenseStatusLogged: _colorTheme.colorLightGray,
kExpenseStatusPending: _colorTheme.colorPrimary,
kExpenseStatusInvoiced: _colorTheme.colorSuccess,
kExpenseStatusPaid: _colorTheme.colorInfo,
kExpenseStatusLogged: _colorTheme!.colorLightGray,
kExpenseStatusPending: _colorTheme!.colorPrimary,
kExpenseStatusInvoiced: _colorTheme!.colorSuccess,
kExpenseStatusPaid: _colorTheme!.colorInfo,
};
}
}

class TaskStatusColors {
TaskStatusColors(this._colorTheme);

final ColorTheme _colorTheme;
final ColorTheme? _colorTheme;

Map<String, Color> get colors {
Map<String, Color?> get colors {
return {
kTaskStatusLogged: _colorTheme.colorLightGray,
kTaskStatusRunning: _colorTheme.colorPrimary,
kTaskStatusInvoiced: _colorTheme.colorSuccess,
kTaskStatusLogged: _colorTheme!.colorLightGray,
kTaskStatusRunning: _colorTheme!.colorPrimary,
kTaskStatusInvoiced: _colorTheme!.colorSuccess,
};
}
}
4 changes: 2 additions & 2 deletions lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Constants {
}

// TODO remove version once #46609 is fixed
const String kClientVersion = '5.0.125';
const String kClientVersion = '5.0.127';
const String kMinServerVersion = '5.0.4';

const String kAppName = 'Invoice Ninja';
Expand Down Expand Up @@ -628,7 +628,7 @@ const List<String> kAdvancedSettings = [
];

const String kReportClient = 'client';
const String kReportContact = 'contact';
const String kReportClientContact = 'client_contact';
const String kReportCredit = 'credit';
const String kReportCreditItem = 'credit_item';
const String kReportDocument = 'document';
Expand Down
8 changes: 4 additions & 4 deletions lib/data/file_storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class FileStorage {
*/

final prefs = await SharedPreferences.getInstance();
String value = prefs.getString(tag);
String? value = prefs.getString(tag);

if (value != null) {
return value;
Expand All @@ -88,7 +88,7 @@ class FileStorage {
}
}

Future<File> save(String data) async {
Future<File?> save(String data) async {
if (kIsWeb) {
/*
final db = await _getIndexedDb();
Expand All @@ -104,7 +104,7 @@ class FileStorage {
} catch (e) {
if ('$e'.contains('QuotaExceededError')) {
await prefs.remove(tag);
final gzipBytes = GZipEncoder().encode(utf8.encode(data));
final gzipBytes = GZipEncoder().encode(utf8.encode(data))!;
final zipped = base64Encode(gzipBytes);
try {
await prefs.setString(tag + GZIP_TAG, zipped);
Expand All @@ -124,7 +124,7 @@ class FileStorage {
}
}

Future<FileSystemEntity> delete() async {
Future<FileSystemEntity?> delete() async {
if (kIsWeb) {
/*
final db = await _getIndexedDb();
Expand Down
3 changes: 2 additions & 1 deletion lib/data/models/account_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ part 'account_model.g.dart';

abstract class AccountEntity
implements Built<AccountEntity, AccountEntityBuilder> {
factory AccountEntity(bool reportErrors, {String id, AppState state}) {
factory AccountEntity(bool reportErrors, {String? id, AppState? state}) {
return _$AccountEntity._(
id: '',
key: '',
Expand Down Expand Up @@ -138,6 +138,7 @@ abstract class AccountEntity
// ignore: unused_element
static void _initializeBuilder(AccountEntityBuilder builder) => builder
..key = ''
..currentVersion = ''
..debugEnabled = false
..isDocker = false
..isSchedulerRunning = true
Expand Down
Loading

0 comments on commit 02a7679

Please sign in to comment.