Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 로딩 UI 개선 #11

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading