Fixes on adnroid and ios
This commit is contained in:
Binary file not shown.
23
ios/Runner/Assets.xcassets/more.imageset/Contents.json
vendored
Normal file
23
ios/Runner/Assets.xcassets/more.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "more.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "more@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "more@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
ios/Runner/Assets.xcassets/more.imageset/more.png
vendored
Normal file
BIN
ios/Runner/Assets.xcassets/more.imageset/more.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 617 B |
BIN
ios/Runner/Assets.xcassets/more.imageset/more@2x.png
vendored
Normal file
BIN
ios/Runner/Assets.xcassets/more.imageset/more@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
BIN
ios/Runner/Assets.xcassets/more.imageset/more@3x.png
vendored
Normal file
BIN
ios/Runner/Assets.xcassets/more.imageset/more@3x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -67,7 +67,7 @@ abstract class BaseState<T extends StatefulWidget> extends State<T> {
|
|||||||
|
|
||||||
List<Widget> getMenuButtons() {
|
List<Widget> getMenuButtons() {
|
||||||
|
|
||||||
List<Widget> menuItemList = [];
|
List<PopupMenuEntry<int>> menuItemList = [];
|
||||||
menuItemList.add(new PopupMenuItem(
|
menuItemList.add(new PopupMenuItem(
|
||||||
value: 0,
|
value: 0,
|
||||||
child: getMenuItem(settings_png, StringsLocalization.settings())
|
child: getMenuItem(settings_png, StringsLocalization.settings())
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class SqliteHelper {
|
|||||||
/// необходимые для идентификации пользователя и проведения запросов.
|
/// необходимые для идентификации пользователя и проведения запросов.
|
||||||
Future createSession(String merchantID, String posID, String token) async {
|
Future createSession(String merchantID, String posID, String token) async {
|
||||||
|
|
||||||
Map session = {
|
Map<String, dynamic> session = {
|
||||||
columnMerchantID: merchantID,
|
columnMerchantID: merchantID,
|
||||||
columnPosID: posID,
|
columnPosID: posID,
|
||||||
columnToken: token,
|
columnToken: token,
|
||||||
|
|||||||
@@ -87,13 +87,6 @@ class FAQScreenState<T> extends BaseState<FAQScreen> {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
initPhoneAndUrl().then((_) {
|
|
||||||
super.initState();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override Widget build(BuildContext context) {
|
@override Widget build(BuildContext context) {
|
||||||
return new Scaffold(appBar: getAppBar(), body: getScreenContent());
|
return new Scaffold(appBar: getAppBar(), body: getScreenContent());
|
||||||
}
|
}
|
||||||
@@ -104,12 +97,14 @@ class FAQScreenState<T> extends BaseState<FAQScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void initHelp(String phone, String url) {
|
void initHelp(String phone, String url) {
|
||||||
data = <Entry>[
|
setState(() {
|
||||||
new Entry(StringsLocalization.registration(), StringsLocalization.registrationGuide()),
|
data = <Entry>[
|
||||||
new Entry(StringsLocalization.usage(), StringsLocalization.usageGuide()),
|
new Entry(StringsLocalization.registration(), StringsLocalization.registrationGuide()),
|
||||||
new Entry(StringsLocalization.support(), StringsLocalization.supportGuide(phone, url)),
|
new Entry(StringsLocalization.usage(), StringsLocalization.usageGuide()),
|
||||||
new Entry(StringsLocalization.common(), StringsLocalization.commonGuide())
|
new Entry(StringsLocalization.support(), StringsLocalization.supportGuide(phone, url)),
|
||||||
];
|
new Entry(StringsLocalization.common(), StringsLocalization.commonGuide())
|
||||||
|
];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override List<Widget> getMenuButtons() {
|
@override List<Widget> getMenuButtons() {
|
||||||
@@ -119,6 +114,7 @@ class FAQScreenState<T> extends BaseState<FAQScreen> {
|
|||||||
/// Метод возвращает ListView с блоками faq.
|
/// Метод возвращает ListView с блоками faq.
|
||||||
@override Widget getScreenContent() {
|
@override Widget getScreenContent() {
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
|
initPhoneAndUrl();
|
||||||
return getBackground();
|
return getBackground();
|
||||||
} else {
|
} else {
|
||||||
return new ListView.builder(
|
return new ListView.builder(
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
|||||||
String loyalityType = '';
|
String loyalityType = '';
|
||||||
String loyalty = '';
|
String loyalty = '';
|
||||||
String bonus = '';
|
String bonus = '';
|
||||||
List<Map> coupons = [];
|
List<dynamic> coupons = [];
|
||||||
ListView listView;
|
ListView listView;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -388,7 +388,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
loading = false;
|
loading = false;
|
||||||
});
|
});
|
||||||
List<String> errors = purchase['errors'];
|
List<dynamic> errors = purchase['errors'];
|
||||||
purchaseInProgress = false;
|
purchaseInProgress = false;
|
||||||
apiErrorAlert(errors[0]);
|
apiErrorAlert(errors[0]);
|
||||||
} else {
|
} else {
|
||||||
@@ -424,7 +424,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setBonuses(Map bonuses, bool showBonus) {
|
void setBonuses(Map bonuses, bool showBonus) {
|
||||||
print('kifio ' + this.loyalityType);
|
print('loyalityType ' + this.loyalityType);
|
||||||
if (bonuses['type'] == 'amount') {
|
if (bonuses['type'] == 'amount') {
|
||||||
this.loyalty = '${user['discount']}%';
|
this.loyalty = '${user['discount']}%';
|
||||||
} else {
|
} else {
|
||||||
@@ -436,7 +436,7 @@ class PurchaseScreenState<T> extends BaseState<PurchaseScreen> {
|
|||||||
if (showBonus && (this.loyalityType == 'bonus')) {
|
if (showBonus && (this.loyalityType == 'bonus')) {
|
||||||
this.bonus = '${user['bonus']}';
|
this.bonus = '${user['bonus']}';
|
||||||
}
|
}
|
||||||
print('kifio ' + this.loyalty);
|
print('loyalty ' + this.loyalty);
|
||||||
print('bonus ' + this.bonus);
|
print('bonus ' + this.bonus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class PurchaseSuccessScreen extends StatefulWidget {
|
|||||||
final String app;
|
final String app;
|
||||||
final SqliteHelper helper;
|
final SqliteHelper helper;
|
||||||
final Map details;
|
final Map details;
|
||||||
final List<Map> coupons;
|
final List<dynamic> coupons;
|
||||||
|
|
||||||
@override State createState() =>
|
@override State createState() =>
|
||||||
new PurchaseSuccessScreenState(val, name, helper, app, details, coupons);
|
new PurchaseSuccessScreenState(val, name, helper, app, details, coupons);
|
||||||
@@ -25,7 +25,7 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
|||||||
|
|
||||||
PurchaseSuccessScreenState(
|
PurchaseSuccessScreenState(
|
||||||
String sum, String username, SqliteHelper helper,
|
String sum, String username, SqliteHelper helper,
|
||||||
String app, Map details, List<Map> coupons
|
String app, Map details, List<dynamic> coupons
|
||||||
) : super(helper, app) {
|
) : super(helper, app) {
|
||||||
this.sum = sum;
|
this.sum = sum;
|
||||||
this.username = username;
|
this.username = username;
|
||||||
@@ -35,7 +35,7 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
|||||||
|
|
||||||
String sum, username;
|
String sum, username;
|
||||||
Map details;
|
Map details;
|
||||||
List<Map> coupons;
|
List<dynamic> coupons;
|
||||||
int bonusPlus = 0;
|
int bonusPlus = 0;
|
||||||
int bonusMinus = 0;
|
int bonusMinus = 0;
|
||||||
int currency;
|
int currency;
|
||||||
@@ -56,8 +56,10 @@ class PurchaseSuccessScreenState<T> extends BaseState<PurchaseSuccessScreen> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
helper.getCurrency().then((currency) {
|
helper.getCurrency().then((currency) {
|
||||||
helper.getToken().then((token) {
|
helper.getToken().then((token) {
|
||||||
this.currency = currency;
|
setState(() {
|
||||||
this.token = token;
|
this.currency = currency;
|
||||||
|
this.token = token;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ class _SplashScreenState extends BaseState<SplashScreen> {
|
|||||||
|
|
||||||
if (userResponse != null) {
|
if (userResponse != null) {
|
||||||
print('I have user in method handler!');
|
print('I have user in method handler!');
|
||||||
List<Map> users = JSON.decode(userResponse.body);
|
List<dynamic> users = JSON.decode(userResponse.body);
|
||||||
if (users.length > 0) {
|
if (users.length > 0) {
|
||||||
return users[0];
|
return users[0];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user