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

home #6

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
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
Binary file modified README.md
Binary file not shown.
Binary file modified android/app/src/main/res/drawable-v21/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/bank/bank_investment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/bank/bank_kakao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/bank/bank_shinhan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/bank/bank_toss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/benefit/benefit_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/benefit/benefit_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/benefit/benefit_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/benefit/benefit_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/benefit/benefit_05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/icon/map_point.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/icon/notification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/icon/plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/icon/setting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/icon/stock_calendar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/icon/stock_search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/icon/stock_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/icon/toss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/splash/android12splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/splash/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions flutter_native_splash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ flutter_native_splash:
# of your splash screen to a solid color. Use background_image to set the background of your
# splash screen to a png image. This is useful for gradients. The image will be stretch to the
# size of the app. Only one parameter can be used, color and background_image cannot both be set.
color: "#ffffff"
color: "#0a0a0e"
#background_image: "assets/background.png"

# Optional parameters are listed below. To enable a parameter, uncomment the line by removing
# the leading # character.

# The image parameter allows you to specify an image used in the splash screen. It must be a
# png file and should be sized for 4x pixel density.
#image: assets/splash.png
image: assets/image/splash/splash.png

# The branding property allows you to specify an image used as branding in the splash screen.
# It must be a png file. It is supported for Android, iOS and the Web. For Android 12,
Expand Down Expand Up @@ -50,10 +50,10 @@ flutter_native_splash:
# 640 pixels in diameter.
# App icon without an icon background: This should be 1152×1152 pixels, and fit within a circle
# 768 pixels in diameter.
#image: assets/android12splash.png
image: assets/image/splash/android12splash.png

# Splash screen background color.
#color: "#42a5f5"
color: "#0a0a0e"

# App icon background color.
#icon_background_color: "#111111"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ios/Runner/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
<image name="LaunchImage" width="768" height="768"/>
<image name="LaunchBackground" width="1" height="1"/>
</resources>
</document>
2 changes: 1 addition & 1 deletion lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class App extends StatefulWidget {
static final GlobalKey<NavigatorState> navigatorKey = GlobalKey();

///light, dark 테마가 준비되었고, 시스템 테마를 따라가게 하려면 해당 필드를 제거 하시면 됩니다.
static const defaultTheme = CustomTheme.light;
static const defaultTheme = CustomTheme.dark;
static bool isForeground = true;

const App({super.key});
Expand Down
2 changes: 2 additions & 0 deletions lib/common/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export 'widget/w_empty_expanded.dart';
export 'widget/w_height_and_width.dart';
export 'widget/w_line.dart';
export 'widget/w_tap.dart';
export 'theme/color/abs_theme_colors.dart';
export 'theme/shadows/abs_theme_shadows.dart';

const defaultFontStyle = GoogleFonts.ptSerif;

Expand Down
3 changes: 0 additions & 3 deletions lib/common/constants.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
export 'theme/color/abs_theme_colors.dart';
export 'theme/shadows/abs_theme_shadows.dart';

const basePath = 'assets/image';
4 changes: 4 additions & 0 deletions lib/common/theme/color/abs_theme_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@ abstract class AbstractThemeColors {
Color get snackbarBgColor => AppColors.mediumBlue;

Color get blueButtonBackground => AppColors.darkBlue;

Color get appBarBackGround => const Color.fromARGB(255, 16, 16, 18);

Color get buttonBackground => const Color.fromARGB(255, 24, 24, 24);
}
4 changes: 2 additions & 2 deletions lib/common/theme/custom_theme_app.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:fast_app_base/app.dart';
import 'package:flutter/material.dart';

import '../../app.dart';
import '../data/preference/prefs.dart';
import 'custom_theme.dart';
import 'custom_theme_holder.dart';
Expand Down Expand Up @@ -42,4 +42,4 @@ class _CustomThemeAppState extends State<CustomThemeApp> {
return CustomTheme.light;
}
}
}
}
27 changes: 27 additions & 0 deletions lib/common/widget/w_big_button.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import 'package:fast_app_base/common/common.dart';
import 'package:fast_app_base/common/widget/w_arrow.dart';
import 'package:flutter/material.dart';

class BigButton extends StatelessWidget {
final String text;
final VoidCallback onTap;

const BigButton(this.text,{super.key, required this.onTap});

@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
decoration: BoxDecoration(
color: context.appColors.buttonBackground,
borderRadius: BorderRadius.circular(20)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children:[
text.text.white.size(20).bold.make(),
Arrow(),
],
),
);
}
}
2 changes: 2 additions & 0 deletions lib/common/widget/w_empty_expanded.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';

const emptyExpanded = EmptyExpanded();

class EmptyExpanded extends StatelessWidget {
final int flex;

Expand Down
6 changes: 6 additions & 0 deletions lib/common/widget/w_height_and_width.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import 'package:flutter/material.dart';

const width10 = Width(10);
const width5 = Width(5);

const height10 = Height(10);
const height5 = Height(5);

class Height extends StatelessWidget {
final double height;

Expand Down
5 changes: 4 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';

import 'app.dart';
import 'common/data/preference/app_preferences.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();
final bindings = WidgetsFlutterBinding.ensureInitialized();
// 네이티브 스플래쉬 화면 보존
FlutterNativeSplash.preserve(widgetsBinding: bindings);
await EasyLocalization.ensureInitialized();
await AppPreferences.init();

Expand Down
43 changes: 29 additions & 14 deletions lib/screen/main/s_main.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import 'package:fast_app_base/common/cli_common.dart';
import 'package:fast_app_base/screen/main/tab/tab_item.dart';
import 'package:fast_app_base/screen/main/tab/tab_navigator.dart';
import 'package:flutter/material.dart';

import 'package:after_layout/after_layout.dart';
import 'package:flutter_native_splash/flutter_native_splash.dart';
import '../../common/common.dart';
import 'w_menu_drawer.dart';

Expand All @@ -12,9 +14,15 @@ class MainScreen extends StatefulWidget {
State<MainScreen> createState() => MainScreenState();
}

class MainScreenState extends State<MainScreen> with SingleTickerProviderStateMixin {
class MainScreenState extends State<MainScreen> with SingleTickerProviderStateMixin, AfterLayoutMixin {
TabItem _currentTab = TabItem.home;
final tabs = [TabItem.home, TabItem.favorite];
final tabs = [TabItem.home,
TabItem.benefit,
TabItem.ttosspay,
TabItem.stock,
TabItem.all
];

final List<GlobalKey<NavigatorState>> navigatorKeys = [];

int get _currentIndex => tabs.indexOf(_currentTab);
Expand All @@ -25,6 +33,14 @@ class MainScreenState extends State<MainScreen> with SingleTickerProviderStateMi

static double get bottomNavigationBarBorderRadius => 30.0;

// preserve한 splash를 제거
@override
FutureOr<void> afterFirstLayout(BuildContext context) {
delay((){
FlutterNativeSplash.remove();
}, 1500.ms);
}

@override
void initState() {
super.initState();
Expand All @@ -40,7 +56,6 @@ class MainScreenState extends State<MainScreen> with SingleTickerProviderStateMi
extendBody: extendBody, //bottomNavigationBar 아래 영역 까지 그림
drawer: const MenuDrawer(),
body: Container(
color: context.appColors.seedColor.getMaterialColorValues[200],
padding: EdgeInsets.only(bottom: extendBody ? 60 - bottomNavigationBarBorderRadius : 0),
child: SafeArea(
bottom: !extendBody,
Expand All @@ -59,12 +74,12 @@ class MainScreenState extends State<MainScreen> with SingleTickerProviderStateMi
index: _currentIndex,
children: tabs
.mapIndexed((tab, index) => Offstage(
offstage: _currentTab != tab,
child: TabNavigator(
navigatorKey: navigatorKeys[index],
tabItem: tab,
),
))
offstage: _currentTab != tab,
child: TabNavigator(
navigatorKey: navigatorKeys[index],
tabItem: tab,
),
))
.toList());

void _handleBackPressed(bool didPop) {
Expand Down Expand Up @@ -110,10 +125,10 @@ class MainScreenState extends State<MainScreen> with SingleTickerProviderStateMi
return tabs
.mapIndexed(
(tab, index) => tab.toNavigationBarItem(
context,
isActivated: _currentIndex == index,
),
)
context,
isActivated: _currentIndex == index,
),
)
.toList();
}

Expand Down
15 changes: 15 additions & 0 deletions lib/screen/main/tab/all/f_all.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import 'package:flutter/material.dart';

class AllFragment extends StatefulWidget {
const AllFragment({super.key});

@override
State<AllFragment> createState() => _AllFragmentState();
}

class _AllFragmentState extends State<AllFragment> {
@override
Widget build(BuildContext context) {
return const Placeholder();
}
}
15 changes: 15 additions & 0 deletions lib/screen/main/tab/benefit/f_benefit.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import 'package:flutter/material.dart';

class BenefitFragment extends StatefulWidget {
const BenefitFragment({super.key});

@override
State<BenefitFragment> createState() => _BenefitFragmentState();
}

class _BenefitFragmentState extends State<BenefitFragment> {
@override
Widget build(BuildContext context) {
return const Placeholder();
}
}
46 changes: 0 additions & 46 deletions lib/screen/main/tab/favorite/f_favorite.dart

This file was deleted.

21 changes: 21 additions & 0 deletions lib/screen/main/tab/home/bank_account_dummy.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import 'package:fast_app_base/screen/main/tab/home/bank_dummy.dart';
import 'package:fast_app_base/screen/main/tab/home/vo/vo_bank_account.dart';

final bankAccountShinhan1 = BankAccount(bankShinhan, 300000, accountTypeName: "신한 주거래 우대통장(저축예금)");
final bankAccountShinhan2 = BankAccount(bankShinhan, 300000000, accountTypeName: "저축예금");
final bankAccountShinhan3 = BankAccount(bankShinhan, 30000000000, accountTypeName: "저축예금");
final bankAccountToss = BankAccount(bankTtoss, 50000);
final bankAccountKakao = BankAccount(bankKakao, 70000000, accountTypeName: "입출금 통장");


main(){
print('계좌: ${bankAccounts[0].accountTypeName}');
}

final bankAccounts = [
bankAccountShinhan1,
bankAccountShinhan2,
bankAccountShinhan3,
bankAccountToss,
bankAccountKakao
];
6 changes: 6 additions & 0 deletions lib/screen/main/tab/home/bank_dummy.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import 'package:fast_app_base/common/constants.dart';
import 'package:fast_app_base/screen/main/tab/home/vo/vo_bank.dart';

final bankShinhan = Bank("신한은행", '$basePath/bank/bank_shinhan.png');
final bankKakao = Bank("카카오뱅크", '$basePath/bank/bank_kakao.png');
final bankTtoss = Bank("토스뱅크", '$basePath/bank/bank_toss.png');
Loading