diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index a19bda2d..f758d4b5 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2.8.0 with: - flutter-version: '3.13.6' + flutter-version: '3.13.9' - uses: ruby/setup-ruby@v1 with: ruby-version: '3.1.2' @@ -60,7 +60,7 @@ jobs: java-version: '11.x' - uses: subosito/flutter-action@v2.8.0 with: - flutter-version: '3.13.6' + flutter-version: '3.13.9' - uses: ruby/setup-ruby@v1 with: ruby-version: '3.1.2' diff --git a/.github/workflows/ios_cicd.yml b/.github/workflows/ios_cicd.yml index 33c65486..b87f2e60 100644 --- a/.github/workflows/ios_cicd.yml +++ b/.github/workflows/ios_cicd.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2.8.0 with: - flutter-version: '3.13.3' + flutter-version: '3.13.6' - uses: ruby/setup-ruby@v1 with: ruby-version: '3.1.2' diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 20e906a2..47df3465 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -355,14 +355,14 @@ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( 06D908F3BF919B7EE15A8705 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 9740EEB61CF901F6004384FC /* Run Script */, 97C146EC1CF9000F007C117D /* Resources */, - AEE2471C28CF82200092F192 /* Embed App Extensions */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 242C769F86A7805781E3C954 /* [CP] Embed Pods Frameworks */, + AEE2471C28CF82200092F192 /* Embed App Extensions */, ); buildRules = ( ); @@ -384,7 +384,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1340; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { 0F872E3A28D875E3002954CC = { @@ -609,9 +609,11 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 18; - DEVELOPMENT_TEAM = T583WJWNAK; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = T583WJWNAK; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Extension/Info.plist; @@ -629,6 +631,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.mr.acProjectApp.Extension; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.mr.acProjectApp.Extension"; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_EMIT_LOC_STRINGS = YES; @@ -648,9 +651,11 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 18; - DEVELOPMENT_TEAM = T583WJWNAK; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = T583WJWNAK; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Extension/Info.plist; @@ -667,6 +672,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.mr.acProjectApp.Extension; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.mr.acProjectApp.Extension"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -684,9 +690,11 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = Extension/Extension.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 18; - DEVELOPMENT_TEAM = T583WJWNAK; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = T583WJWNAK; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Extension/Info.plist; @@ -703,6 +711,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.mr.acProjectApp.Extension; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.mr.acProjectApp.Extension"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -771,9 +780,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 18; - DEVELOPMENT_TEAM = T583WJWNAK; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = T583WJWNAK; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -784,6 +795,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.mr.acProjectApp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.mr.acProjectApp"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; @@ -914,9 +926,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 18; - DEVELOPMENT_TEAM = T583WJWNAK; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = T583WJWNAK; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -927,6 +941,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.mr.acProjectApp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.mr.acProjectApp"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; @@ -947,9 +962,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - CODE_SIGN_STYLE = Automatic; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; + CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 18; - DEVELOPMENT_TEAM = T583WJWNAK; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = T583WJWNAK; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 15.0; @@ -960,6 +977,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.mr.acProjectApp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.mr.acProjectApp"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; diff --git a/lib/cubits/folders/get_my_folders_cubit.dart b/lib/cubits/folders/get_my_folders_cubit.dart index c3628e42..d1c5f84d 100644 --- a/lib/cubits/folders/get_my_folders_cubit.dart +++ b/lib/cubits/folders/get_my_folders_cubit.dart @@ -24,8 +24,7 @@ class GetFoldersCubit extends Cubit { try { emit(FolderLoadingState()); - final result = await folderApi.getMyFolders(); - result.when( + (await folderApi.getMyFolders()).when( success: (list) { folders = list; emit(FolderLoadedState(folders)); @@ -41,8 +40,7 @@ class GetFoldersCubit extends Cubit { try { emit(FolderLoadingState()); - final result = await folderApi.getMyFoldersWithoutUnclassified(); - result.when( + (await folderApi.getMyFoldersWithoutUnclassified()).when( success: (list) { folders = list; emit(FolderLoadedState(folders)); @@ -78,7 +76,6 @@ class GetFoldersCubit extends Cubit { void filter(String name) { if (name.isEmpty) { emit(FolderLoadedState(folders)); - return; } else { final filtered = []; diff --git a/lib/cubits/login/auto_login_cubit.dart b/lib/cubits/login/auto_login_cubit.dart new file mode 100644 index 00000000..0424e61d --- /dev/null +++ b/lib/cubits/login/auto_login_cubit.dart @@ -0,0 +1,29 @@ +import 'package:ac_project_app/cubits/login/login_user_state.dart'; +import 'package:ac_project_app/di/set_up_get_it.dart'; +import 'package:ac_project_app/provider/api/user/user_api.dart'; +import 'package:ac_project_app/provider/share_data_provider.dart'; +import 'package:firebase_auth/firebase_auth.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; + +class AutoLoginCubit extends Cubit { + AutoLoginCubit() : super(LoginInitialState()); + + void userCheck() { + final user = FirebaseAuth.instance.currentUser; + if (user != null) { + getIt().postUsers().then((result) { + result.when( + success: (data) { + if (data.is_new ?? false) { + emit(LoginInitialState()); + } else { + ShareDataProvider.loadServerDataAtFirst(); + emit(LoginLoadedState(data)); + } + }, + error: (_) => emit(LoginInitialState()), + ); + }); + } + } +} diff --git a/lib/di/set_up_get_it.dart b/lib/di/set_up_get_it.dart index 00e74c79..9df89810 100644 --- a/lib/di/set_up_get_it.dart +++ b/lib/di/set_up_get_it.dart @@ -1,4 +1,5 @@ import 'package:ac_project_app/cubits/folders/get_user_folders_cubit.dart'; +import 'package:ac_project_app/cubits/login/auto_login_cubit.dart'; import 'package:ac_project_app/cubits/profile/profile_info_cubit.dart'; import 'package:ac_project_app/provider/api/custom_client.dart'; import 'package:ac_project_app/provider/api/folders/folder_api.dart'; @@ -20,11 +21,10 @@ void locator() { ..registerLazySingleton(() => LinkApi(httpClient)) ..registerLazySingleton(() => ReportApi(httpClient)) ..registerLazySingleton(() => ProfileApi(httpClient)) - ..registerLazySingleton(() => UserApi(httpClient)); - + ..registerLazySingleton(() => UserApi(httpClient)) // Cubits - final profileCubit = GetProfileInfoCubit(); - getIt..registerLazySingleton(GetUserFoldersCubit.new) - ..registerLazySingleton(() => profileCubit); + ..registerLazySingleton(GetUserFoldersCubit.new) + ..registerLazySingleton(GetProfileInfoCubit.new) + ..registerLazySingleton(AutoLoginCubit.new); } diff --git a/lib/main.dart b/lib/main.dart index bfd97e02..05f7c274 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -35,15 +35,10 @@ class MyApp extends StatelessWidget { ), ); - return MultiPlatformApp.create(); - } -} - -class MultiPlatformApp { - static Widget create() { return ScreenUtilInit( designSize: const Size(393, 852), minTextAdapt: true, + useInheritedMediaQuery: true, builder: (context, child) { return MultiBlocProvider( providers: globalProviders, diff --git a/lib/provider/tutorial_provider.dart b/lib/provider/tutorial_provider.dart new file mode 100644 index 00000000..183479f0 --- /dev/null +++ b/lib/provider/tutorial_provider.dart @@ -0,0 +1,16 @@ +import 'package:shared_preferences/shared_preferences.dart'; + +void checkTutorial2({ + required void Function() onMoveToTutorialView, + required void Function() onMoveToNextView, +}) { + SharedPreferences.getInstance().then((SharedPreferences prefs) { + final tutorial = prefs.getBool('tutorial2') ?? false; + if (tutorial) { + prefs.setBool('tutorial2', false); + onMoveToTutorialView(); + } else { + onMoveToNextView(); + } + }); +} diff --git a/lib/routes.dart b/lib/routes.dart index 5b6afac9..6188a5a8 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -74,7 +74,7 @@ class Pages { case Routes.report: return router.create(child: const ReportView()); case Routes.upload: - return router.create(child: const UploadView()); + return router.create(child: UploadView(args: arguments as Map?)); case Routes.tutorial: return router.create(child: const TutorialView()); default: diff --git a/lib/ui/view/home_view.dart b/lib/ui/view/home_view.dart index 13aae0e7..8d8010f3 100644 --- a/lib/ui/view/home_view.dart +++ b/lib/ui/view/home_view.dart @@ -10,11 +10,14 @@ import 'package:ac_project_app/di/set_up_get_it.dart'; import 'package:ac_project_app/gen/assets.gen.dart'; import 'package:ac_project_app/provider/api/folders/folder_api.dart'; import 'package:ac_project_app/provider/kakao/kakao.dart'; +import 'package:ac_project_app/routes.dart'; import 'package:ac_project_app/ui/page/home/home_page.dart'; import 'package:ac_project_app/ui/page/my_folder/my_folder_page.dart'; import 'package:ac_project_app/ui/page/my_page/my_page.dart'; import 'package:ac_project_app/util/get_arguments.dart'; +import 'package:ac_project_app/util/url_valid.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -41,6 +44,7 @@ class _HomeViewState extends State with WidgetsBindingObserver { if (!mounted) return; Kakao.receiveLink(context, url: url); }); + checkClipboardLink(); super.initState(); } @@ -54,11 +58,26 @@ class _HomeViewState extends State with WidgetsBindingObserver { void didChangeAppLifecycleState(AppLifecycleState state) { if (state == AppLifecycleState.resumed) { getIt().bulkSave(); - Kakao.receiveLink(context); } } + void checkClipboardLink() { + Clipboard.getData(Clipboard.kTextPlain).then((value) { + isValidUrl(value?.text ?? '').then((isValid) { + if (isValid) { + Navigator.pushNamed( + context, + Routes.upload, + arguments: { + 'url': value?.text, + }, + ); + } + }); + }); + } + @override Widget build(BuildContext context) { final args = getArguments(context); diff --git a/lib/ui/view/links/link_detail_view.dart b/lib/ui/view/links/link_detail_view.dart index 5c1e2c27..f77fafe4 100644 --- a/lib/ui/view/links/link_detail_view.dart +++ b/lib/ui/view/links/link_detail_view.dart @@ -109,6 +109,7 @@ class LinkDetailView extends StatelessWidget { bool linkVisible, ) { return Scaffold( + resizeToAvoidBottomInset: false, appBar: AppBar( backgroundColor: Colors.transparent, elevation: 0, diff --git a/lib/ui/view/splash_view.dart b/lib/ui/view/splash_view.dart index 48d3e90a..c8575e85 100644 --- a/lib/ui/view/splash_view.dart +++ b/lib/ui/view/splash_view.dart @@ -1,17 +1,16 @@ import 'dart:async'; import 'package:ac_project_app/const/colors.dart'; +import 'package:ac_project_app/cubits/login/auto_login_cubit.dart'; +import 'package:ac_project_app/cubits/login/login_user_state.dart'; import 'package:ac_project_app/di/set_up_get_it.dart'; import 'package:ac_project_app/gen/assets.gen.dart'; -import 'package:ac_project_app/provider/api/user/user_api.dart'; -import 'package:ac_project_app/provider/share_data_provider.dart'; +import 'package:ac_project_app/provider/tutorial_provider.dart'; import 'package:ac_project_app/routes.dart'; -import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:shared_preferences/shared_preferences.dart'; class SplashView extends StatefulWidget { const SplashView({super.key}); @@ -24,51 +23,36 @@ class _SplashViewState extends State with TickerProviderStateMixin { late AnimationController firstAnimationController; late AnimationController secondAnimationController; + final autoLoginCubit = getIt(); + @override void initState() { + autoLoginCubit.userCheck(); setAnimationController(); - _loginAfterAnimation(); + loginAfterAnimation(); super.initState(); } - void _loginAfterAnimation() { + void loginAfterAnimation() { Future.delayed(const Duration(milliseconds: 1500), () { - SharedPreferences.getInstance().then((SharedPreferences prefs) { - final tutorial = prefs.getBool('tutorial2') ?? false; - if (tutorial) { - prefs.setBool('tutorial2', false); - moveToTutorialView(); - } else { - moveToNextView(); - } - }); + checkTutorial2( + onMoveToTutorialView: moveToTutorialView, + onMoveToNextView: moveToNextView, + ); }); } void moveToNextView() { - final user = FirebaseAuth.instance.currentUser; - if (user != null) { - getIt().postUsers().then((result) { - result.when( - success: (data) { - if (data.is_new ?? false) { - moveToLoginView(); - } else { - ShareDataProvider.loadServerDataAtFirst(); - Navigator.pushReplacementNamed( - context, - Routes.home, - arguments: { - 'index': 0, - }, - ); - } - }, - error: (_) => moveToLoginView(), - ); - }); - } else { + if (autoLoginCubit.state is LoginInitialState) { moveToLoginView(); + } else { + Navigator.pushReplacementNamed( + context, + Routes.home, + arguments: { + 'index': 0, + }, + ); } } @@ -79,26 +63,36 @@ class _SplashViewState extends State with TickerProviderStateMixin { Navigator.pushReplacementNamed(context, Routes.tutorial); void setAnimationController() { - firstAnimationController = AnimationController( + setFirstAnimationController(); + setSecondAnimationController(); + firstAnimationController.forward(); + forwardSecondAnimationAfter300mills(); + secondAnimationController.forward(); + } + + void forwardSecondAnimationAfter300mills() { + Timer( + const Duration(milliseconds: 300), + () => secondAnimationController.forward(), + ); + } + + void setSecondAnimationController() { + secondAnimationController = AnimationController( vsync: this, duration: const Duration( milliseconds: 700, ), ); + } - secondAnimationController = AnimationController( + void setFirstAnimationController() { + firstAnimationController = AnimationController( vsync: this, duration: const Duration( milliseconds: 700, ), ); - - firstAnimationController.forward(); - Timer( - const Duration(milliseconds: 300), - () => secondAnimationController.forward(), - ); - secondAnimationController.forward(); } @override diff --git a/lib/ui/view/upload_view.dart b/lib/ui/view/upload_view.dart index dafbad1a..855bebd4 100644 --- a/lib/ui/view/upload_view.dart +++ b/lib/ui/view/upload_view.dart @@ -18,7 +18,6 @@ import 'package:ac_project_app/ui/widget/buttons/bottom_sheet_button.dart'; import 'package:ac_project_app/ui/widget/dialog/center_dialog.dart'; import 'package:ac_project_app/ui/widget/loading.dart'; import 'package:ac_project_app/util/get_arguments.dart'; -import 'package:ac_project_app/util/url_valid.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; @@ -27,13 +26,15 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; class UploadView extends StatefulWidget { - const UploadView({super.key}); + const UploadView({super.key, this.args}); + + final Map? args; @override State createState() => _UploadViewState(); } -class _UploadViewState extends State with WidgetsBindingObserver { +class _UploadViewState extends State { final linkTextController = TextEditingController(); final commentTextController = TextEditingController(); @@ -48,51 +49,19 @@ class _UploadViewState extends State with WidgetsBindingObserver { @override void initState() { - WidgetsBinding.instance.addObserver(this); - setClipboardUrl(); - super.initState(); - } - - @override - void dispose() { - WidgetsBinding.instance.removeObserver(this); - super.dispose(); - } - - @override - void didChangeAppLifecycleState(AppLifecycleState state) { - if (state == AppLifecycleState.resumed) { - setClipboardUrl(); + if (widget.args != null) { + linkTextController.text = widget.args!['url'] as String; + buttonState = ButtonState.enabled; } - } - - // 클립보드에 링크 있으면 불러오기 - void setClipboardUrl() { - Clipboard.getData(Clipboard.kTextPlain).then((value) { - isValidUrl(value?.text ?? '').then((result) { - if (result) { - setState(() { - linkTextController.text = value?.text ?? ''; - buttonState = ButtonState.enabled; - }); - } - }); - }); + super.initState(); } @override Widget build(BuildContext context) { final args = getArguments(context); - final url = args['url'] as String? ?? ''; - if (url.isNotEmpty) { - linkTextController.text = url; - } return MultiBlocProvider( providers: [ - BlocProvider( - create: (_) => HomeViewCubit((args['index'] as int?) ?? 0), - ), BlocProvider( create: (_) => GetFoldersCubit(excludeUnclassified: true), ), diff --git a/pubspec.yaml b/pubspec.yaml index 010db570..72102f9c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: 링크풀 - 체계적인 링크 관리의 시작 publish_to: 'none' -version: 1.0.48+48 +version: 1.0.50+50 environment: sdk: ">=3.0.0 <4.0.0" @@ -28,15 +28,15 @@ dependencies: ## login sign_in_with_apple: ^5.0.0 google_sign_in: ^6.1.5 - firebase_core: ^2.17.0 - firebase_auth: ^4.10.1 - firebase_dynamic_links: ^5.3.7 + firebase_core: ^2.20.0 + firebase_auth: ^4.12.0 + firebase_dynamic_links: ^5.4.2 kakao_flutter_sdk_user: ^1.6.1 flutter_dotenv: ^5.0.2 flutter_naver_login: ^1.8.0 - firebase_auth_mocks: ^0.11.0 + firebase_auth_mocks: ^0.13.0 ## UI Sizer flutter_screenutil: ^5.7.0 @@ -58,7 +58,7 @@ dependencies: carousel_slider: ^4.2.1 lottie: flutter_slidable: ^2.0.0 - firebase_storage: ^11.2.6 + firebase_storage: ^11.4.0 ## lint very_good_analysis: ^4.0.0+1