Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- 광동온더그린#프랜즈#가상CC#스크린골프#
- PDF#챗봇검색#서비스#GPT4#PGT3.5#GPT#랭체인#챗봇#CHATBOT#LLM#문서검색
- 플러터#sms#mms#문자보내기
- 메타인지#그릿#개발자#꾸준함
- 커피#그라인더#통돌이 오픈 #로스팅#드립커피#생두#원두
- 마이봇#문서챗봇#PDF#TEXT#유투브#챗봇만들기#랭체인# langchain#벡터데이터#자료검색#챗GPT#GPT4#챗지피티
- 마이봇#API 설정
- #비트코인 #이더리움 #트럼프코인 #암호화폐뉴스 #코인시황 #일본디지털화폐 #디파이 #HBAR #코인투자 #이더리움전망
- 비트코인 #이더리움 #암호화폐 #코인시황 #미국경제 #PCE지표 #연준 #금리인하 #인플레이션 #가상자산투자 #코인뉴스 #티스토리블로그
- #창작#SNS#스포츠#반려동물#연애#과제#레시피#활동#건강#운세#글쓰기#비즈니스 #AI비서#챗GPT#CHATGPT
- 마이봇#chatgpt#ai#인공지능
- 쇼핑몰관리시스템#매입관리#시트메타#매입채널#엑셀업로드
- 비트코인 #암호화폐 #코인투자 #가상화폐 #이더리움 #알트코인 #코인뉴스 #투자전략 #코벡스 #코인계산기
- PDF검색#PDF검색챗봇#NEXTJS#스터디#스타트업#랭체이#langchain#prisma#sqlite#
- 비트코인 #이더리움 #리플 #솔라나 #알트코인 #코인뉴스 #가상자산 #암호화폐투자 #고래투자자 #스테이블코인 #BTC #ETH #XRP #SOL #코인하락 #투자전략
- 마이봇#핸드폰대체#
- 블로그#구글노출#걸리는시간#돈벌기#블러그운영
- #비트코인 #이더리움 #암호화폐 #블록체인 #가상자산 #미국GDP #기관투자 #한미정상회담 #디지털자산 #코인전망
- 마이봇#pdf챗봇#상담챗봇#faq챗봇#chatgpt#랭체인#llm
- 마이봇#아이폰#아이폰심사#IT고시#
- 펫버틀러#서버연동#프로필등록#로그인서버연동#이미지#동영상#업로드용 화면#앱개발#플러터#반려생활#로딩바#loading bar#
- flutter#채팅창@메모창#url링크#날짜추가
- #광복절 #제80주년광복절 #순국선열 #애국지사 #비트코인 #이더리움 #가상자산 #코인투자 #암호화폐 #ETF #현물ETF #자금유입 #자동매매 #업비트 #업비트API #트레이딩 #PPI #미국물가지표 #인플레이션 #금리인하 #빅컷 #트럼프 #나스닥 #거시경제 #솔라나 #SEC #가상자산규제 #투자전략 #리스크관리 #분할매수 #분할매도
- #비트코인 #암호화폐 #코인투자 #가상화폐 #이더리움 #알트코인 #코인뉴스 #투자전략 #코벡스 #코인계산기
- 11만4천 달러
- flutter#sqlite#chatGPT#
- 비트코인 #이더리움 #암호화폐 #가상자산 #코인시황 #코인투자 #ETF #스테이킹 #체인링크 #리플 #페이코인 #기관투자 #한미정상회담 #블록체인 #투자전망
- 로우코드#ERP#관리시스템#상품관리#선택박스#자동화프로그램
- 로우코드#lowcode#erp#관리시스템#시트메이트#시트메타#엑셀업로드#엑셀다운로드#그리드#데이터관리#생산관리시스템#로그관리#히스토리#입력체크
- #비트코인 #이더리움 #리플 #솔라나 #알트코인 #코인뉴스 #가상자산 #암호화폐투자 #고래투자자 #스테이블코인 #BTC #ETH #XRP #SOL #코인하락 #투자전략
Archives
- Today
- Total
혼자서 앱 만드는 개발자 함께하는 AI 세상
[펫버틀러] 반려 동물 고민 상담 앱 - 개발 16 일차 (Dark 테마적용) 본문
반응형
- 앱을 사용하다보면 주로 다크테마를 쓰게되는데 아무래도 눈의 피로가 덜한것같다.
- 그래도 플러터 전체적으로 dart 테마를 적용하는 방법을 찾아서 적용했다.
- 적용을 위해 설정페이지를 이용하기로 했다.

- prefs -> SharedPreferences 를 참조해서 저장하고 가져온다.

- main.dart 페이지에 적용한모습

- main.dart에 그냥 클래스를 추가하기로 했다.
- 아래처럼 필요한걸 넣어서 만들었다
const Color customMagenta50 = Color(0xfffcd5ce);
const Color customMagenta100 = Color(0xfffaac9d);
const Color customMagenta300 = Color(0xfff8836c);
const Color customMagenta400 = Color(0xfff65a3b);
const Color customMagenta900 = Color(0xfff4310a);
const Color customMagenta600 = Color(0xffc32708);
const Color customErrorRed = Color(0xFFC5032B);
const Color customSurfaceWhite = Color(0xFFFFFBFA);
const Color customBackgroundWhite = Colors.white;
const ColorScheme _customColorScheme = ColorScheme(
primary: customMagenta50,
primaryVariant: customMagenta600,
secondary: Colors.amber,
secondaryVariant: customMagenta400,
surface: Colors.purpleAccent,
background: customSurfaceWhite,
error: customMagenta900,
onPrimary: Colors.red,
onSecondary: Colors.deepOrange,
onSurface: customMagenta300,
onBackground: customMagenta100,
onError: Colors.redAccent,
brightness: Brightness.light,
);
class ThemeNotifier with ChangeNotifier {
final darkTheme = ThemeData(
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: Colors.grey[900],
elevation: 10,
selectedLabelStyle: TextStyle(
color: Color(0xFFA67926), fontFamily: 'Montserrat', fontSize: 14.0),
unselectedLabelStyle: TextStyle(
color: Colors.grey[600], fontFamily: 'Montserrat', fontSize: 12.0),
selectedItemColor: Color(0xFFA67926),
unselectedItemColor: Colors.grey[600],
showUnselectedLabels: true,
),
primarySwatch: Colors.grey,
primaryColor: Colors.black,
backgroundColor: const Color(0xFF212121),
dividerColor: Colors.black12,
primaryColorLight: Colors.white,
indicatorColor: Color(0xff0E1D36),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.red, // Button color
foregroundColor: Colors.white, // Text color
),
),
hintColor: Color(0xff280C0B),
highlightColor: Color(0xff372901),
hoverColor: Color(0xff3A3A3B),
focusColor: Color(0xff0B2512),
disabledColor: Colors.grey,
cardColor: Color(0xFF151515),
canvasColor: Colors.black,
colorScheme: _customColorScheme,
appBarTheme: AppBarTheme(
elevation: 0.0,
),
textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.white),
);
static const ColorScheme _customColorSchemelight = ColorScheme(
primary: customMagenta50,
secondary: Colors.amber,
surface: Colors.purpleAccent,
background: customSurfaceWhite,
error: customMagenta900,
onPrimary: Colors.red,
onSecondary: Colors.deepOrange,
onSurface: customMagenta300,
onBackground: customMagenta100,
onError: Colors.redAccent,
brightness: Brightness.light,
);
final lightTheme = ThemeData(
bottomNavigationBarTheme: BottomNavigationBarThemeData(
backgroundColor: Colors.grey[900],
elevation: 10,
selectedLabelStyle: TextStyle(
color: Color(0xFFA67926), fontFamily: 'Montserrat', fontSize: 14.0),
unselectedLabelStyle: TextStyle(
color: Colors.grey[600], fontFamily: 'Montserrat', fontSize: 12.0),
selectedItemColor: Color(0xFFA67926),
unselectedItemColor: Colors.grey[600],
showUnselectedLabels: true,
),
primarySwatch: Colors.grey,
primaryColor: Colors.white,
backgroundColor: const Color(0xFFE5E5E5),
dividerColor: Colors.white54,
indicatorColor: Color(0xffCBDCF8),
primaryColorLight: Colors.black,
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: Colors.red, // Button color
foregroundColor: Colors.white, // Text color
),
),
hintColor: Color(0xffEECED3),
highlightColor: Color(0xffFCE192),
hoverColor: Color(0xff4285F4),
focusColor: Color(0xffA8DAB5),
disabledColor: Colors.grey,
cardColor: Colors.white,
canvasColor: Colors.grey[50],
colorScheme: _customColorSchemelight,
appBarTheme: AppBarTheme(
elevation: 0.0,
),
textSelectionTheme: TextSelectionThemeData(selectionColor: Colors.black),
);
late ThemeData _themeData;
ThemeData getTheme() => _themeData;
ThemeNotifier(var themeMode) {
if (themeMode) {
_themeData = darkTheme;
} else {
print('setting dark theme');
_themeData = lightTheme;
}
notifyListeners();
}
void setDarkMode() async {
_themeData = darkTheme;
notifyListeners();
}
void setLightMode() async {
_themeData = lightTheme;
notifyListeners();
}
}
전체 페이지에 적용되는것을 볼수있다.

728x90
반응형
'펫버틀러' 카테고리의 다른 글
[펫버틀러] 반려 동물 고민 상담 앱 - 개발 17 일차 (메세지 발송을 위한 구글메세지등록) (0) | 2023.02.04 |
---|---|
[펫버틀러] 반려 동물 고민 상담 앱 - 개발 14 일차 (파일백업을 위해 퍼미션 체크) (2) | 2023.01.23 |
[펫버틀러] 반려 동물 고민 상담 앱 - 개발 13 일차 (설정 화면 만들기) (0) | 2023.01.23 |
[펫버틀러] 반려 동물 고민 상담 앱 - 개발 12 일차 (프로필화면에 달력적용) (2) | 2023.01.11 |
[펫버틀러] 반려 동물 고민 상담 앱 - 개발 11 일차 (동영상 썸네일 / 플레이어 적용 ) (0) | 2023.01.02 |
Comments