Skip to content

Commit 400fbdf

Browse files
authored
Affiliation link (#84)
* amazon afiliation * - affiliation provider, repository and button for amazon * migration scheme to add country and affiliation link table * open in web app provider preference * amazonLinkBottomSheet * bottom sheet amazon site selection * - update version to 2.2.2 - add amazon_tag secret * privacy policy updated
1 parent b39418b commit 400fbdf

38 files changed

+1103
-71
lines changed

.github/workflows/qa.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ jobs:
9595
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> android/key.properties
9696
9797
- name: Build release version for testing purpose
98-
run: flutter build apk --split-per-abi --no-pub --verbose --release
98+
env:
99+
AMAZON_TAG: ${{ secrets.AMAZON_TAG }}
100+
run: flutter build apk --split-per-abi --no-pub --verbose --release --dart-define=amazon_tag=$AMAZON_TAG
99101

100102
- name: Upload APK
101103
uses: actions/upload-artifact@v4

.github/workflows/release.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,11 @@ jobs:
107107
base64 -d -i FIREBASE_OPTIONS_DART.dart.b64 > lib/firebase_options.dart
108108
109109
- name: Build apk and appbundle
110+
env:
111+
AMAZON_TAG: ${{ secrets.AMAZON_TAG }}
110112
run: |
111-
flutter build apk --no-pub --release --obfuscate --split-debug-info=build/app/outputs/apk-symbols/symbols
112-
flutter build appbundle --no-pub --obfuscate --split-debug-info=build/app/outputs/aab-symbols/symbols
113+
flutter build apk --no-pub --release --obfuscate --split-debug-info=build/app/outputs/apk-symbols/symbols --dart-define=amazon_tag=$AMAZON_TAG
114+
flutter build appbundle --no-pub --obfuscate --split-debug-info=build/app/outputs/aab-symbols/symbols --dart-define=amazon_tag=$AMAZON_TAG
113115
114116
- name: Upload aab symbols to firebase
115117
uses: w9jds/firebase-action@8354b09806f3107c9a27e22ec444f60452608104

Privacy Policy.md

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
Dart Bot built the Amiibo Network app as a Free app.
77
This SERVICE is provided by Dart Bot at no cost and is intended for use as is.
88

9+
## Affiliation Link
10+
Amazon affiliation links are a way for you to find the best deals in Amazon while receiving a small comission, this without worsing your app experience
11+
912
## Personal Identification Information
1013
* I do not collect any personal information.
1114
* I don't sell any data, since I have nothing collected.

assets/databases/affiliation.json

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
[
2+
{
3+
"amazonLink": "https://amazon.ae",
4+
"countryCode": "ae",
5+
"translation": {
6+
"en": "UAE",
7+
"es": "Emiratos Árabes Unidos",
8+
"fr": "Émirats arabes unis"
9+
}
10+
},
11+
{
12+
"amazonLink": "https://amazon.ca",
13+
"countryCode": "ca",
14+
"translation": {"en": "Canada", "es": "Canadá", "fr": "Canada"}
15+
},
16+
{
17+
"amazonLink": "https://amazon.cn",
18+
"countryCode": "cn",
19+
"translation": {"en": "China", "es": "China", "fr": "Chine"}
20+
},
21+
{
22+
"amazonLink": "https://amazon.co.jp",
23+
"countryCode": "jp",
24+
"translation": {"en": "Japan", "es": "Japón", "fr": "Japon"}
25+
},
26+
{
27+
"amazonLink": "https://amazon.co.uk",
28+
"countryCode": "uk",
29+
"translation": {
30+
"en": "United Kingdom",
31+
"es": "Reino Unido",
32+
"fr": "Royaume-Uni"
33+
}
34+
},
35+
{
36+
"amazonLink": "https://amazon.com",
37+
"countryCode": "us",
38+
"translation": {
39+
"en": "United States",
40+
"es": "Estados Unidos",
41+
"fr": "États-Unis"
42+
}
43+
},
44+
{
45+
"amazonLink": "https://amazon.com.au",
46+
"countryCode": "au",
47+
"translation": {"en": "Australia", "es": "Australia", "fr": "Australie"}
48+
},
49+
{
50+
"amazonLink": "https://amazon.com.be",
51+
"countryCode": "be",
52+
"translation": {"en": "Belgium", "es": "Bélgica", "fr": "Belgique"}
53+
},
54+
{
55+
"amazonLink": "https://amazon.com.br",
56+
"countryCode": "br",
57+
"translation": {"en": "Brazil", "es": "Brasil", "fr": "Brésil"}
58+
},
59+
{
60+
"amazonLink": "https://amazon.com.tr",
61+
"countryCode": "tr",
62+
"translation": {"en": "Türkiye", "es": "Turquía", "fr": "Turquie"}
63+
},
64+
{
65+
"amazonLink": "https://amazon.com.mx",
66+
"countryCode": "mx",
67+
"translation": {"en": "Mexico", "es": "México", "fr": "Mexique"}
68+
},
69+
{
70+
"amazonLink": "https://amazon.de",
71+
"countryCode": "de",
72+
"translation": {"en": "Germany", "es": "Alemania", "fr": "Allemagne"}
73+
},
74+
{
75+
"amazonLink": "https://amazon.es",
76+
"countryCode": "es",
77+
"translation": {"en": "Spain", "es": "España", "fr": "Espagne"}
78+
},
79+
{
80+
"amazonLink": "https://amazon.eg",
81+
"countryCode": "eg",
82+
"translation": {"en": "Egypt", "es": "Egipto", "fr": "Égypte"}
83+
},
84+
{
85+
"amazonLink": "https://amazon.fr",
86+
"countryCode": "fr",
87+
"translation": {"en": "France", "es": "Francia", "fr": "France"}
88+
},
89+
{
90+
"amazonLink": "https://amazon.in",
91+
"countryCode": "in",
92+
"translation": {"en": "India", "es": "India", "fr": "Inde"}
93+
},
94+
{
95+
"amazonLink": "https://amazon.it",
96+
"countryCode": "it",
97+
"translation": {"en": "Italy", "es": "Italia", "fr": "Italie"}
98+
},
99+
{
100+
"amazonLink": "https://amazon.nl",
101+
"countryCode": "nl",
102+
"translation": {
103+
"en": "Netherlands",
104+
"es": "Países Bajos",
105+
"fr": "Pays-Bas"
106+
}
107+
},
108+
{
109+
"amazonLink": "https://amazon.pl",
110+
"countryCode": "pl",
111+
"translation": {"en": "Poland", "es": "Polonia", "fr": "Pologne"}
112+
},
113+
{
114+
"amazonLink": "https://amazon.sa",
115+
"countryCode": "sa",
116+
"translation": {
117+
"en": "Saudi Arabia",
118+
"es": "Arabia Saudita",
119+
"fr": "Arabie Saoudite"
120+
}
121+
},
122+
{
123+
"amazonLink": "https://amazon.se",
124+
"countryCode": "se",
125+
"translation": {"en": "Sweden", "es": "Suecia", "fr": "Suède"}
126+
},
127+
{
128+
"amazonLink": "https://amazon.sg",
129+
"countryCode": "sg",
130+
"translation": {"en": "Singapore", "es": "Singapur", "fr": "Singapour"}
131+
}
132+
]

assets/databases/amiibos.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11660,5 +11660,5 @@
1166011660
"type": "Figure"
1166111661
}
1166211662
],
11663-
"lastUpdated": "2024-09-05T10:00:00.000"
11663+
"lastUpdated": "2024-09-25T10:00:00.000"
1166411664
}

assets/icons/2.0x/amazon.webp

1.02 KB
Binary file not shown.

assets/icons/3.0x/amazon.webp

1.48 KB
Binary file not shown.

assets/icons/4.0x/amazon.webp

1.9 KB
Binary file not shown.

assets/icons/amazon.webp

472 Bytes
Binary file not shown.

assets/text/Politique_de_Confidentialité.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Dart Bot a créé l'application Amiibo Network en tant qu'application gratuite. Ce SERVICE est fourni gratuitement par Dart Bot et est destiné à être utilisé tel quel.
22

3+
## Lien d'affiliation
4+
Les liens Amazon génèrent une petite commission sans affecter l'expérience utilisateu
5+
36
## Informations d'identification personnelle
47
* Je ne collecte aucune information personnelle.
58
* Je ne vends aucune donnée, car je n'ai rien collecté.

assets/text/Política_de_Privacidad.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Dart Bot desarrollo Amiibo Network como una aplicación libre. Este SERVICIO es provisto por Dart Bot sin costo alguno y está diseñado para usarse así
22

3+
## Link de afiiación
4+
Los links de Amazon generan una pequeña comisión sin afectar la experiencia de usuario
5+
36
## Información Personal
47
* No almaceno ninguna información personal.
58
* No vendo información alguna ya que no tengo información personal almacenada.

assets/text/Privacy_Policy.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Dart Bot built the Amiibo Network app as a Free app. This SERVICE is provided by Dart Bot at no cost and is intended for use as is.
22

3+
## Affiliation Link
4+
Amazon affiliation links are a way for you to find the best deals in Amazon while receiving a small comission, this without worsing your app experience
5+
36
## Personal Identification Information
47
* I do not collect any personal information.
58
* I don't sell any data, since I have nothing collected.

build.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ targets:
66
include:
77
- lib/model/**.dart
88
- lib/data/**/model/**.dart
9+
- lib/**/data/model/**.dart
10+
- lib/**/domain/model/**.dart
911
- lib/resources/**.dart
1012
json_serializable:
1113
options:

devtools_options.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
extensions:
2+
- drift: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
import 'package:amiibo_network/affiliation_product/domain/repository/affiliation_repository.dart';
2+
import 'package:amiibo_network/affiliation_product/domain/model/affiliation_link_read_model.dart';
3+
import 'package:amiibo_network/data/drift_sqlite/source/affiliation_link_dao.dart';
4+
import 'package:amiibo_network/data/drift_sqlite/source/drift_database.dart'
5+
as db;
6+
import 'package:riverpod_annotation/riverpod_annotation.dart';
7+
8+
part 'affiliation_repository_local.g.dart';
9+
10+
@Riverpod(keepAlive: true)
11+
AffiliationRepository affiliationRepository(AffiliationRepositoryRef ref) {
12+
final appDB = ref.watch(db.databaseProvider);
13+
return AffiliationRepositoryLocal(appDB.affiliationLinkDao);
14+
}
15+
16+
class AffiliationRepositoryLocal implements AffiliationRepository {
17+
final AffiliationLinkDao _affiliationLinkDao;
18+
19+
AffiliationRepositoryLocal(this._affiliationLinkDao);
20+
21+
@override
22+
Future<List<AffiliationLinkReadModel>> links() async {
23+
return _affiliationLinkDao.getLinks();
24+
/* return _affiliatedDomains.map((a) {
25+
final map = Map<String, dynamic>.from(a);
26+
map['link'] = map.remove('amazonLink')! + '/';
27+
map['countryName'] = (map.remove('translation')! as Map)['en'];
28+
return AffiliationLink.fromJson(map);
29+
}).toList(); */
30+
}
31+
}
32+
/*
33+
const _affiliatedDomains = [
34+
{
35+
"amazonLink": "https://amazon.ae",
36+
"countryCode": "ae",
37+
"translation": {
38+
"en": "UAE",
39+
"es": "Emiratos Árabes Unidos",
40+
"fr": "Émirats arabes unis"
41+
},
42+
},
43+
{
44+
"amazonLink": "https://amazon.ca",
45+
"countryCode": "ca",
46+
"translation": {"en": "Canada", "es": "Canadá", "fr": "Canada"},
47+
},
48+
{
49+
"amazonLink": "https://amazon.cn",
50+
"countryCode": "cn",
51+
"translation": {"en": "China", "es": "China", "fr": "Chine"},
52+
},
53+
{
54+
"amazonLink": "https://amazon.co.jp",
55+
"countryCode": "jp",
56+
"translation": {"en": "Japan", "es": "Japón", "fr": "Japon"},
57+
},
58+
{
59+
"amazonLink": "https://amazon.co.uk",
60+
"countryCode": "uk",
61+
"translation": {
62+
"en": "United Kingdom",
63+
"es": "Reino Unido",
64+
"fr": "Royaume-Uni"
65+
},
66+
},
67+
{
68+
"amazonLink": "https://amazon.com",
69+
"countryCode": "us",
70+
"translation": {
71+
"en": "United States",
72+
"es": "Estados Unidos",
73+
"fr": "États-Unis"
74+
},
75+
},
76+
{
77+
"amazonLink": "https://amazon.com.au",
78+
"countryCode": "au",
79+
"translation": {"en": "Australia", "es": "Australia", "fr": "Australie"},
80+
},
81+
{
82+
"amazonLink": "https://amazon.com.be",
83+
"countryCode": "be",
84+
"translation": {"en": "Belgium", "es": "Bélgica", "fr": "Belgique"},
85+
},
86+
{
87+
"amazonLink": "https://amazon.com.br",
88+
"countryCode": "br",
89+
"translation": {"en": "Brazil", "es": "Brasil", "fr": "Brésil"},
90+
},
91+
{
92+
"amazonLink": "https://amazon.com.tr",
93+
"countryCode": "tr",
94+
"translation": {"en": "Türkiye", "es": "Turquía", "fr": "Turquie"},
95+
},
96+
{
97+
"amazonLink": "https://amazon.com.mx",
98+
"countryCode": "mx",
99+
"translation": {"en": "Mexico", "es": "México", "fr": "Mexique"},
100+
},
101+
{
102+
"amazonLink": "https://amazon.de",
103+
"countryCode": "de",
104+
"translation": {"en": "Germany", "es": "Alemania", "fr": "Allemagne"},
105+
},
106+
{
107+
"amazonLink": "https://amazon.es",
108+
"countryCode": "es",
109+
"translation": {"en": "Spain", "es": "España", "fr": "Espagne"},
110+
},
111+
{
112+
"amazonLink": "https://amazon.eg",
113+
"countryCode": "eg",
114+
"translation": {"en": "Egypt", "es": "Egipto", "fr": "Égypte"},
115+
},
116+
{
117+
"amazonLink": "https://amazon.fr",
118+
"countryCode": "fr",
119+
"translation": {"en": "France", "es": "Francia", "fr": "France"},
120+
},
121+
{
122+
"amazonLink": "https://amazon.in",
123+
"countryCode": "in",
124+
"translation": {"en": "India", "es": "India", "fr": "Inde"},
125+
},
126+
{
127+
"amazonLink": "https://amazon.it",
128+
"countryCode": "it",
129+
"translation": {"en": "Italy", "es": "Italia", "fr": "Italie"},
130+
},
131+
{
132+
"amazonLink": "https://amazon.nl",
133+
"countryCode": "nl",
134+
"translation": {
135+
"en": "Netherlands",
136+
"es": "Países Bajos",
137+
"fr": "Pays-Bas"
138+
},
139+
},
140+
{
141+
"amazonLink": "https://amazon.pl",
142+
"countryCode": "pl",
143+
"translation": {"en": "Poland", "es": "Polonia", "fr": "Pologne"},
144+
},
145+
{
146+
"amazonLink": "https://amazon.sa",
147+
"countryCode": "sa",
148+
"translation": {
149+
"en": "Saudi Arabia",
150+
"es": "Arabia Saudita",
151+
"fr": "Arabie Saoudite"
152+
},
153+
},
154+
{
155+
"amazonLink": "https://amazon.se",
156+
"countryCode": "se",
157+
"translation": {"en": "Sweden", "es": "Suecia", "fr": "Suède"},
158+
},
159+
{
160+
"amazonLink": "https://amazon.sg",
161+
"countryCode": "sg",
162+
"translation": {"en": "Singapore", "es": "Singapur", "fr": "Singapour"},
163+
},
164+
];
165+
*/

0 commit comments

Comments
 (0)