Written on
·
1.1K
0
5:14에
accentColor 속성이 이젠 deprecated 돼서 쓸 수 없다고 하는데 어떻게 해야하나요??
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(),
);
}
}
0
마지막 섹션에서 최신 코드로 수정하는 영상이 있습니다. 참고하시기 바라고요.
수정된 코드는 다음과 같습니다.
https://github.com/junsuk5/flutter_insta_clon/blob/null-safety/lib/main.dart
HomePage의 Appbar 의 backgroundColor 값을 white로 설정하셨나요?
https://github.com/junsuk5/flutter_insta_clon/blob/null-safety/lib/home_page.dart