RG-3444
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:checker/resources.dart';
|
||||
import 'package:checker/strings.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -5,7 +7,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:checker/base/base_state.dart';
|
||||
import 'package:checker/consts.dart';
|
||||
import 'package:checker/common.dart';
|
||||
import 'package:checker/db.dart';
|
||||
|
||||
/// Класс содержит заголовки и текст блоков FAQ.
|
||||
class Entry {
|
||||
@@ -88,25 +89,19 @@ class FAQScreenState<T> extends BaseState<FAQScreen> {
|
||||
@override Widget build(BuildContext context) {
|
||||
if (app == null) {
|
||||
platform.invokeMethod('getFlavor').then((flavor) {
|
||||
setState(() {
|
||||
app = flavor;
|
||||
initPhoneAndUrl();
|
||||
initPhoneAndUrl().then((_) {
|
||||
setState(() {
|
||||
app = flavor;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
return new Scaffold(appBar: getAppBar(), body: getScreenContent());
|
||||
}
|
||||
|
||||
void initPhoneAndUrl() {
|
||||
String phone, url;
|
||||
if (app == 'pip') {
|
||||
phone = '+38 080 030 9997\n+38 044 390 1697';
|
||||
url = 'http://discount.kiev.ua/';
|
||||
} else if (app == 'autobonus') {
|
||||
phone = '8-800-234-6064';
|
||||
url = 'https://www.auto-club.biz';
|
||||
}
|
||||
initHelp(phone, url);
|
||||
Future initPhoneAndUrl() async {
|
||||
initHelp(await platform.invokeMethod('getSupportPhone'),
|
||||
await platform.invokeMethod('getSupportUrl'));
|
||||
}
|
||||
|
||||
void initHelp(String phone, String url) {
|
||||
|
||||
Reference in New Issue
Block a user