Skip to content

Commit

Permalink
Merge pull request #11 from aengzu/Feat/fealing
Browse files Browse the repository at this point in the history
refactor: 로딩 UI 개선
  • Loading branch information
aengzu authored Sep 2, 2024
2 parents efb93d8 + fa200dd commit 887b28f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -35,14 +36,16 @@ class ChatEndLoadingView extends StatelessWidget {
text: '\n',
children: <TextSpan>[
TextSpan(
// 여기에 랜덤으로 마인드셋 하나 가져오고 싶음.
text: chatEndLoadingViewModel.randomMindset?.mindsetText ?? '',
// 여기에 랜덤으로 마인드셋 하나 가져오고 싶음.
text:
chatEndLoadingViewModel.randomMindset?.mindsetText ??
'',
style: textTheme().titleMedium),
],
),
),
),
const CircularProgressIndicator(color: Colors.blue),
const SpinKitThreeBounce(color: AppColors.deepBlue, size: 30),
],
),
);
Expand All @@ -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), // 실제 이미지 경로로 수정 필요
);
}
}
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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),
],
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 8 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 887b28f

Please sign in to comment.