강의

멘토링

커뮤니티

Inflearn Community Q&A

skykum20043063's profile image
skykum20043063

asked

Flutter Introduction - Android and iOS Development at Once (with Firebase)

ThemeData의 accentColor속성 deprecated

Written on

·

1.2K

0

5:14에 

accentColor 속성이 이젠 deprecated 돼서 쓸 수 없다고 하는데 어떻게 해야하나요??

 

iosandroidFlutter

Answer 2

0

아무리 이렇게 코딩해도 appBar가 흰색으로 안바뀌는데요?? 머가 문제 일까요??

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);

// This widget is the root of your application.
@override
Widget build(BuildContext context) {
print('MyApp created');
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primaryColor: Colors.white,
colorScheme: ColorScheme.fromSwatch(primarySwatch: Colors.blue)
.copyWith(secondary: Colors.black),
),
home: const RootPage(),
);
}
}
survivalcoding님의 프로필 이미지
survivalcoding
Instructor

HomePage의 Appbar 의 backgroundColor 값을 white로 설정하셨나요?

https://github.com/junsuk5/flutter_insta_clon/blob/null-safety/lib/home_page.dart

0

survivalcoding님의 프로필 이미지
survivalcoding
Instructor

마지막 섹션에서 최신 코드로 수정하는 영상이 있습니다. 참고하시기 바라고요.

수정된 코드는 다음과 같습니다.

https://github.com/junsuk5/flutter_insta_clon/blob/null-safety/lib/main.dart

skykum20043063님의 프로필 이미지
skykum20043063
Questioner

감사합니다!

skykum20043063's profile image
skykum20043063

asked

Ask a question