Add Nordigen
This commit is contained in:
parent
74a4cfa682
commit
76299bc418
|
|
@ -53,9 +53,6 @@ class BankAccountFields {
|
||||||
abstract class BankAccountEntity extends Object
|
abstract class BankAccountEntity extends Object
|
||||||
with BaseEntity
|
with BaseEntity
|
||||||
implements Built<BankAccountEntity, BankAccountEntityBuilder> {
|
implements Built<BankAccountEntity, BankAccountEntityBuilder> {
|
||||||
static const String INTEGRATION_TYPE_YODLEE = 'yodlee';
|
|
||||||
static const String INTEGRATION_TYPE_NORDIGEN = 'nordigen';
|
|
||||||
|
|
||||||
factory BankAccountEntity({String? id, AppState? state}) {
|
factory BankAccountEntity({String? id, AppState? state}) {
|
||||||
return _$BankAccountEntity._(
|
return _$BankAccountEntity._(
|
||||||
id: id ?? BaseEntity.nextId,
|
id: id ?? BaseEntity.nextId,
|
||||||
|
|
@ -82,6 +79,9 @@ abstract class BankAccountEntity extends Object
|
||||||
|
|
||||||
BankAccountEntity._();
|
BankAccountEntity._();
|
||||||
|
|
||||||
|
static const String INTEGRATION_TYPE_YODLEE = 'yodlee';
|
||||||
|
static const String INTEGRATION_TYPE_NORDIGEN = 'nordigen';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@memoized
|
@memoized
|
||||||
int get hashCode;
|
int get hashCode;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import 'package:invoiceninja_flutter/redux/bank_account/bank_account_actions.dar
|
||||||
import 'package:invoiceninja_flutter/redux/settings/settings_actions.dart';
|
import 'package:invoiceninja_flutter/redux/settings/settings_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/app_bottom_bar.dart';
|
import 'package:invoiceninja_flutter/ui/app/app_bottom_bar.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/buttons/elevated_button.dart';
|
import 'package:invoiceninja_flutter/ui/app/buttons/elevated_button.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/forms/learn_more.dart';
|
|
||||||
import 'package:invoiceninja_flutter/ui/app/help_text.dart';
|
import 'package:invoiceninja_flutter/ui/app/help_text.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/list_scaffold.dart';
|
import 'package:invoiceninja_flutter/ui/app/list_scaffold.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
||||||
|
|
@ -37,9 +36,10 @@ class BankAccountScreen extends StatelessWidget {
|
||||||
|
|
||||||
void connectAccounts(BuildContext context) {
|
void connectAccounts(BuildContext context) {
|
||||||
final localization = AppLocalization.of(context)!;
|
final localization = AppLocalization.of(context)!;
|
||||||
String integrationType = BankAccountEntity.INTEGRATION_TYPE_NORDIGEN;
|
|
||||||
|
|
||||||
if (isHosted(context)) {
|
if (isSelfHosted(context)) {
|
||||||
|
_connectAccounts(context, BankAccountEntity.INTEGRATION_TYPE_NORDIGEN);
|
||||||
|
} else {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
|
|
@ -55,9 +55,7 @@ class BankAccountScreen extends StatelessWidget {
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
Text('Envestnet - Yodlee'),
|
Text('Envestnet - Yodlee'),
|
||||||
Text(
|
Text(localization.yodleeRegions,
|
||||||
localization.supportedRegions +
|
|
||||||
': USA, Australia, UK & India',
|
|
||||||
style: Theme.of(context).textTheme.bodySmall),
|
style: Theme.of(context).textTheme.bodySmall),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -84,7 +82,7 @@ class BankAccountScreen extends StatelessWidget {
|
||||||
),
|
),
|
||||||
SizedBox(height: 30),
|
SizedBox(height: 30),
|
||||||
Text('GoCardless - Nordigen'),
|
Text('GoCardless - Nordigen'),
|
||||||
Text(localization.supportedRegions + ': Europe & UK',
|
Text(localization.nordigenRegions,
|
||||||
style: Theme.of(context).textTheme.bodySmall),
|
style: Theme.of(context).textTheme.bodySmall),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -115,8 +113,6 @@ class BankAccountScreen extends StatelessWidget {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
} else {
|
|
||||||
_connectAccounts(context, integrationType);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,8 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
static final Map<String, Map<String, String>> _localizedValues = {
|
static final Map<String, Map<String, String>> _localizedValues = {
|
||||||
'en': {
|
'en': {
|
||||||
// STARTER: lang key - do not remove comment
|
// STARTER: lang key - do not remove comment
|
||||||
'supported_regions': 'Supported Regions',
|
'yodlee_regions': 'Regions: USA, Australia, UK & India',
|
||||||
|
'nordigen_regions': 'Regions: Europe & UK',
|
||||||
'select_provider': 'Select Provider',
|
'select_provider': 'Select Provider',
|
||||||
'payment_type_credit': 'Payment Type Credit',
|
'payment_type_credit': 'Payment Type Credit',
|
||||||
'payment_type_debit': 'Payment Type Debit',
|
'payment_type_debit': 'Payment Type Debit',
|
||||||
|
|
@ -111472,9 +111473,13 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
_localizedValues[localeCode]!['select_provider'] ??
|
_localizedValues[localeCode]!['select_provider'] ??
|
||||||
_localizedValues['en']!['select_provider']!;
|
_localizedValues['en']!['select_provider']!;
|
||||||
|
|
||||||
String get supportedRegions =>
|
String get yodleeRegions =>
|
||||||
_localizedValues[localeCode]!['supported_regions'] ??
|
_localizedValues[localeCode]!['yodlee_regions'] ??
|
||||||
_localizedValues['en']!['supported_regions']!;
|
_localizedValues['en']!['yodlee_regions']!;
|
||||||
|
|
||||||
|
String get nordigenRegions =>
|
||||||
|
_localizedValues[localeCode]!['nordigen_regions'] ??
|
||||||
|
_localizedValues['en']!['nordigen_regions']!;
|
||||||
|
|
||||||
// STARTER: lang field - do not remove comment
|
// STARTER: lang field - do not remove comment
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue