Sfoglia il codice sorgente

1更新bloc

tags/0.0.9+6
“yanghuaxuan” 3 anni fa
parent
commit
b6484e3e14
8 ha cambiato i file con 14 aggiunte e 18 eliminazioni
  1. +2
    -3
      lib/pages/empty_page/bloc/empty_page_bloc.dart
  2. +2
    -3
      lib/pages/login_page/account/bloc/login_account_bloc.dart
  3. +1
    -4
      lib/pages/login_page/bind/bloc/login_bind_phone_bloc.dart
  4. +2
    -3
      lib/pages/login_page/bloc/login_bloc.dart
  5. +2
    -3
      lib/pages/login_page/invite/bloc/login_invite_bloc.dart
  6. +2
    -1
      lib/pages/login_page/login_page.dart
  7. +1
    -0
      lib/util/net_util.dart
  8. +2
    -1
      pubspec.yaml

+ 2
- 3
lib/pages/empty_page/bloc/empty_page_bloc.dart Vedi File

@@ -7,12 +7,11 @@ import 'empty_page_state.dart';
import 'empty_page_event.dart';

class EmptyPageBloc extends Bloc<EmptyPageEvent, EmptyPageState> {
@override
EmptyPageState get initialState => EmptyPageInitial();


EmptyPageRepository repository;

EmptyPageBloc(this.repository);
EmptyPageBloc(this.repository) : super(EmptyPageInitial());

@override
Stream<EmptyPageState> mapEventToState(


+ 2
- 3
lib/pages/login_page/account/bloc/login_account_bloc.dart Vedi File

@@ -9,10 +9,9 @@ import 'package:fluttertoast/fluttertoast.dart';
class LoginAccountBloc extends Bloc<LoginAccountEvent, LoginAccountState> {
LoginAccountRepository repository;

LoginAccountBloc({@required this.repository});
LoginAccountBloc({@required this.repository}) : super(LoginAccountInitial());


@override
LoginAccountState get initialState => LoginAccountInitial();

@override
Stream<LoginAccountState> mapEventToState(LoginAccountEvent event) async* {


+ 1
- 4
lib/pages/login_page/bind/bloc/login_bind_phone_bloc.dart Vedi File

@@ -8,10 +8,7 @@ import 'package:fluttertoast/fluttertoast.dart';
class LoginBindPhoneBloc extends Bloc<LoginBindPhoneEvent, LoginBindPhoneState> {
LoginBindPhoneRepository repository;

LoginBindPhoneBloc({@required this.repository});

@override
LoginBindPhoneState get initialState => LoginBindPhoneInitial();
LoginBindPhoneBloc({@required this.repository}) : super(LoginBindPhoneInitial());

@override
Stream<LoginBindPhoneState> mapEventToState(LoginBindPhoneEvent event) async* {


+ 2
- 3
lib/pages/login_page/bloc/login_bloc.dart Vedi File

@@ -8,10 +8,9 @@ import 'package:zhiying_comm/util/empty_util.dart';
class LoginBloc extends Bloc<LoginEvent, LoginState> {
LoginRepository repository;

LoginBloc({this.repository});
LoginBloc({this.repository}) : super(InitialLoginState());


@override
LoginState get initialState => InitialLoginState();

@override
Stream<LoginState> mapEventToState(


+ 2
- 3
lib/pages/login_page/invite/bloc/login_invite_bloc.dart Vedi File

@@ -8,10 +8,9 @@ import 'login_invite_repository.dart';
class LoginInviteBloc extends Bloc<LoginInviteEvent, LoginInviteState> {
LoginInviteRepository repostitory;

LoginInviteBloc({@required this.repostitory});
LoginInviteBloc({@required this.repostitory}) : super(LoginInviteInitial());


@override
LoginInviteState get initialState => LoginInviteInitial();

@override
Stream<LoginInviteState> mapEventToState(


+ 2
- 1
lib/pages/login_page/login_page.dart Vedi File

@@ -110,7 +110,7 @@ class _LoginPageContainerState extends State<LoginPageContainer> {
/// 微信登录
Loading.show(context);
SharesdkPlugin.getUserInfo(ShareSDKPlatforms.wechatSession, (SSDKResponseState state, Map userdata, SSDKError error) {
Logger.log('state = ${state?.toString()}, userInfo = ${userdata?.toString()}');
Logger.log('state = ${state?.toString()}, userInfo = ${userdata?.toString()} , error = ${error?.code}');
if (state == SSDKResponseState.Success) {
try {
if (Platform.isIOS) {
@@ -140,6 +140,7 @@ class _LoginPageContainerState extends State<LoginPageContainer> {

Loading.dismiss();
} catch (e) {
Logger.error(e?.toString());
Fluttertoast.showToast(msg: '登录失败');
Loading.dismiss();
}


+ 1
- 0
lib/util/net_util.dart Vedi File

@@ -371,6 +371,7 @@ class NetUtil {
}
// 应用版本号
params["app_version_name"] = packageInfo.version?.toString();
params["AppVersionName"] = packageInfo.version?.toString();
params["app_version"] = packageInfo.buildNumber?.toString();
// 分辨率
params["solution"] = "${window.physicalSize.width.floor()}*${window.physicalSize.height.floor()}";


+ 2
- 1
pubspec.yaml Vedi File

@@ -26,7 +26,8 @@ dependencies:
# 缓存
shared_preferences: ^0.5.10
# bloc
flutter_bloc: ^4.0.1
flutter_bloc: ^5.0.0

# 骨架屏
shimmer: ^1.1.1
webview_flutter: ^1.0.7


Caricamento…
Annulla
Salva