王亚玲 2 years ago
parent 2113e45101
commit 14e44092d8

@ -0,0 +1,16 @@
import 'package:power_logger/power_logger.dart';
class DevEV {
static final DevEV _instance = DevEV._();
DevEV._();
static DevEV get instance => _instance;
bool dev = false;
void setEnvironment(context, {required bool environment}) {
dev = environment;
PowerLogger.start(context, debug: dev);
}
}

@ -1,14 +1,15 @@
import 'dart:async'; // import 'dart:async';
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:call_log/call_log.dart'; // import 'package:call_log/call_log.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_background_service/flutter_background_service.dart'; import 'package:flutter_background_service/flutter_background_service.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get_navigation/src/root/get_material_app.dart'; import 'package:get/get_navigation/src/root/get_material_app.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:power_logger/power_logger.dart';
import 'package:project_telephony/permission.dart'; // import 'package:permission_handler/permission_handler.dart';
import 'package:project_telephony/ui/login/login_page.dart'; // import 'package:project_telephony/permission.dart';
// import 'package:project_telephony/ui/login/login_page.dart';
import 'package:project_telephony/ui/tab_navigator.dart'; import 'package:project_telephony/ui/tab_navigator.dart';
// import 'package:telephony/telephony.dart'; // import 'package:telephony/telephony.dart';
@ -19,11 +20,14 @@ import 'package:project_telephony/ui/tab_navigator.dart';
void main() async { void main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
FlutterError.onError = (details) {
LoggerData.addData(details);
FlutterError.presentError(details);
};
// await initializeService(); // await initializeService();
WidgetsFlutterBinding.ensureInitialized();
runApp(const MyApp()); runApp(const MyApp());
// SystemUiOverlayStyle systemUiOverlayStyle = const SystemUiOverlayStyle(
// statusBarColor: Colors.transparent, //
// statusBarIconBrightness: Brightness.dark); //
} }
// Future<void> initializeService() async { // Future<void> initializeService() async {

@ -67,8 +67,7 @@ class _ContentPageState extends State<ContentPage> {
// print(index); // print(index);
}, },
onLongPress: () { onLongPress: () {
setState(() {}); if (index != textList.length - 1) {
if (index == textList.length - 1) {
showDialog( showDialog(
context: context, context: context,
builder: (context) { builder: (context) {
@ -78,6 +77,7 @@ class _ContentPageState extends State<ContentPage> {
); );
}); });
} }
setState(() {});
}, },
child: Container( child: Container(
// width: 686.w, // width: 686.w,

@ -11,6 +11,7 @@ class HomePage extends StatefulWidget {
class _HomePageState extends State<HomePage> { class _HomePageState extends State<HomePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Colors.white, backgroundColor: Colors.white,
@ -19,12 +20,11 @@ class _HomePageState extends State<HomePage> {
body: SafeArea( body: SafeArea(
child: Column( child: Column(
children: [ children: [
Container( Image.asset(
child: Image.asset(
Assets.images.homeBg.path, Assets.images.homeBg.path,
height: 722.w, height: 722.w,
width: 722.w, width: 722.w,
)), ),
_getBody(), _getBody(),
], ],
), ),

@ -1,8 +1,10 @@
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
import 'package:permission_handler_platform_interface/permission_handler_platform_interface.dart'; import 'package:permission_handler_platform_interface/permission_handler_platform_interface.dart';
import 'package:power_logger/power_logger.dart';
import 'package:project_telephony/base/base_style.dart'; import 'package:project_telephony/base/base_style.dart';
import 'package:project_telephony/ui/login/login_page.dart'; import 'package:project_telephony/ui/login/login_page.dart';
import 'package:project_telephony/ui/user/members_page.dart'; import 'package:project_telephony/ui/user/members_page.dart';
@ -26,13 +28,14 @@ class UserPage extends StatefulWidget {
final Telephony telephony = Telephony.instance; final Telephony telephony = Telephony.instance;
@override
void initState() {}
class _UserPageState extends State<UserPage> { class _UserPageState extends State<UserPage> {
bool vle = false; bool vle = false;
bool tooken = true; bool tooken = true;
@override
void initState() {
super.initState();
PowerLogger.start(context, debug: true);
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared name: _fe_analyzer_shared
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "44.0.0" version: "40.0.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.4.0" version: "4.1.0"
archive: archive:
dependency: transitive dependency: transitive
description: description:
@ -161,7 +161,7 @@ packages:
name: code_builder name: code_builder
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.2.0" version: "4.1.0"
collection: collection:
dependency: transitive dependency: transitive
description: description:
@ -238,7 +238,7 @@ packages:
name: device_info_plus name: device_info_plus
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.1" version: "2.2.0"
device_info_plus_linux: device_info_plus_linux:
dependency: transitive dependency: transitive
description: description:
@ -273,7 +273,14 @@ packages:
name: device_info_plus_windows name: device_info_plus_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.1" version: "2.1.1"
dio:
dependency: transitive
description:
name: dio
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.6"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
@ -287,7 +294,7 @@ packages:
name: ffi name: ffi
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1" version: "1.2.1"
file: file:
dependency: transitive dependency: transitive
description: description:
@ -356,13 +363,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.3.0" version: "4.3.0"
flutter_highlight:
dependency: transitive
description:
name: flutter_highlight
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.0"
flutter_lints: flutter_lints:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: flutter_lints name: flutter_lints
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.4" version: "2.0.1"
flutter_native_splash: flutter_native_splash:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -436,6 +450,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.9.2" version: "0.9.2"
highlight:
dependency: transitive
description:
name: highlight
url: "https://pub.dartlang.org"
source: hosted
version: "0.7.0"
hive: hive:
dependency: "direct main" dependency: "direct main"
description: description:
@ -450,6 +471,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
hive_generator:
dependency: "direct dev"
description:
name: hive_generator
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
http: http:
dependency: transitive dependency: transitive
description: description:
@ -513,6 +541,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.6.1" version: "2.6.1"
import_sorter:
dependency: "direct dev"
description:
name: import_sorter
url: "https://pub.dartlang.org"
source: hosted
version: "4.6.0"
intl: intl:
dependency: transitive dependency: transitive
description: description:
@ -554,7 +589,14 @@ packages:
name: lints name: lints
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.1" version: "2.0.0"
logger:
dependency: transitive
description:
name: logger
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
logging: logging:
dependency: transitive dependency: transitive
description: description:
@ -611,6 +653,48 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.2" version: "2.0.2"
package_info_plus:
dependency: transitive
description:
name: package_info_plus
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.2"
package_info_plus_linux:
dependency: transitive
description:
name: package_info_plus_linux
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
package_info_plus_macos:
dependency: transitive
description:
name: package_info_plus_macos
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
package_info_plus_web:
dependency: transitive
description:
name: package_info_plus_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
package_info_plus_windows:
dependency: transitive
description:
name: package_info_plus_windows
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
path: path:
dependency: transitive dependency: transitive
description: description:
@ -666,7 +750,7 @@ packages:
name: path_provider_windows name: path_provider_windows
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.1" version: "2.0.7"
permission_handler: permission_handler:
dependency: "direct main" dependency: "direct main"
description: description:
@ -708,7 +792,7 @@ packages:
name: petitparser name: petitparser
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.0.0" version: "4.4.0"
platform: platform:
dependency: transitive dependency: transitive
description: description:
@ -730,6 +814,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.5.1" version: "1.5.1"
power_logger:
dependency: "direct main"
description:
name: power_logger
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.2"
process: process:
dependency: transitive dependency: transitive
description: description:
@ -931,6 +1022,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.0" version: "1.0.0"
tint:
dependency: transitive
description:
name: tint
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
tobias: tobias:
dependency: "direct main" dependency: "direct main"
description: description:
@ -944,7 +1042,7 @@ packages:
name: typed_data name: typed_data
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.1" version: "1.3.0"
universal_io: universal_io:
dependency: transitive dependency: transitive
description: description:
@ -993,7 +1091,7 @@ packages:
name: win32 name: win32
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.7.0" version: "2.5.2"
xdg_directories: xdg_directories:
dependency: transitive dependency: transitive
description: description:
@ -1007,7 +1105,7 @@ packages:
name: xml name: xml
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.4.1" version: "5.3.1"
yaml: yaml:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -1016,5 +1114,5 @@ packages:
source: hosted source: hosted
version: "3.1.1" version: "3.1.1"
sdks: sdks:
dart: ">=2.17.0 <3.0.0" dart: ">=2.17.0-206.0.dev <3.0.0"
flutter: ">=3.0.0" flutter: ">=2.8.1"

@ -69,7 +69,8 @@ dependencies:
# model生成 # model生成
json_annotation: ^4.6.0 json_annotation: ^4.6.0
permission_handler_platform_interface: ^3.7.0 permission_handler_platform_interface: ^3.7.0
#日志输出
power_logger: ^1.2.2
# # jdk # # jdk
# jverify: ^2.2.5 # jverify: ^2.2.5
## pub 集成 ## pub 集成
@ -85,13 +86,16 @@ dev_dependencies:
# package. See that file for information about deactivating specific lint # package. See that file for information about deactivating specific lint
# rules and activating additional ones. # rules and activating additional ones.
# test: ^1.21.4 # test: ^1.21.4
flutter_lints: ^1.0.0 #导入包整理
import_sorter: ^4.5.1
hive_generator: ^1.1.0
#model自动生成 #model自动生成
json_serializable: ^6.1.3 json_serializable: ^6.1.3
build_runner: ^2.0.2 build_runner: ^2.0.2
yaml: ^3.1.0 yaml: ^3.1.0
pub_semver: ^2.1.0 pub_semver: ^2.1.0
flutter_gen_runner: ^4.1.3 flutter_gen_runner: ^4.1.3
flutter_lints: ^2.0.0
# patgh: ^1.8.1 # patgh: ^1.8.1
#脚本工具 #脚本工具
grinder: ^0.9.1 grinder: ^0.9.1

@ -7,14 +7,13 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
// import 'package:test/test.dart';
import 'package:project_telephony/main.dart'; import 'package:project_telephony/main.dart';
void main() { void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async { testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame. // Build our app and trigger a frame.
await tester.pumpWidget(MyApp()); await tester.pumpWidget(const MyApp());
// Verify that our counter starts at 0. // Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget); expect(find.text('0'), findsOneWidget);

Loading…
Cancel
Save