-
Notifications
You must be signed in to change notification settings - Fork 12
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
base: dev
Are you sure you want to change the base?
Dynamic link #173
Conversation
# Conflicts: # ecommers/lib/core/app_services/index.dart # ecommers/lib/shared/dependency_service.dart
} | ||
|
||
Future _fetchProductByIdAndNavigation(int id) async { | ||
final Product product = await productService.fetchProductById(id); |
There was a problem hiding this comment.
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);
}
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} | ||
|
||
return null; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove space
There was a problem hiding this comment.
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 { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove space
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to shareDynamicLinkText
There was a problem hiding this comment.
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}'); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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}', |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename shareeDynamicLinkText
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed
#169 closed