Skip to content

Commit

Permalink
Merge pull request #152 from sparcs-kaist/chore/make-new-ara-app-grea…
Browse files Browse the repository at this point in the history
…t-again

Flutter analyze 적용
  • Loading branch information
sangohkim authored Mar 2, 2024
2 parents 748c802 + 5caa339 commit 9d2b7ae
Show file tree
Hide file tree
Showing 53 changed files with 217 additions and 375 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ ios/fastlane/README.md
ios/fastlane/.env.default
ios/Runner.app.dSYM.zip
ios/Runner.ipa

.env
.env.*
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ SPEC CHECKSUMS:
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
video_player_avfoundation: 8563f13d8fc8b2c29dc2d09e60b660e4e8128837
webview_cookie_manager: eaf920722b493bd0f7611b5484771ca53fed03f7
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a
webview_flutter_wkwebview: 4f3e50f7273d31e5500066ed267e3ae4309c5ae4

PODFILE CHECKSUM: 40e3ca182cfbd571c46e751b6eb8a6f2cbbf72fc

Expand Down
1 change: 0 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:new_ara_app/pages/terms_and_conditions_page.dart';
import 'package:new_ara_app/widgets/loading_indicator.dart';
import 'package:provider/provider.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/models/article_list_action_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

import 'package:new_ara_app/models/public_user_model.dart';
import 'package:new_ara_app/models/topic_model.dart';
import 'package:new_ara_app/models/board_model.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/models/article_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

import 'package:flutter/material.dart';

import 'package:new_ara_app/models/topic_model.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/models/article_nested_comment_list_action_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

import 'package:flutter/material.dart';
import 'package:new_ara_app/models/public_user_model.dart';
import 'package:new_ara_app/models/comment_nested_comment_list_action_model.dart';
Expand Down
2 changes: 2 additions & 0 deletions lib/models/article_page_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

import 'package:new_ara_app/models/article_list_action_model.dart';

class ArticlePageModel {
Expand Down
2 changes: 2 additions & 0 deletions lib/models/attachment_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

class AttachmentModel {
int id;
String created_at;
Expand Down
2 changes: 2 additions & 0 deletions lib/models/base_article_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

class BaseArticleModel {
int id;
String created_at;
Expand Down
2 changes: 2 additions & 0 deletions lib/models/board_detail_action_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

import 'package:new_ara_app/models/topic_model.dart';
import 'package:new_ara_app/models/simple_board_model.dart';

Expand Down
2 changes: 2 additions & 0 deletions lib/models/board_group_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

import 'package:new_ara_app/models/simple_board_model.dart';

class BoardGroupModel {
Expand Down
2 changes: 2 additions & 0 deletions lib/models/board_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

class BoardModel {
final int id;
final String slug;
Expand Down
2 changes: 2 additions & 0 deletions lib/models/comment_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

import 'package:new_ara_app/models/public_user_model.dart';

class CommentModel {
Expand Down
2 changes: 2 additions & 0 deletions lib/models/comment_nested_comment_list_action_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

import 'package:new_ara_app/models/public_user_model.dart';

class CommentNestedCommentListActionModel {
Expand Down
2 changes: 2 additions & 0 deletions lib/models/notification_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

import 'package:new_ara_app/models/base_article_model.dart';

class NotificationModel {
Expand Down
2 changes: 2 additions & 0 deletions lib/models/public_user_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

import 'package:new_ara_app/models/public_user_profile_model.dart';

class PublicUserModel {
Expand Down
2 changes: 2 additions & 0 deletions lib/models/public_user_profile_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

class PublicUserProfileModel {
String? picture;
String? nickname;
Expand Down
2 changes: 2 additions & 0 deletions lib/models/scrap_create_action_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

class ScrapCreateActionModel {
int id;
String created_at;
Expand Down
14 changes: 8 additions & 6 deletions lib/models/scrap_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

import 'package:new_ara_app/models/public_user_model.dart';
import 'package:new_ara_app/models/article_list_action_model.dart';

Expand All @@ -19,13 +21,13 @@ class ScrapModel {
});

ScrapModel.fromJson(Map<String, dynamic> json)
: this.id = json['id'],
this.parent_article =
: id = json['id'],
parent_article =
ArticleListActionModel.fromJson(json['parent_article']),
this.scrapped_by = PublicUserModel.fromJson(json['scrapped_by']),
this.created_at = json['created_at'],
this.updated_at = json['updated_at'],
this.deleted_at = json['deleted_at'];
scrapped_by = PublicUserModel.fromJson(json['scrapped_by']),
created_at = json['created_at'],
updated_at = json['updated_at'],
deleted_at = json['deleted_at'];

Map<String, dynamic> toJson() => {
'id': id,
Expand Down
2 changes: 2 additions & 0 deletions lib/models/simple_board_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

class SimpleBoardModel {
int id;
String slug;
Expand Down
2 changes: 2 additions & 0 deletions lib/models/topic_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

class TopicModel {
final int id;
final String slug;
Expand Down
2 changes: 2 additions & 0 deletions lib/models/user_profile_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: non_constant_identifier_names

class UserProfileModel {
final int user;
final String? email;
Expand Down
3 changes: 1 addition & 2 deletions lib/pages/bulletin_list_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const boardsByGroupLength = 5;

/// `BulletinListPage`는 사용자가 이 페이지에서 다양한 게시판을 탐색하고 선택함..
class BulletinListPage extends StatefulWidget {
const BulletinListPage({Key? key}) : super(key: key);
const BulletinListPage({super.key});
@override
State<StatefulWidget> createState() => _BulletinListPageState();
}
Expand All @@ -35,7 +35,6 @@ class _BulletinListPageState extends State<BulletinListPage> {

@override
void initState() {
// TODO: implement initState
super.initState();
var userProvider = Provider.of<UserProvider>(context, listen: false);
refreshBoardList(userProvider);
Expand Down
3 changes: 0 additions & 3 deletions lib/pages/bulletin_search_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class _BulletinSearchPageState extends State<BulletinSearchPage> {

@override
void initState() {
// TODO: implement initState
super.initState();

// 게시판 유형에 따라 API URL 및 힌트 텍스트를 다르게 설정
Expand Down Expand Up @@ -71,8 +70,6 @@ class _BulletinSearchPageState extends State<BulletinSearchPage> {
_hintText = "검색";
break;
}

UserProvider userProvider = context.read<UserProvider>();
// 위젯이 빌드된 후에 포커스를 줍니다.
WidgetsBinding.instance
.addPostFrameCallback((_) => _focusNode.requestFocus());
Expand Down
12 changes: 7 additions & 5 deletions lib/pages/chat_list_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:new_ara_app/pages/chat_window_page.dart';
import 'package:new_ara_app/providers/notification_provider.dart';

class ChatListPage extends StatefulWidget {
const ChatListPage({Key? key}) : super(key: key);
const ChatListPage({super.key});
@override
State<StatefulWidget> createState() => _ChatListPageState();
}
Expand All @@ -20,7 +20,6 @@ class _ChatListPageState extends State<ChatListPage> {
// int count=0;
@override
void initState() {
// TODO: implement initState
super.initState();
UserProvider userProvider = context.read<UserProvider>();
context.read<NotificationProvider>().checkIsNotReadExist(userProvider);
Expand Down Expand Up @@ -68,7 +67,10 @@ class _ChatListPageState extends State<ChatListPage> {
splashColor: Colors.white,
icon: SvgPicture.asset(
'assets/icons/search.svg',
color: ColorsInfo.newara,
colorFilter: const ColorFilter.mode(
ColorsInfo.newara,
BlendMode.srcIn,
),
width: 45,
height: 45,
),
Expand Down Expand Up @@ -152,12 +154,12 @@ class _ChatPreviewState extends State<ChatPreview> {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
const SizedBox(
height: 24,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
children: [
Expanded(
child: Text(
"카이스트 익명 밝 123 익명 123 익명 123 익명 123",
Expand Down
25 changes: 15 additions & 10 deletions lib/pages/chat_window_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:new_ara_app/constants/colors_info.dart';

class ChatWindowPage extends StatefulWidget {
const ChatWindowPage({Key? key}) : super(key: key);
const ChatWindowPage({super.key});

@override
State<ChatWindowPage> createState() => _ChatWindowPageState();
Expand All @@ -14,7 +14,6 @@ class _ChatWindowPageState extends State<ChatWindowPage> {

@override
void initState() {
// TODO: implement initState
super.initState();
for (int i = 0; i <= 3; i++) {
chatBubbleList.add(const OtherChatBubble());
Expand Down Expand Up @@ -49,7 +48,11 @@ class _ChatWindowPageState extends State<ChatWindowPage> {
height: 21.87,
child: SvgPicture.asset(
'assets/icons/left_chevron.svg',
color: ColorsInfo.newara,

colorFilter: const ColorFilter.mode(
ColorsInfo.newara,
BlendMode.srcIn,
),
fit: BoxFit.fill,
),
),
Expand Down Expand Up @@ -129,7 +132,6 @@ class DefaultInputArea extends StatefulWidget {
class _DefaultInputAreaState extends State<DefaultInputArea> {
@override
void initState() {
// TODO: implement initState
super.initState();
setState(() {});
}
Expand Down Expand Up @@ -158,7 +160,10 @@ class _DefaultInputAreaState extends State<DefaultInputArea> {
'assets/icons/add.svg',
width: 36,
height: 36,
color: const Color(0xFFED3A3A),
colorFilter: const ColorFilter.mode(
Color(0xFFED3A3A),
BlendMode.srcIn,
),
),
const SizedBox(
width: 7,
Expand Down Expand Up @@ -264,7 +269,7 @@ class MyChatBubble extends StatelessWidget {
}

class OtherChatBubble extends StatefulWidget {
const OtherChatBubble({Key? key}) : super(key: key);
const OtherChatBubble({super.key});

@override
State<OtherChatBubble> createState() => _OtherChatBubbleState();
Expand Down Expand Up @@ -346,7 +351,7 @@ class _OtherChatBubbleState extends State<OtherChatBubble> {
}

class TimeChatBubble extends StatefulWidget {
const TimeChatBubble({Key? key}) : super(key: key);
const TimeChatBubble({super.key});

@override
State<TimeChatBubble> createState() => _TimeChatBubbleState();
Expand All @@ -366,11 +371,11 @@ class _TimeChatBubbleState extends State<TimeChatBubble> {
borderRadius: const BorderRadius.all(Radius.circular(12.0)),
),
height: 24,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 9),
child: const Padding(
padding: EdgeInsets.symmetric(horizontal: 9),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
children: [
Text(
"2022년 11월 24일",
style: TextStyle(
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/error_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class _ErrorPageState extends State<ErrorPage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Error Page'),
title: const Text('Error Page'),
),
body: Center(
body: const Center(
child: Text('Error Page'),
),
);
Expand Down
2 changes: 0 additions & 2 deletions lib/pages/inquiry_page.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:io';

import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
Expand Down
3 changes: 1 addition & 2 deletions lib/pages/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import 'package:flutter_native_splash/flutter_native_splash.dart';

import 'package:new_ara_app/constants/colors_info.dart';
import 'package:new_ara_app/pages/sparcs_sso_page.dart';
import 'package:new_ara_app/pages/terms_and_conditions_page.dart';
import 'package:new_ara_app/utils/slide_routing.dart';

/// `LoginPage` 위젯은 사용자에게 로그인 페이지를 표시.
class LoginPage extends StatefulWidget {
/// 기본 생성자입니다.
const LoginPage({Key? key}) : super(key: key);
const LoginPage({super.key});

@override
State<LoginPage> createState() => _LoginPageState();
Expand Down
3 changes: 1 addition & 2 deletions lib/pages/main_navigation_tab_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:flutter_native_splash/flutter_native_splash.dart';

import 'package:new_ara_app/pages/main_page.dart';
import 'package:new_ara_app/pages/bulletin_list_page.dart';
import 'package:new_ara_app/pages/chat_list_page.dart';
import 'package:new_ara_app/pages/notification_page.dart';
import 'package:new_ara_app/pages/user_page.dart';
import 'package:new_ara_app/providers/notification_provider.dart';
Expand All @@ -14,7 +13,7 @@ import 'package:new_ara_app/constants/colors_info.dart';
/// MainNavigationTabPage
/// 메인 화면 하단에 위치하는 탭바를 포함한 메인 페이지.
class MainNavigationTabPage extends StatefulWidget {
const MainNavigationTabPage({Key? key}) : super(key: key);
const MainNavigationTabPage({super.key});
@override
State<StatefulWidget> createState() => _MainNavigationTabPageState();
}
Expand Down
Loading

0 comments on commit 9d2b7ae

Please sign in to comment.