@@ -37,7 +37,7 @@ class _HomeCapsuleSectionState extends State<HomeCapsuleSection> {
3737 final today = DateTime .now ();
3838 final todayStr = '${today .year .toString ().padLeft (4 , '0' )}-${today .month .toString ().padLeft (2 , '0' )}-${today .day .toString ().padLeft (2 , '0' )}' ;
3939 final match = dailyTemps.firstWhere (
40- (e) => e['date' ] == todayStr,
40+ (e) => e['date' ] == todayStr,
4141 orElse: () => < String , dynamic > {},
4242 );
4343 setState (() {
@@ -57,84 +57,84 @@ class _HomeCapsuleSectionState extends State<HomeCapsuleSection> {
5757 return Expanded (
5858 child: Stack (
5959 children: [
60- // 도넛 차트 영역
61- Positioned (
62- left: 0 ,
63- bottom: MediaQuery .of (context).size.height * 0.05 ,
64- width: MediaQuery .of (context).size.width * 0.95 ,
65- height: MediaQuery .of (context).size.width * 0.95 ,
66- child: Stack (
67- clipBehavior: Clip .none,
68- children: [
69- Align (
70- alignment: Alignment .centerLeft,
71- child: GestureDetector (
72- onTap: widget.onGraphTap,
73- child: Transform .translate (
74- offset: Offset (
75- - MediaQuery .of (context).size.width * 0.35 ,
76- 0 ,
77- ),
78- child: OverflowBox (
79- maxWidth: double .infinity,
80- maxHeight: double .infinity,
81- child: CustomPaint (
82- painter: CustomChartPainter (
83- percentages: [15 , 10 , 20 , 20 ],
60+ // 도넛 차트 영역
61+ Positioned (
62+ left: 0 ,
63+ bottom: MediaQuery .of (context).size.height * 0.05 ,
64+ width: MediaQuery .of (context).size.width * 0.95 ,
65+ height: MediaQuery .of (context).size.width * 0.95 ,
66+ child: Stack (
67+ clipBehavior: Clip .none,
68+ children: [
69+ Align (
70+ alignment: Alignment .centerLeft,
71+ child: GestureDetector (
72+ onTap: widget.onGraphTap,
73+ child: Transform .translate (
74+ offset: Offset (
75+ - MediaQuery .of (context).size.width * 0.35 ,
76+ 0 ,
8477 ),
85- size: Size (
86- MediaQuery .of (context).size.width * 0.95 ,
87- MediaQuery .of (context).size.width * 0.95 ,
78+ child: OverflowBox (
79+ maxWidth: double .infinity,
80+ maxHeight: double .infinity,
81+ child: CustomPaint (
82+ painter: CustomChartPainter (
83+ percentages: [15 , 10 , 20 , 20 ],
84+ ),
85+ size: Size (
86+ MediaQuery .of (context).size.width * 0.95 ,
87+ MediaQuery .of (context).size.width * 0.95 ,
88+ ),
89+ ),
8890 ),
8991 ),
9092 ),
9193 ),
92- ),
93- ),
94- // 텍스트 (화면 안에 있음)
95- Positioned (
96- left:
97- MediaQuery .of (context).size.width *
98- 0.04 ,
99- top: 0 ,
100- bottom: 0 ,
101- child: Center (
102- child: isLoading
103- ? const CircularProgressIndicator ()
104- : Row (
105- crossAxisAlignment: CrossAxisAlignment .end,
106- children: [
107- Text (
108- todayTemperature? .toStringAsFixed (1 ) ?? '36.5' ,
109- style: TextStyle (
110- fontSize: 43 ,
111- fontWeight: FontWeight .w800,
112- color: AppColors .ongiOrange,
113- height: 1 ,
114- ),
94+ // 텍스트 (화면 안에 있음)
95+ Positioned (
96+ left:
97+ MediaQuery .of (context).size.width *
98+ 0.04 ,
99+ top: 0 ,
100+ bottom: 0 ,
101+ child: Center (
102+ child: isLoading
103+ ? const CircularProgressIndicator ()
104+ : Row (
105+ crossAxisAlignment: CrossAxisAlignment .end,
106+ children: [
107+ Text (
108+ todayTemperature? .toStringAsFixed (1 ) ?? '36.5' ,
109+ style: TextStyle (
110+ fontSize: 43 ,
111+ fontWeight: FontWeight .w800,
112+ color: AppColors .ongiOrange,
113+ height: 1 ,
115114 ),
116- Text (
117- '℃' ,
118- style : TextStyle (
119- fontSize : 24 ,
120- fontWeight : FontWeight .w800 ,
121- color : AppColors .ongiOrange ,
122- ) ,
115+ ),
116+ Text (
117+ '℃' ,
118+ style : TextStyle (
119+ fontSize : 24 ,
120+ fontWeight : FontWeight .w800 ,
121+ color : AppColors .ongiOrange ,
123122 ),
124- ],
125- ),
126- ),
123+ ),
124+ ],
125+ ),
126+ ),
127+ ),
128+ ],
127129 ),
128- ],
129- ),
130- ),
131- Positioned (
132- right: 0 ,
133- bottom: MediaQuery .of (context).size.height * 0.05 ,
134- child: ButtonColumn (),
135- ),
136- ],
137- ),
130+ ),
131+ Positioned (
132+ right: 0 ,
133+ bottom: MediaQuery .of (context).size.height * 0.05 ,
134+ child: ButtonColumn (),
135+ ),
136+ ],
137+ ),
138138 );
139139 }
140140}
0 commit comments