Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation of purchase collection. #307

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 44 additions & 0 deletions assets/collections/0_chatGPT_premium.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"id": "0_chatGPT_premium",
"name": "teste",
"description": "teste",
"category": "Premium",
"tags": [
"ChatGPT"
],
"isPremium": true,
"appStoreId": "com.olmps.memo_099_in_app_purchase_deck",
"playStoreId": null,
"contributors": [
{
"name": "chatGPT",
"url": "https://www.linkedin.com/",
"imageUrl": "https://media-exp1.licdn.com/dms/image/C4E03AQFYmdJJeE9gmA/profile-displayphoto-shrink_400_400/0/1517688960443?e=1631750400&v=beta&t=bpxRB_CL0-3CaT4nzadf1PKpSblm2I_Z7yjm6gEdaBM"
}
],
"memos": [
{
"uniqueId": "03c9a8d5-9e27-4ec2-8a3c-7bf20431b890",
"question": [
{
"insert": "Testes e mais testes\n"
}
],
"answer": [
{
"insert": "Isso é mais conhecido como "
},
{
"insert": "testes",
"attributes": {
"bold": true,
"underline": true
}
},
{
"insert": ".\n"
}
]
}
]
}
5 changes: 4 additions & 1 deletion assets/collections/bdd_fundamentos_01.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"name": "BDD - Fundamentos",
"description": "Existem diversos paradigmas de desenvolvimento de software. Dentre estes, está o desenvolvimento orientado a comportamento (BDD). Neste deck, vamos conhecer um pouco sobre o BDD, uma das melhores formas de otimizar tanto seu processo de desenvolvimento quanto o produto final gerado.",
"category": "Testes",
"tags": ["tests", "bdd"],
"tags": [
"tests",
"bdd"
],
"contributors": [
{
"name": "Nicolas Nascimento",
Expand Down
5 changes: 4 additions & 1 deletion assets/collections/comecando_com_git.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"name": "Começando com Git",
"description": "\"Git é um sistema de controle de versões distribuído, usado principalmente no desenvolvimento de software, mas pode ser usado para registrar o histórico de edições de qualquer tipo de arquivo. O Git foi inicialmente projetado e desenvolvido por Linus Torvalds para o desenvolvimento do kernel Linux, mas foi adotado por muitos outros projetos.\" - Wikipedia, 2021.",
"category": "Versionamento",
"tags": ["git", "versionamento"],
"tags": [
"git",
"versionamento"
],
"contributors": [
{
"name": "@matuella",
Expand Down
6 changes: 5 additions & 1 deletion assets/collections/ecossistema_do_flutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"name": "Ecossistema do Flutter - Fundamentos",
"description": "\"Flutter é um kit de desenvolvimento de interface de usuário (UI toolkit), de código aberto, criado pelo Google, que possibilita a criação de aplicativos compilados nativamente. Atualmente pode compilar para Android, iOS, Windows, Mac, Linux, Google Fuchsia e Web.\" - Wikipedia, 2021.",
"category": "Flutter",
"tags": ["flutter", "framework", "cross-platform"],
"tags": [
"flutter",
"framework",
"cross-platform"
],
"contributors": [
{
"name": "@matuella",
Expand Down
5 changes: 4 additions & 1 deletion assets/collections/fundamentos_scrum.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"name": "Fundamentos do Scrum",
"description": "O Scrum é um framework de gerenciamento de projetos, da organização ao desenvolvimento ágil de produtos complexos e adaptativos com o mais alto valor possível, através de várias técnicas, utilizado desde o início de 1990 e que atualmente é utilizado em mais de 60% dos projetos ágeis em todo o mundo. - Wikipedia, 2021",
"category": "Scrum",
"tags": ["agile", "scrum"],
"tags": [
"agile",
"scrum"
],
"contributors": [
{
"name": "Olympus",
Expand Down
5 changes: 4 additions & 1 deletion assets/collections/guia_scrum.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"name": "Guia do Scrum",
"description": "O guia do scrum é um documento pequeno, que descreve tudo o que existe no Scrum. Muitas pessoas que dizem conhecer o Scrum, nunca leram o documento. Não pode ser pela quantidade de páginas, que são menos de 20. O guia do scrum estabelece pilares, valores, artefatos, papéis e responsabilidades para que uma equipe possa organizar o seu fluxo de trabalho, encontrando formas de priorizar o trabalho a ser realizado, acompanhar dificuldades e progresso, revisar o trabalho feito e ainda garantir ações de melhoria ao longo do tempo.",
"category": "Scrum",
"tags": ["agile", "scrum"],
"tags": [
"agile",
"scrum"
],
"contributors": [
{
"name": "Daniel Wildt",
Expand Down
5 changes: 4 additions & 1 deletion assets/collections/kotlin_fundamentos_01.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"name": "Kotlin - Fundamentos",
"description": "Nessa coleção de memórias você vai ser introduzido na linguagem de programação Kotlin. Embora ler a documentação do Kotlin seja fácil e agradável, aprender por exemplos é um tipo diferente de diversão (confira os links abaixo).",
"category": "Kotlin",
"tags": ["kotlin", "linguagem de programação"],
"tags": [
"kotlin",
"linguagem de programação"
],
"contributors": [
{
"name": "Lucas Montano",
Expand Down
4 changes: 3 additions & 1 deletion assets/collections/manifesto_agil.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"name": "Manifesto Ágil",
"description": "Em Fevereiro de 2001, no Snowbird ski resort em Utah, 17 pessoas se apresentam para falar, se divertir e encontrar caminhos comuns nas práticas de engenharia e organização de projetos que vinham testando, validando e aprendendo. O que emerge deste encontro de 2 dias foi o Agile ‘Software Development’ Manifesto. Representantes de diferentes metodologias estavam presentes nesta data: Extreme Programming, SCRUM, DSDM, Adaptive Software Development, Crystal, Feature-Driven Development, Pragmatic Programming, e outras pessoas que eram simpáticas a necessidade de alternativas para projetos direcionados por documentação, normalmente direcionados por processos de desenvolvimento de software pesados. Todos signatários terminam o encontro com o termo Agile, termo que aparece em cena por indicação de Martin Fowler, que já aparecia na cena de eXtreme Programming anos anteriores.",
"category": "Metodologia Ágil",
"tags": ["agile"],
"tags": [
"agile"
],
"contributors": [
{
"name": "Daniel Wildt",
Expand Down
5 changes: 4 additions & 1 deletion assets/collections/swift_fundamentos_01.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
"name": "Fundamentos de Swift I",
"description": "\"Swift é uma linguagem de programação desenvolvida pela Apple para desenvolvimento no iOS, macOS, watchOS, tvOS e Linux. O compilador usa a infraestrutura do LLVM e é distribuído junto do Xcode desde a versão 6.\" - Wikipedia, 2021",
"category": "Swift",
"tags": ["swift", "linguagem de programação"],
"tags": [
"swift",
"linguagem de programação"
],
"contributors": [
{
"name": "@matuella",
Expand Down
Binary file added assets/images/icons/2.0x/lock.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/icons/3.0x/lock.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/icons/lock.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions ios/StoreKitConfig.storekit
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"identifier" : "1413D032",
"nonRenewingSubscriptions" : [

],
"products" : [
{
"displayPrice" : "0.99",
"familyShareable" : false,
"internalID" : "B5ABC500",
"localizations" : [
{
"description" : "",
"displayName" : "",
"locale" : "pt_BR"
}
],
"productID" : "com.olmps.memo_099_in_app_purchase_deck",
"referenceName" : "in-App purchase deck",
"type" : "NonConsumable"
}
],
"settings" : {
"_failTransactionsEnabled" : false,
"_locale" : "en_US",
"_storefront" : "USA",
"_storeKitErrors" : [
{
"current" : null,
"enabled" : false,
"name" : "Load Products"
},
{
"current" : null,
"enabled" : false,
"name" : "Purchase"
},
{
"current" : null,
"enabled" : false,
"name" : "Verification"
},
{
"current" : null,
"enabled" : false,
"name" : "App Store Sync"
},
{
"current" : null,
"enabled" : false,
"name" : "Subscription Status"
},
{
"current" : null,
"enabled" : false,
"name" : "App Transaction"
},
{
"current" : null,
"enabled" : false,
"name" : "Manage Subscriptions Sheet"
},
{
"current" : null,
"enabled" : false,
"name" : "Refund Request Sheet"
},
{
"current" : null,
"enabled" : false,
"name" : "Offer Code Redeem Sheet"
}
]
},
"subscriptionGroups" : [

],
"subscriptionOffersKeyPair" : {
"id" : "CD7A44EC",
"privateKey" : "MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgs/ZH6Gq5cc1o5mu4Q0R52ZHvaQmzGFtWdx0k+KYIzVCgCgYIKoZIzj0DAQehRANCAAQXGVdzbYjcQvprzdslvfV9PaZtDqRHOG/e5CHqMwx9pGDRKBGeGPdKLappihtFsuYfk44nrvzrF9fpRJmdBsaU"
},
"version" : {
"major" : 3,
"minor" : 0
}
}
Binary file added ios/StoreKitTestCertificate.cer
Binary file not shown.
1 change: 1 addition & 0 deletions lib/application/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class AppRoot extends StatelessWidget {
executionServices.overrideWithValue(state.executionServices),
progressServices.overrideWithValue(state.progressServices),
resourceServices.overrideWithValue(state.resourceServices),
collectionPurchaseServices.overrideWithValue(state.collectionPurchaseServices)
],
child: _LoadedAppRoot(),
),
Expand Down
2 changes: 2 additions & 0 deletions lib/application/constants/dimensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const double genericBorderHeight = 2;
const textTagBorderRadius = BorderRadius.all(Radius.circular(2));
const double cardBorderWidth = 4;

const double collectionsBlurSize = 5;

const double resourceLinkEmojiTextSize = 20;

const double iconSize = 24;
Expand Down
3 changes: 3 additions & 0 deletions lib/application/constants/exception_strings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ String descriptionForException(BaseException exception) {

case ExceptionType.failedToOpenUrl:
return 'Algo deu errado ao tentar abrir o link!';

case ExceptionType.failedPurchase:
return 'Algo deu errado ao tentar realizar a compra!';
default:
return 'Algo deu errado. Por favor tente novamente';
}
Expand Down
4 changes: 4 additions & 0 deletions lib/application/constants/images.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ enum ImageKey {
folder,
italic,
link,
lock,
organize,
settings,
trash,
Expand Down Expand Up @@ -61,6 +62,8 @@ extension ImageKeyPath on ImageKey {
return '$_editorIconsRoot/italic.png';
case ImageKey.link:
return '$_iconsRoot/link.png';
case ImageKey.lock:
return '$_iconsRoot/lock.png';
case ImageKey.organize:
return '$_iconsRoot/organize.png';
case ImageKey.settings:
Expand Down Expand Up @@ -100,6 +103,7 @@ final dragAsset = ImageKey.drag.path;
final folderAsset = ImageKey.folder.path;
final italicAsset = ImageKey.italic.path;
final linkAsset = ImageKey.link.path;
final lockAsset = ImageKey.lock.path;
final organizeAsset = ImageKey.organize.path;
final settingsAsset = ImageKey.settings.path;
final trashAsset = ImageKey.trash.path;
Expand Down
4 changes: 4 additions & 0 deletions lib/application/constants/strings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ const collectionsSectionHeaderSeeAll = 'Ver todos';

const collectionsStartNow = 'Começar Agora';

const collectionPurchase = 'Deseja comprar este Deck?';
const collectionSuccessPurchase = 'Deck comprado com sucesso!';

String collectionsEmptyTitleSegment(CollectionsSegment segment) {
switch (segment) {
case CollectionsSegment.explore:
Expand Down Expand Up @@ -186,6 +189,7 @@ const memos = 'Memos';
const next = 'Próximo';
const cancel = 'Cancelar';
const remove = 'Remover';
const purchase = 'Comprar';

const recallLevel = 'Nível de Fixação';

Expand Down