mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
remove iAuth interface
This commit is contained in:
parent
4aa51a933d
commit
f709bb6a6d
@ -57,7 +57,7 @@ class ApplicationWidget extends StatelessWidget {
|
|||||||
value: settingModel,
|
value: settingModel,
|
||||||
builder: (context, _) {
|
builder: (context, _) {
|
||||||
const ratio = 1.73;
|
const ratio = 1.73;
|
||||||
const minWidth = 1000.0;
|
const minWidth = 600.0;
|
||||||
setWindowMinSize(const Size(minWidth, minWidth / ratio));
|
setWindowMinSize(const Size(minWidth, minWidth / ratio));
|
||||||
AppTheme theme = context.select<AppearanceSettingModel, AppTheme>(
|
AppTheme theme = context.select<AppearanceSettingModel, AppTheme>(
|
||||||
(value) => value.theme,
|
(value) => value.theme,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import 'package:app_flowy/user/domain/i_auth.dart';
|
import 'package:app_flowy/user/infrastructure/repos/auth_repo.dart';
|
||||||
import 'package:dartz/dartz.dart';
|
import 'package:dartz/dartz.dart';
|
||||||
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
|
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
|
||||||
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile, ErrorCode;
|
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile, ErrorCode;
|
||||||
@ -8,8 +8,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
|||||||
part 'sign_in_bloc.freezed.dart';
|
part 'sign_in_bloc.freezed.dart';
|
||||||
|
|
||||||
class SignInBloc extends Bloc<SignInEvent, SignInState> {
|
class SignInBloc extends Bloc<SignInEvent, SignInState> {
|
||||||
final IAuth authManager;
|
final AuthRepository authRepo;
|
||||||
SignInBloc(this.authManager) : super(SignInState.initial()) {
|
SignInBloc(this.authRepo) : super(SignInState.initial()) {
|
||||||
on<SignInEvent>((event, emit) async {
|
on<SignInEvent>((event, emit) async {
|
||||||
await event.map(
|
await event.map(
|
||||||
signedInWithUserEmailAndPassword: (e) async {
|
signedInWithUserEmailAndPassword: (e) async {
|
||||||
@ -31,7 +31,10 @@ class SignInBloc extends Bloc<SignInEvent, SignInState> {
|
|||||||
Future<void> _performActionOnSignIn(SignInState state, Emitter<SignInState> emit) async {
|
Future<void> _performActionOnSignIn(SignInState state, Emitter<SignInState> emit) async {
|
||||||
emit(state.copyWith(isSubmitting: true, emailError: none(), passwordError: none(), successOrFail: none()));
|
emit(state.copyWith(isSubmitting: true, emailError: none(), passwordError: none(), successOrFail: none()));
|
||||||
|
|
||||||
final result = await authManager.signIn(state.email, state.password);
|
final result = await authRepo.signIn(
|
||||||
|
email: state.email,
|
||||||
|
password: state.password,
|
||||||
|
);
|
||||||
emit(result.fold(
|
emit(result.fold(
|
||||||
(userProfile) => state.copyWith(isSubmitting: false, successOrFail: some(left(userProfile))),
|
(userProfile) => state.copyWith(isSubmitting: false, successOrFail: some(left(userProfile))),
|
||||||
(error) => stateFromCode(error),
|
(error) => stateFromCode(error),
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import 'package:app_flowy/user/domain/i_auth.dart';
|
import 'package:app_flowy/user/infrastructure/repos/auth_repo.dart';
|
||||||
import 'package:dartz/dartz.dart';
|
import 'package:dartz/dartz.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile, ErrorCode;
|
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile, ErrorCode;
|
||||||
@ -10,8 +10,8 @@ import 'package:app_flowy/generated/locale_keys.g.dart';
|
|||||||
part 'sign_up_bloc.freezed.dart';
|
part 'sign_up_bloc.freezed.dart';
|
||||||
|
|
||||||
class SignUpBloc extends Bloc<SignUpEvent, SignUpState> {
|
class SignUpBloc extends Bloc<SignUpEvent, SignUpState> {
|
||||||
final IAuth authManager;
|
final AuthRepository autoRepo;
|
||||||
SignUpBloc(this.authManager) : super(SignUpState.initial()) {
|
SignUpBloc(this.autoRepo) : super(SignUpState.initial()) {
|
||||||
on<SignUpEvent>((event, emit) async {
|
on<SignUpEvent>((event, emit) async {
|
||||||
await event.map(signUpWithUserEmailAndPassword: (e) async {
|
await event.map(signUpWithUserEmailAndPassword: (e) async {
|
||||||
await _performActionOnSignUp(emit);
|
await _performActionOnSignUp(emit);
|
||||||
@ -62,7 +62,11 @@ class SignUpBloc extends Bloc<SignUpEvent, SignUpState> {
|
|||||||
repeatPasswordError: none(),
|
repeatPasswordError: none(),
|
||||||
));
|
));
|
||||||
|
|
||||||
final result = await authManager.signUp(state.email, state.password, state.email);
|
final result = await autoRepo.signUp(
|
||||||
|
name: state.email,
|
||||||
|
password: state.password,
|
||||||
|
email: state.email,
|
||||||
|
);
|
||||||
emit(result.fold(
|
emit(result.fold(
|
||||||
(profile) => state.copyWith(
|
(profile) => state.copyWith(
|
||||||
isSubmitting: false,
|
isSubmitting: false,
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
import 'package:dartz/dartz.dart';
|
|
||||||
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
|
|
||||||
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
|
|
||||||
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
|
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class NewUser {
|
class NewUser {
|
||||||
UserProfile profile;
|
UserProfile profile;
|
||||||
@ -12,16 +8,3 @@ class NewUser {
|
|||||||
required this.workspaceId,
|
required this.workspaceId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class IAuth {
|
|
||||||
Future<Either<UserProfile, FlowyError>> signIn(String? email, String? password);
|
|
||||||
Future<Either<UserProfile, FlowyError>> signUp(String? name, String? password, String? email);
|
|
||||||
Future<Either<Unit, FlowyError>> signOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class IAuthRouter {
|
|
||||||
void pushWelcomeScreen(BuildContext context, UserProfile userProfile);
|
|
||||||
void pushSignUpScreen(BuildContext context);
|
|
||||||
void pushForgetPasswordScreen(BuildContext context);
|
|
||||||
void pushHomeScreen(BuildContext context, UserProfile profile, CurrentWorkspaceSetting workspaceSetting);
|
|
||||||
}
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import 'package:app_flowy/user/application/sign_in_bloc.dart';
|
import 'package:app_flowy/user/application/sign_in_bloc.dart';
|
||||||
import 'package:app_flowy/user/application/sign_up_bloc.dart';
|
import 'package:app_flowy/user/application/sign_up_bloc.dart';
|
||||||
import 'package:app_flowy/user/application/splash_bloc.dart';
|
import 'package:app_flowy/user/application/splash_bloc.dart';
|
||||||
import 'package:app_flowy/user/domain/i_auth.dart';
|
|
||||||
import 'package:app_flowy/user/domain/i_splash.dart';
|
import 'package:app_flowy/user/domain/i_splash.dart';
|
||||||
import 'package:app_flowy/user/infrastructure/repos/auth_repo.dart';
|
import 'package:app_flowy/user/infrastructure/repos/auth_repo.dart';
|
||||||
import 'package:app_flowy/user/infrastructure/i_auth_impl.dart';
|
import 'package:app_flowy/user/infrastructure/i_auth_impl.dart';
|
||||||
@ -20,12 +19,11 @@ class UserDepsResolver {
|
|||||||
getIt.registerFactory<AuthRepository>(() => AuthRepository());
|
getIt.registerFactory<AuthRepository>(() => AuthRepository());
|
||||||
|
|
||||||
//Interface implementation
|
//Interface implementation
|
||||||
getIt.registerFactory<IAuth>(() => AuthImpl(repo: getIt<AuthRepository>()));
|
getIt.registerFactory<AuthRouter>(() => AuthRouter());
|
||||||
getIt.registerFactory<IAuthRouter>(() => AuthRouterImpl());
|
|
||||||
|
|
||||||
//Bloc
|
//Bloc
|
||||||
getIt.registerFactory<SignInBloc>(() => SignInBloc(getIt<IAuth>()));
|
getIt.registerFactory<SignInBloc>(() => SignInBloc(getIt<AuthRepository>()));
|
||||||
getIt.registerFactory<SignUpBloc>(() => SignUpBloc(getIt<IAuth>()));
|
getIt.registerFactory<SignUpBloc>(() => SignUpBloc(getIt<AuthRepository>()));
|
||||||
|
|
||||||
getIt.registerFactory<ISplashUser>(() => SplashUserImpl());
|
getIt.registerFactory<ISplashUser>(() => SplashUserImpl());
|
||||||
getIt.registerFactory<ISplashRoute>(() => SplashRoute());
|
getIt.registerFactory<ISplashRoute>(() => SplashRoute());
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import 'package:app_flowy/startup/startup.dart';
|
import 'package:app_flowy/startup/startup.dart';
|
||||||
import 'package:app_flowy/user/domain/auth_state.dart';
|
import 'package:app_flowy/user/domain/auth_state.dart';
|
||||||
import 'package:app_flowy/user/domain/i_auth.dart';
|
|
||||||
import 'package:app_flowy/user/domain/i_splash.dart';
|
import 'package:app_flowy/user/domain/i_splash.dart';
|
||||||
|
import 'package:app_flowy/user/infrastructure/router.dart';
|
||||||
|
import 'package:app_flowy/user/infrastructure/repos/auth_repo.dart';
|
||||||
import 'package:app_flowy/user/presentation/sign_in_screen.dart';
|
import 'package:app_flowy/user/presentation/sign_in_screen.dart';
|
||||||
import 'package:app_flowy/user/presentation/skip_log_in_screen.dart';
|
import 'package:app_flowy/user/presentation/skip_log_in_screen.dart';
|
||||||
import 'package:app_flowy/user/presentation/welcome_screen.dart';
|
import 'package:app_flowy/user/presentation/welcome_screen.dart';
|
||||||
@ -59,7 +60,7 @@ class SplashRoute implements ISplashRoute {
|
|||||||
void pushSignInScreen(BuildContext context) {
|
void pushSignInScreen(BuildContext context) {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
PageRoutes.fade(() => SignInScreen(router: getIt<IAuthRouter>()), RouteDurations.slow.inMilliseconds * .001),
|
PageRoutes.fade(() => SignInScreen(router: getIt<AuthRouter>()), RouteDurations.slow.inMilliseconds * .001),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,8 +70,8 @@ class SplashRoute implements ISplashRoute {
|
|||||||
context,
|
context,
|
||||||
PageRoutes.fade(
|
PageRoutes.fade(
|
||||||
() => SkipLogInScreen(
|
() => SkipLogInScreen(
|
||||||
router: getIt<IAuthRouter>(),
|
router: getIt<AuthRouter>(),
|
||||||
authManager: getIt<IAuth>(),
|
authRepo: getIt<AuthRepository>(),
|
||||||
),
|
),
|
||||||
RouteDurations.slow.inMilliseconds * .001),
|
RouteDurations.slow.inMilliseconds * .001),
|
||||||
);
|
);
|
||||||
|
@ -2,59 +2,30 @@ import 'package:app_flowy/startup/startup.dart';
|
|||||||
import 'package:app_flowy/user/domain/i_splash.dart';
|
import 'package:app_flowy/user/domain/i_splash.dart';
|
||||||
import 'package:app_flowy/user/presentation/sign_up_screen.dart';
|
import 'package:app_flowy/user/presentation/sign_up_screen.dart';
|
||||||
import 'package:app_flowy/workspace/presentation/home/home_screen.dart';
|
import 'package:app_flowy/workspace/presentation/home/home_screen.dart';
|
||||||
import 'package:dartz/dartz.dart';
|
|
||||||
import 'package:flowy_infra/time/duration.dart';
|
import 'package:flowy_infra/time/duration.dart';
|
||||||
import 'package:flowy_infra_ui/widget/route/animation.dart';
|
import 'package:flowy_infra_ui/widget/route/animation.dart';
|
||||||
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
|
import 'package:flowy_sdk/protobuf/flowy-user-data-model/protobuf.dart' show UserProfile;
|
||||||
import 'package:app_flowy/user/domain/i_auth.dart';
|
|
||||||
import 'package:app_flowy/user/infrastructure/repos/auth_repo.dart';
|
|
||||||
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
|
|
||||||
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
|
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/protobuf.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class AuthImpl extends IAuth {
|
class AuthRouter {
|
||||||
AuthRepository repo;
|
|
||||||
AuthImpl({
|
|
||||||
required this.repo,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<Either<UserProfile, FlowyError>> signIn(String? email, String? password) {
|
|
||||||
return repo.signIn(email: email, password: password);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<Either<UserProfile, FlowyError>> signUp(String? name, String? password, String? email) {
|
|
||||||
return repo.signUp(name: name, password: password, email: email);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Future<Either<Unit, FlowyError>> signOut() {
|
|
||||||
return repo.signOut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class AuthRouterImpl extends IAuthRouter {
|
|
||||||
@override
|
@override
|
||||||
void pushForgetPasswordScreen(BuildContext context) {
|
void pushForgetPasswordScreen(BuildContext context) {
|
||||||
// TODO: implement showForgetPasswordScreen
|
// TODO: implement showForgetPasswordScreen
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
void pushWelcomeScreen(BuildContext context, UserProfile userProfile) {
|
void pushWelcomeScreen(BuildContext context, UserProfile userProfile) {
|
||||||
getIt<ISplashRoute>().pushWelcomeScreen(context, userProfile);
|
getIt<ISplashRoute>().pushWelcomeScreen(context, userProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
void pushSignUpScreen(BuildContext context) {
|
void pushSignUpScreen(BuildContext context) {
|
||||||
Navigator.of(context).push(
|
Navigator.of(context).push(
|
||||||
PageRoutes.fade(
|
PageRoutes.fade(
|
||||||
() => SignUpScreen(router: getIt<IAuthRouter>()),
|
() => SignUpScreen(router: getIt<AuthRouter>()),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
void pushHomeScreen(BuildContext context, UserProfile profile, CurrentWorkspaceSetting workspaceSetting) {
|
void pushHomeScreen(BuildContext context, UserProfile profile, CurrentWorkspaceSetting workspaceSetting) {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
@ -1,6 +1,6 @@
|
|||||||
import 'package:app_flowy/startup/startup.dart';
|
import 'package:app_flowy/startup/startup.dart';
|
||||||
import 'package:app_flowy/user/application/sign_in_bloc.dart';
|
import 'package:app_flowy/user/application/sign_in_bloc.dart';
|
||||||
import 'package:app_flowy/user/domain/i_auth.dart';
|
import 'package:app_flowy/user/infrastructure/router.dart';
|
||||||
import 'package:app_flowy/user/presentation/widgets/background.dart';
|
import 'package:app_flowy/user/presentation/widgets/background.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra/size.dart';
|
import 'package:flowy_infra/size.dart';
|
||||||
@ -18,7 +18,7 @@ import 'package:flowy_infra/image.dart';
|
|||||||
import 'package:app_flowy/generated/locale_keys.g.dart';
|
import 'package:app_flowy/generated/locale_keys.g.dart';
|
||||||
|
|
||||||
class SignInScreen extends StatelessWidget {
|
class SignInScreen extends StatelessWidget {
|
||||||
final IAuthRouter router;
|
final AuthRouter router;
|
||||||
const SignInScreen({Key? key, required this.router}) : super(key: key);
|
const SignInScreen({Key? key, required this.router}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -48,7 +48,7 @@ class SignInScreen extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class SignInForm extends StatelessWidget {
|
class SignInForm extends StatelessWidget {
|
||||||
final IAuthRouter router;
|
final AuthRouter router;
|
||||||
const SignInForm({
|
const SignInForm({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.router,
|
required this.router,
|
||||||
@ -88,7 +88,7 @@ class SignUpPrompt extends StatelessWidget {
|
|||||||
required this.router,
|
required this.router,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
final IAuthRouter router;
|
final AuthRouter router;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -138,7 +138,7 @@ class ForgetPasswordButton extends StatelessWidget {
|
|||||||
required this.router,
|
required this.router,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
final IAuthRouter router;
|
final AuthRouter router;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import 'package:app_flowy/user/domain/i_auth.dart';
|
import 'package:app_flowy/user/infrastructure/i_auth_impl.dart';
|
||||||
|
import 'package:app_flowy/user/infrastructure/repos/auth_repo.dart';
|
||||||
import 'package:app_flowy/user/presentation/widgets/background.dart';
|
import 'package:app_flowy/user/presentation/widgets/background.dart';
|
||||||
import 'package:app_flowy/workspace/domain/i_user.dart';
|
import 'package:app_flowy/workspace/domain/i_user.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
@ -18,13 +19,13 @@ import 'package:dartz/dartz.dart' as dartz;
|
|||||||
import 'package:app_flowy/generated/locale_keys.g.dart';
|
import 'package:app_flowy/generated/locale_keys.g.dart';
|
||||||
|
|
||||||
class SkipLogInScreen extends StatefulWidget {
|
class SkipLogInScreen extends StatefulWidget {
|
||||||
final IAuthRouter router;
|
final AuthRouter router;
|
||||||
final IAuth authManager;
|
final AuthRepository authRepo;
|
||||||
|
|
||||||
const SkipLogInScreen({
|
const SkipLogInScreen({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.router,
|
required this.router,
|
||||||
required this.authManager,
|
required this.authRepo,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -97,7 +98,11 @@ class _SkipLogInScreenState extends State<SkipLogInScreen> {
|
|||||||
const password = "AppFlowy123@";
|
const password = "AppFlowy123@";
|
||||||
final uid = uuid();
|
final uid = uuid();
|
||||||
final userEmail = "$uid@appflowy.io";
|
final userEmail = "$uid@appflowy.io";
|
||||||
final result = await widget.authManager.signUp(LocaleKeys.defaultUsername.tr(), password, userEmail);
|
final result = await widget.authRepo.signUp(
|
||||||
|
name: LocaleKeys.defaultUsername.tr(),
|
||||||
|
password: password,
|
||||||
|
email: userEmail,
|
||||||
|
);
|
||||||
result.fold(
|
result.fold(
|
||||||
(user) {
|
(user) {
|
||||||
FolderEventReadCurWorkspace().send().then((result) {
|
FolderEventReadCurWorkspace().send().then((result) {
|
||||||
|
@ -179,7 +179,7 @@ class DocumentShareButton extends StatelessWidget {
|
|||||||
child: Selector<AppearanceSettingModel, AppLanguage>(
|
child: Selector<AppearanceSettingModel, AppLanguage>(
|
||||||
selector: (ctx, notifier) => notifier.language,
|
selector: (ctx, notifier) => notifier.language,
|
||||||
builder: (ctx, _, child) => ConstrainedBox(
|
builder: (ctx, _, child) => ConstrainedBox(
|
||||||
constraints: BoxConstraints.expand(
|
constraints: const BoxConstraints.expand(
|
||||||
height: 30,
|
height: 30,
|
||||||
// minWidth: buttonWidth,
|
// minWidth: buttonWidth,
|
||||||
width: 100,
|
width: 100,
|
||||||
|
@ -6,6 +6,7 @@ import FlutterMacOS
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import connectivity_plus_macos
|
import connectivity_plus_macos
|
||||||
|
import desktop_window
|
||||||
import device_info_plus_macos
|
import device_info_plus_macos
|
||||||
import flowy_infra_ui
|
import flowy_infra_ui
|
||||||
import flowy_sdk
|
import flowy_sdk
|
||||||
@ -17,6 +18,7 @@ import window_size
|
|||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
|
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
|
||||||
|
DesktopWindowPlugin.register(with: registry.registrar(forPlugin: "DesktopWindowPlugin"))
|
||||||
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
|
||||||
FlowyInfraUIPlugin.register(with: registry.registrar(forPlugin: "FlowyInfraUIPlugin"))
|
FlowyInfraUIPlugin.register(with: registry.registrar(forPlugin: "FlowyInfraUIPlugin"))
|
||||||
FlowySdkPlugin.register(with: registry.registrar(forPlugin: "FlowySdkPlugin"))
|
FlowySdkPlugin.register(with: registry.registrar(forPlugin: "FlowySdkPlugin"))
|
||||||
|
@ -260,6 +260,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.8"
|
version: "0.6.8"
|
||||||
|
desktop_window:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: desktop_window
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.4.0"
|
||||||
device_info_plus:
|
device_info_plus:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -58,6 +58,7 @@ dependencies:
|
|||||||
url: git://github.com/google/flutter-desktop-embedding.git
|
url: git://github.com/google/flutter-desktop-embedding.git
|
||||||
path: plugins/window_size
|
path: plugins/window_size
|
||||||
ref: e48abe7c3e9ebfe0b81622167c5201d4e783bb81
|
ref: e48abe7c3e9ebfe0b81622167c5201d4e783bb81
|
||||||
|
desktop_window: ^0.4.0
|
||||||
sized_context: ^1.0.0+1
|
sized_context: ^1.0.0+1
|
||||||
styled_widget: "^0.3.1"
|
styled_widget: "^0.3.1"
|
||||||
expandable: ^5.0.1
|
expandable: ^5.0.1
|
||||||
|
@ -40,7 +40,6 @@ pub extern "C" fn async_event(port: i64, input: *const u8, len: usize) {
|
|||||||
let dispatcher = match FLOWY_SDK.get() {
|
let dispatcher = match FLOWY_SDK.get() {
|
||||||
None => {
|
None => {
|
||||||
log::error!("sdk not init yet.");
|
log::error!("sdk not init yet.");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Some(e) => e.dispatcher.clone(),
|
Some(e) => e.dispatcher.clone(),
|
||||||
@ -59,7 +58,6 @@ pub extern "C" fn sync_event(input: *const u8, len: usize) -> *const u8 {
|
|||||||
let dispatcher = match FLOWY_SDK.get() {
|
let dispatcher = match FLOWY_SDK.get() {
|
||||||
None => {
|
None => {
|
||||||
log::error!("sdk not init yet.");
|
log::error!("sdk not init yet.");
|
||||||
|
|
||||||
return forget_rust(Vec::default());
|
return forget_rust(Vec::default());
|
||||||
}
|
}
|
||||||
Some(e) => e.dispatcher.clone(),
|
Some(e) => e.dispatcher.clone(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user