analysis_options.yaml 파일 내 rules: 밑에 코드 추가
rules:
prefer_typing_uninitialized_variables: false
prefer_const_constructors_in_immutables: false
prefer_const_constructors: false
avoid_print: false
prefer_const_literals_to_create_immutables: false
const 부분은 재랜더링을 줄임, 앱 발행 전 true 시도해보기
죄다 지우고 stless 위젯 대충 만들어서 시작
MaterialApp은 미리 빼두는게 편할듯
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: MyApp()));
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
Widget build(BuildContext context) {
return Scaffold();
}
}
void main() {
runApp(
MaterialApp(
home: MyApp(),
theme: ThemeData(
iconTheme: IconThemeData(color: Colors.blue),
appBarTheme: AppBarTheme(color: Colors.grey),
),
),
);
}
IconThemeData(color: Colors.blue)이 있어도 appBar: AppBar(actions: [Icon(Icons.star)]), 속의 star는 blue가 아님theme: ThemeData(
iconTheme: IconThemeData(color: Colors.amber),
appBarTheme: AppBarTheme(color: Colors.grey),
),

theme: ThemeData(
iconTheme: IconThemeData(color: Colors.amber),
appBarTheme: AppBarTheme(
color: Colors.grey,
actionsIconTheme: IconThemeData(color: Colors.amber),
),
),

var text1 = TextStyle(); Text('', style: text1) 처럼 변수로 빼서 쓰는 게 나을지도