提交更改

master
王亚玲 2 years ago
parent 741c103161
commit 149b0643f6

@ -0,0 +1 @@
/Users/datang/fvm/versions/3.0.0

@ -1,4 +1,4 @@
{ {
"flutterSdkVersion": "2.8.0", "flutterSdkVersion": "3.0.0",
"flavors": {} "flavors": {}
} }

@ -19,22 +19,23 @@ if (flutterVersionCode == null) {
def flutterVersionName = localProperties.getProperty('flutter.versionName') def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) { if (flutterVersionName == null) {
flutterVersionName = '1.0' flutterVersionName = '1.0'
}else{
//
def tem1=Integer.parseInt(flutterVersionName.substring(flutterVersionName.lastIndexof(".")+1,flutterVersionName.length()))
tem1++
//localPropertiesfluttervarsionName
def newVersionName=flutterVersionName.substring(0,flutterVersionName.lastIndexof(".")+1)+tem1
localProperties.setProperty("flutter.versionName",newVersionName)
flutterVersionName=newVersionName
//localproperyiesstring,local.properties
def newLocalProperties=localProperties.toString()
newLocalProperties =newLocalProperties.replace(",","\n")
newLocalProperties =newLocalProperties.replace("{","")
newLocalProperties =newLocalProperties.replace("}","")
localPropertiesFile.write(newLocalProperties)
} }
//else{
// //
// def tem1=Integer.parseInt(flutterVersionName.substring(flutterVersionName.lastIndexof(".")+1,flutterVersionName.length()))
// tem1++
// //localPropertiesfluttervarsionName
// def newVersionName=flutterVersionName.substring(0,flutterVersionName.lastIndexof(".")+1)+tem1
// localProperties.setProperty("flutter.versionName",newVersionName)
// flutterVersionName=newVersionName
// //localproperyiesstring,local.properties
// def newLocalProperties=localProperties.toString()
// newLocalProperties =newLocalProperties.replace(",","\n")
// newLocalProperties =newLocalProperties.replace("{","")
// newLocalProperties =newLocalProperties.replace("}","")
// localPropertiesFile.write(newLocalProperties)
//
//}
def keystoreProperties = new Properties() def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties') def keystorePropertiesFile = rootProject.file('key.properties')
@ -74,7 +75,15 @@ android {
// JPUSH_CHANNEL : "developer-default", //. // JPUSH_CHANNEL : "developer-default", //.
// ] // ]
} }
// productFlavors {
// demo {
// //...
// versionName "1.1-demo"
// }
// full {
// //...
// }
// }
signingConfigs { signingConfigs {
release { release {
keyAlias keystoreProperties['keyAlias'] keyAlias keystoreProperties['keyAlias']

@ -21,13 +21,15 @@ import 'package:project_telephony/ui/home/call.dart';
import 'package:project_telephony/ui/loading.dart'; import 'package:project_telephony/ui/loading.dart';
import 'package:project_telephony/ui/tab_navigator.dart'; import 'package:project_telephony/ui/tab_navigator.dart';
import 'package:project_telephony/utils/developer_util.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:telephony/telephony.dart'; import 'package:telephony/telephony.dart';
import 'package:project_telephony/utils/hive_store.dart'; import 'package:project_telephony/utils/hive_store.dart';
void main() async { void main() async {
const buildType = String.fromEnvironment('BUILD_TYPE');
DeveloperUtil.setDev(!(buildType.contains('PRODUCT')));
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
// await initializeService(); // await initializeService();
// Workmanager().initialize( // Workmanager().initialize(

@ -1,15 +1,14 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:project_telephony/model/sms_content_model.dart';
import 'package:project_telephony/utils/user_tool.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../base/base_style.dart'; import '../../base/base_style.dart';
import '../../constants/api.dart'; import '../../constants/api.dart';
import '../../model/network/api_client.dart'; import '../../model/network/api_client.dart';
import '../../model/network/base_model.dart'; import '../../model/network/base_model.dart';
import '../../model/user_info_model.dart';
import '../../providers/user_provider.dart'; import '../../providers/user_provider.dart';
import '../../utils/toast/cloud_toast.dart'; import '../../utils/toast/cloud_toast.dart';
import '../user/content_details_page.dart'; import '../user/content_details_page.dart';

@ -3,6 +3,7 @@ import 'dart:async';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_background_service/flutter_background_service.dart'; import 'package:flutter_background_service/flutter_background_service.dart';
import 'package:package_info/package_info.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:project_telephony/ui/home/content_connect_page.dart'; import 'package:project_telephony/ui/home/content_connect_page.dart';
@ -254,7 +255,13 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
_getContainer(String title, String text, String image, Color cl1, Color cl2) { _getContainer(String title, String text, String image, Color cl1, Color cl2) {
return GestureDetector( return GestureDetector(
onTap: () {
onTap: () async{
// PackageInfo packageInfo = await PackageInfo.fromPlatform();
// String version = packageInfo.version;//
// String buildNumber = packageInfo.buildNumber;//
// print(version);
// print(buildNumber);
// print(title); // print(title);
if (title == "接听后") { if (title == "接听后") {
Get.to(() => const ContentConnectPage()); Get.to(() => const ContentConnectPage());

@ -431,7 +431,7 @@ class _UserPageState extends State<UserPage> {
// }); // });
service.startService(); service.startService();
// WidgetsFlutterBinding.ensureInitialized(); // WidgetsFlutterBinding.ensureInitialized();
// initializeService(); initializeService();
// UserTool.userProvider.setKg(vle) // UserTool.userProvider.setKg(vle)
// initializeService(); // initializeService();
// initializeService(); // initializeService();

@ -1,5 +1,8 @@
import 'dart:ffi';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:project_telephony/base/base_style.dart'; import 'package:project_telephony/base/base_style.dart';
import 'package:project_telephony/ui/widget/plone_bottom.dart'; import 'package:project_telephony/ui/widget/plone_bottom.dart';
import 'package:project_telephony/utils/headers.dart'; import 'package:project_telephony/utils/headers.dart';
@ -12,11 +15,12 @@ import '../../utils/toast/cloud_toast.dart';
class AppDialog extends Dialog { class AppDialog extends Dialog {
final String title; final String title;
final String confirm; // final String confirm; //
// final EasyRefreshController refreshController;
const AppDialog({ const AppDialog({
Key? key, Key? key,
this.title = "恭喜您获得会员体验卡", this.title = "恭喜您获得会员体验卡",
this.confirm = "立即领取", this.confirm = "立即领取",
// required this.refreshController
}) : super(key: key); }) : super(key: key);
@override @override
@ -73,6 +77,8 @@ _getBotton(String bContent, context) {
CloudToast.show(res.msg); CloudToast.show(res.msg);
UserTool.userProvider.updateUserInfo(); UserTool.userProvider.updateUserInfo();
Navigator.pop(context); Navigator.pop(context);
// .refreshController.callRefresh();
} else { } else {
CloudToast.show(res.msg); CloudToast.show(res.msg);
} }

@ -0,0 +1,9 @@
class DeveloperUtil {
static bool _dev = false;
static setDev(bool state) {
_dev = state;
}
static bool get dev => _dev;
}

@ -177,7 +177,7 @@ packages:
source: hosted source: hosted
version: "3.0.0" version: "3.0.0"
common_utils: common_utils:
dependency: transitive dependency: "direct main"
description: description:
name: common_utils name: common_utils
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
@ -735,7 +735,7 @@ packages:
source: hosted source: hosted
version: "1.0.5" version: "1.0.5"
path: path:
dependency: transitive dependency: "direct dev"
description: description:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1 version: 1.0.1+2
environment: environment:
sdk: ">=2.16.0 <3.0.0" sdk: ">=2.16.0 <3.0.0"
@ -95,7 +95,8 @@ dependencies:
tab_indicator_styler: ^2.0.0 tab_indicator_styler: ^2.0.0
#手机通讯录 #手机通讯录
flutter_contacts: ^1.1.5 flutter_contacts: ^1.1.5
#工具类
common_utils: ^2.1.0
# # jdk # # jdk
# jverify: ^2.2.5 # jverify: ^2.2.5
## pub 集成 ## pub 集成
@ -118,6 +119,7 @@ dev_dependencies:
pub_semver: ^2.1.0 pub_semver: ^2.1.0
flutter_gen_runner: ^4.3.0 flutter_gen_runner: ^4.3.0
flutter_lints: ^2.0.0 flutter_lints: ^2.0.0
path: ^1.8.1
# patgh: ^1.8.1 # patgh: ^1.8.1
# 脚本工具 # 脚本工具
grinder: ^0.9.1 grinder: ^0.9.1

@ -1,6 +1,7 @@
import 'dart:io'; import 'dart:io';
import 'package:common_utils/common_utils.dart'; import 'package:common_utils/common_utils.dart';
import 'package:flustars/flustars.dart';
import 'package:grinder/grinder.dart'; import 'package:grinder/grinder.dart';
import 'package:path/path.dart'; import 'package:path/path.dart';
import 'package:pub_semver/pub_semver.dart'; import 'package:pub_semver/pub_semver.dart';

Loading…
Cancel
Save