From fa200dd2d0f382ded96cfb243779a16a656d6c32 Mon Sep 17 00:00:00 2001 From: aengzu Date: Mon, 2 Sep 2024 22:16:12 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=A1=9C=EB=94=A9=20UI=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chatting/view/chat_end_loading_screen.dart | 14 +++++++++----- .../screens/chatting/view/chat_loading_screen.dart | 4 +++- .../chatting/view/components/tip_button.dart | 4 ++-- pubspec.lock | 8 ++++++++ pubspec.yaml | 1 + 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/lib/presentation/screens/chatting/view/chat_end_loading_screen.dart b/lib/presentation/screens/chatting/view/chat_end_loading_screen.dart index 4507d77..d09cf19 100644 --- a/lib/presentation/screens/chatting/view/chat_end_loading_screen.dart +++ b/lib/presentation/screens/chatting/view/chat_end_loading_screen.dart @@ -1,9 +1,10 @@ import 'package:flutter/material.dart'; +import 'package:flutter_spinkit/flutter_spinkit.dart'; +import 'package:palink_v2/core/theme/app_colors.dart'; import 'package:palink_v2/core/theme/app_fonts.dart'; import 'package:palink_v2/presentation/screens/chatting/controller/chat_end_loading_viewmodel.dart'; import 'package:sizing/sizing.dart'; - class ChatEndLoadingView extends StatelessWidget { final ChatEndLoadingViewModel chatEndLoadingViewModel; @@ -35,14 +36,16 @@ class ChatEndLoadingView extends StatelessWidget { text: '\n', children: [ TextSpan( - // 여기에 랜덤으로 마인드셋 하나 가져오고 싶음. - text: chatEndLoadingViewModel.randomMindset?.mindsetText ?? '', + // 여기에 랜덤으로 마인드셋 하나 가져오고 싶음. + text: + chatEndLoadingViewModel.randomMindset?.mindsetText ?? + '', style: textTheme().titleMedium), ], ), ), ), - const CircularProgressIndicator(color: Colors.blue), + const SpinKitThreeBounce(color: AppColors.deepBlue, size: 30), ], ), ); @@ -53,7 +56,8 @@ class ChatEndLoadingView extends StatelessWidget { padding: const EdgeInsets.all(10), width: 150, height: 150, - child: Image.asset(chatEndLoadingViewModel.character.image), // 실제 이미지 경로로 수정 필요 + child: Image.asset( + chatEndLoadingViewModel.character.image), // 실제 이미지 경로로 수정 필요 ); } } diff --git a/lib/presentation/screens/chatting/view/chat_loading_screen.dart b/lib/presentation/screens/chatting/view/chat_loading_screen.dart index 9512199..b7b4fb4 100644 --- a/lib/presentation/screens/chatting/view/chat_loading_screen.dart +++ b/lib/presentation/screens/chatting/view/chat_loading_screen.dart @@ -1,4 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:flutter_spinkit/flutter_spinkit.dart'; +import 'package:palink_v2/core/theme/app_colors.dart'; import 'package:palink_v2/core/theme/app_fonts.dart'; import 'package:palink_v2/presentation/screens/chatting/controller/chat_loading_viewmodel.dart'; import 'package:sizing/sizing.dart'; @@ -31,7 +33,7 @@ class ChatLoadingScreen extends StatelessWidget { EdgeInsets.symmetric(horizontal: 0.1.sw, vertical: 0.02.sh), child: _buildStyledDescription(viewModel.character.description!), ), - const CircularProgressIndicator(color: Colors.blue), + const SpinKitThreeBounce(color: AppColors.deepBlue, size: 30), ], ), ); diff --git a/lib/presentation/screens/chatting/view/components/tip_button.dart b/lib/presentation/screens/chatting/view/components/tip_button.dart index 2ed286a..2d4b9ec 100644 --- a/lib/presentation/screens/chatting/view/components/tip_button.dart +++ b/lib/presentation/screens/chatting/view/components/tip_button.dart @@ -41,15 +41,15 @@ class TipButton extends StatelessWidget { Widget _buildExpandedTip() { return Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.end, mainAxisSize: MainAxisSize.min, children: [ FloatingActionButton( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)), onPressed: onToggle, - child: const Icon(Icons.close, color: Colors.white), backgroundColor: AppColors.deepBlue, + child: const Icon(Icons.close, color: Colors.white), ), SizedBox(height: 0.01.sh), Container( diff --git a/pubspec.lock b/pubspec.lock index 571bda9..75b1074 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -459,6 +459,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.1.2" + flutter_spinkit: + dependency: "direct main" + description: + name: flutter_spinkit + sha256: d2696eed13732831414595b98863260e33e8882fc069ee80ec35d4ac9ddb0472 + url: "https://pub.dev" + source: hosted + version: "5.2.1" flutter_test: dependency: "direct dev" description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 08de3ba..4a3c7b4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -64,6 +64,7 @@ dependencies: sqflite: ^2.3.3+1 sqflite_common_ffi_web: ^0.4.4 fluttertoast: ^8.2.8 + flutter_spinkit: ^5.2.1 dev_dependencies: flutter_test: