张萌 3 years ago
commit 4b4ee23347

@ -2,17 +2,15 @@
// Project imports:
import 'package:aku_new_community_manager/provider/app_provider.dart';
import 'package:aku_new_community_manager/provider/clock_timer_provider.dart';
import 'package:aku_new_community_manager/provider/data_provider.dart';
import 'package:aku_new_community_manager/provider/message_provider.dart';
import 'package:aku_new_community_manager/provider/timer_provider.dart';
import 'package:aku_new_community_manager/provider/user_provider.dart';
import 'package:aku_new_community_manager/style/apptheme.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/splash/splash_page.dart';
import 'package:aku_new_community_manager/utils/dev_util.dart';
import 'package:aku_new_community_manager/utils/jpush_message_parse.dart';
import 'package:aku_new_community_manager/utils/websocket/fier_dialog.dart';
import 'package:aku_new_community_manager/utils/websocket/web_socket_util.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';

@ -1,5 +1,4 @@
import 'package:aku_new_community_manager/new_ui/auth/sign_func.dart';
import 'package:aku_new_community_manager/provider/clock_timer_provider.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:bot_toast/bot_toast.dart';
@ -10,6 +9,8 @@ import 'package:provider/provider.dart';
import 'package:sms_autofill/sms_autofill.dart';
import 'package:velocity_x/velocity_x.dart';
import '../../provider/timer_provider.dart';
class CodeMessagePage extends StatefulWidget {
final String tel;

@ -1,7 +1,6 @@
import 'package:aku_new_community_manager/new_ui/auth/sign_func.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/login_button_widget.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/tel_textfield.dart';
import 'package:aku_new_community_manager/provider/clock_timer_provider.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:bot_toast/bot_toast.dart';
@ -12,6 +11,7 @@ import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
import '../../provider/timer_provider.dart';
import 'forgot_set_psd_page.dart';
class ForgotPsdPage extends StatefulWidget {

@ -3,7 +3,6 @@ import 'package:aku_new_community_manager/new_ui/auth/psd_verify.dart';
import 'package:aku_new_community_manager/new_ui/auth/sign_func.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/login_button_widget.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/psd_textfield.dart';
import 'package:aku_new_community_manager/provider/clock_timer_provider.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:bot_toast/bot_toast.dart';
@ -14,6 +13,8 @@ import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
import '../../provider/timer_provider.dart';
class ForgotSetPsdPage extends StatefulWidget {
final String tel;
@ -132,7 +133,7 @@ class _ForgotSetPsdPageState extends State<ForgotSetPsdPage> {
Get.to(() => ForgotSetPsdPage(
tel: widget.tel,
));
UserTool.appProvider.startTimer();
clockTimer.startTimer();
} else {
BotToast.showText(text: base.msg);
}

@ -3,7 +3,7 @@ import 'package:aku_new_community_manager/new_ui/auth/widget/login_button_widget
import 'package:aku_new_community_manager/new_ui/auth/widget/psd_textfield.dart';
import 'package:aku_new_community_manager/new_ui/auth/widget/tel_textfield.dart';
import 'package:aku_new_community_manager/provider/app_provider.dart';
import 'package:aku_new_community_manager/provider/clock_timer_provider.dart';
import 'package:aku_new_community_manager/provider/timer_provider.dart';
import 'package:aku_new_community_manager/tools/user_tool.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:bot_toast/bot_toast.dart';

@ -149,7 +149,7 @@ class AppProvider extends ChangeNotifier {
}
///
int second = 60;
/*int second = 60;
bool timerStart = false;
Timer? timer;
@ -171,5 +171,6 @@ class AppProvider extends ChangeNotifier {
timer?.cancel();
timer = null;
notifyListeners();
}
}*/
notifyListeners();
}

@ -0,0 +1,30 @@
import 'dart:async';
import 'package:flutter/material.dart';
class ClockTimerProvider extends ChangeNotifier{
///
int second = 60;
bool timerStart = false;
Timer? timer;
void startTimer() {
timerStart = true;
timer = Timer.periodic(Duration(seconds: 1), (timer) {
if (second > 0) {
second--;
notifyListeners();
} else {
stopTimer();
}
});
}
void stopTimer() {
second = 60;
timerStart = false;
timer?.cancel();
timer = null;
notifyListeners();
}
}

@ -3,6 +3,7 @@
import 'package:aku_new_community_manager/provider/app_provider.dart';
import 'package:aku_new_community_manager/provider/data_provider.dart';
import 'package:aku_new_community_manager/provider/message_provider.dart';
import 'package:aku_new_community_manager/provider/timer_provider.dart';
import 'package:aku_new_community_manager/provider/user_provider.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
@ -25,5 +26,9 @@ class UserTool {
static DataProvider get dataProvider =>
Provider.of<DataProvider>(Get.context!, listen: false);
///
static ClockTimerProvider get clockProvider =>
Provider.of<ClockTimerProvider>(Get.context!, listen: false);
UserTool();
}

@ -25,7 +25,10 @@ class BeePickerBox extends StatelessWidget {
// height: 48.w,
child: TextButton(
onPressed: onPressed,
child: Text(title,style: TextStyle(color: Colors.black.withOpacity(0.85)),),
child: Text(
title,
style: TextStyle(color: Colors.black.withOpacity(0.85)),
),
),
);
}
@ -41,26 +44,42 @@ class BeePickerBox extends StatelessWidget {
children: [
SizedBox(
height: 88.w,
child: NavigationToolbar(
leading: TextButton(
onPressed: () => Navigator.pop(context),
child: Text(
'取消',
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
TextButton(
onPressed: () => Navigator.pop(context),
child: Text(
'取消',
style: TextStyle(
color: Colors.black,
fontSize: 28.sp,
),
),
),
),
middle: Text(
title ?? '',
style: TextStyle(
color: kTextPrimaryColor,
fontSize: 28.sp,
Spacer(),
Container(
padding: EdgeInsets.all(25.w),
child: Text(
title ?? '',
style: TextStyle(
color: kTextPrimaryColor,
fontSize: 28.sp,
),
),
),
),
trailing: TextButton(
onPressed: onPressed,
child: Text(
'${confirmString}',
Spacer(),
TextButton(
onPressed: onPressed,
child: Text(
'${confirmString}',
style: TextStyle(
color: Colors.black,
fontSize: 28.sp,
),
),
),
),
],
),
),
BeeDivider.horizontal(),

@ -7,7 +7,7 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "38.0.0"
version: "40.0.0"
amap_flutter_base:
dependency: "direct main"
description:
@ -35,14 +35,14 @@ packages:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "3.4.1"
version: "4.1.0"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "2.3.1"
async:
dependency: transitive
description:
@ -77,14 +77,14 @@ packages:
name: bot_toast
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.1"
version: "4.0.2"
build:
dependency: transitive
description:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
version: "2.3.0"
build_config:
dependency: transitive
description:
@ -98,21 +98,21 @@ packages:
name: build_daemon
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.1.0"
build_resolvers:
dependency: transitive
description:
name: build_resolvers
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.6"
version: "2.0.8"
build_runner:
dependency: "direct dev"
description:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.8"
version: "2.1.11"
build_runner_core:
dependency: transitive
description:
@ -133,14 +133,14 @@ packages:
name: built_value
url: "https://pub.dartlang.org"
source: hosted
version: "8.1.4"
version: "8.3.2"
carousel_slider:
dependency: "direct main"
description:
name: carousel_slider
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
version: "4.1.1"
characters:
dependency: transitive
description:
@ -217,14 +217,14 @@ packages:
name: cross_file
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.2"
version: "0.3.3+1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.0.2"
cupertino_icons:
dependency: "direct main"
description:
@ -238,21 +238,21 @@ packages:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.2"
version: "2.2.3"
dartx:
dependency: transitive
description:
name: dartx
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.1.0"
decimal:
dependency: transitive
description:
name: decimal
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.2.0"
device_info_plus:
dependency: transitive
description:
@ -273,7 +273,7 @@ packages:
name: device_info_plus_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.2"
version: "2.2.3"
device_info_plus_platform_interface:
dependency: transitive
description:
@ -357,7 +357,7 @@ packages:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
version: "1.2.1"
file:
dependency: transitive
description:
@ -371,7 +371,7 @@ packages:
name: fixnum
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.0.1"
flutter:
dependency: "direct main"
description: flutter
@ -390,7 +390,7 @@ packages:
name: flutter_gen_core
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.6"
version: "4.2.0"
flutter_gen_runner:
dependency: "direct dev"
description:
@ -416,14 +416,14 @@ packages:
name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "2.0.6"
flutter_rating_bar:
dependency: "direct main"
description:
name: flutter_rating_bar
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
version: "4.0.1"
flutter_screenutil:
dependency: "direct main"
description:
@ -447,14 +447,14 @@ packages:
name: frontend_server_client
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
version: "2.1.3"
get:
dependency: "direct main"
description:
name: get
url: "https://pub.dartlang.org"
source: hosted
version: "4.6.1"
version: "4.6.5"
glob:
dependency: transitive
description:
@ -489,7 +489,7 @@ packages:
name: hive
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.2.1"
hive_flutter:
dependency: "direct main"
description:
@ -503,7 +503,7 @@ packages:
name: hive_generator
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
version: "1.1.3"
http:
dependency: transitive
description:
@ -524,7 +524,7 @@ packages:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
version: "4.0.1"
image_picker:
dependency: "direct main"
description:
@ -538,14 +538,14 @@ packages:
name: image_picker_for_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.6"
version: "2.1.8"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.4"
version: "2.5.0"
import_sorter:
dependency: "direct dev"
description:
@ -589,14 +589,14 @@ packages:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "4.4.0"
version: "4.5.0"
json_serializable:
dependency: "direct dev"
description:
name: json_serializable
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.5"
version: "6.2.0"
logger:
dependency: "direct main"
description:
@ -631,7 +631,7 @@ packages:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "1.0.2"
nested:
dependency: transitive
description:
@ -722,7 +722,7 @@ packages:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.9"
version: "2.0.10"
path_provider_android:
dependency: transitive
description:
@ -736,35 +736,35 @@ packages:
name: path_provider_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
version: "2.0.9"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.5"
version: "2.1.6"
path_provider_macos:
dependency: transitive
description:
name: path_provider_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "2.0.6"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
version: "2.0.4"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "2.0.6"
permission_handler:
dependency: "direct main"
description:
@ -902,14 +902,14 @@ packages:
name: source_gen
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
version: "1.2.2"
source_helper:
dependency: transitive
description:
name: source_helper
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
version: "1.3.2"
source_span:
dependency: transitive
description:
@ -993,35 +993,35 @@ packages:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.20"
version: "6.1.2"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.15"
version: "6.0.17"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.15"
version: "6.0.17"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "3.0.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "3.0.1"
url_launcher_platform_interface:
dependency: transitive
description:
@ -1042,7 +1042,7 @@ packages:
name: url_launcher_windows
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "3.0.1"
vector_math:
dependency: transitive
description:
@ -1063,7 +1063,7 @@ packages:
name: vxstate
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.2.0"
watcher:
dependency: transitive
description:
@ -1084,14 +1084,14 @@ packages:
name: web_socket_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.2.0"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.1"
version: "2.5.2"
xdg_directories:
dependency: transitive
description:
@ -1112,7 +1112,7 @@ packages:
name: yaml
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
version: "3.1.1"
sdks:
dart: ">=2.15.0 <3.0.0"
flutter: ">=2.8.0"

@ -52,7 +52,7 @@ dependencies:
amap_flutter_base: ^3.0.0
permission_handler: ^6.1.1
velocity_x: ^3.4.0
velocity_x: 3.4.0
dotted_border: ^2.0.0-nullsafety.0
dio: ^4.0.0
# #谷歌崩溃分析

Loading…
Cancel
Save