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

Dynamic link #173

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open

Dynamic link #173

wants to merge 7 commits into from

Conversation

qkul
Copy link
Collaborator

@qkul qkul commented May 13, 2020

#169 closed

}

Future _fetchProductByIdAndNavigation(int id) async {
final Product product = await productService.fetchProductById(id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove method, and move body to if (deepLink != null && membershipService.isNotExpired) {
final productId = int.parse(deepLink.queryParameters['id']);
_fetchProductByIdAndNavigation(productId);
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed method

itunesConnectAnalyticsParameters: ItunesConnectAnalyticsParameters(),
socialMetaTagParameters: SocialMetaTagParameters(
title: '${product.details.brand} ${Formatter.getCost(product?.price)}',
description: 'best store in the world',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to add into localization

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

}

return null;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove space

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

import 'package:flutter/foundation.dart';

class ShareProductService {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove space

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


class ShareProductService {

Future shareeDynamicLinkText(Product product) async {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to shareDynamicLinkText

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed

await consolidateHttpClientResponseBytes(response);
await Share.file('${product.title}', '${product.title}.png', bytes, '*/*',
text:
'Title: ${product?.title}\nPrice: ${Formatter.getCost(product?.price)}\nRate: ${product?.rate}\n${product?.details.brand}, ${product?.details.category}');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add such method in formatter with product parameter.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

try {
Share.text(
'${product.title}',
'Title: ${product?.title}\nPrice: ${Formatter.getCost(product.price)}\nRate: ${product?.rate}',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add such method in formatter with product parameter.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also try to use localization

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


class ShareProductProviderModel extends ChangeNotifier {
Future shareDynamicLink(Product product) async {
await shareProductService.shareeDynamicLinkText(product);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename shareeDynamicLinkText

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed

@qkul qkul requested a review from Platton96 May 13, 2020 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants