11import 'package:flutter/material.dart' ;
22import 'package:fl_chart/fl_chart.dart' ;
3+ import 'package:flutter_svg/svg.dart' ;
34import 'package:ongi/core/app_colors.dart' ;
45import 'package:ongi/core/app_light_background.dart' ;
56import 'package:ongi/screens/home/home_ourfamily_text_withoutUser.dart' ;
@@ -50,26 +51,34 @@ class _HomeDegreeGraph extends State<HomeDegreeGraph> {
5051 onTap: widget.onBack ?? () => Navigator .of (context).pop (),
5152 child: Padding (
5253 padding: EdgeInsets .only (
53- left: 32 ,
54- top: MediaQuery .of (context).size.height * 0.08 ,
54+ left: 40 ,
55+ top: MediaQuery .of (context).size.height * 0.06 ,
56+ ),
57+ child: SizedBox (
58+ width: 36 ,
59+ height: 36 ,
60+ child: SvgPicture .asset (
61+ 'assets/images/back_icon_black.svg' ,
62+ ),
5563 ),
56- child: Icon (Icons .arrow_back_ios, color: Colors .black, size: 28 ),
5764 ),
5865 ),
66+ SizedBox (height: MediaQuery .of (context).size.height * 0.025 ),
5967 // 타이틀
6068 const HomeOngiTextWithoutUser (),
6169 // 카드
6270 Padding (
63- padding: const EdgeInsets .symmetric (horizontal: 16 , vertical: 8 ),
71+ padding: const EdgeInsets .symmetric (
72+ horizontal: 16 ,
73+ vertical: 8 ,
74+ ),
6475 child: Container (
6576 decoration: BoxDecoration (
6677 color: Colors .white,
6778 borderRadius: BorderRadius .circular (24 ),
6879 ),
6980 padding: const EdgeInsets .all (20 ),
70- child: showHistory
71- ? _buildHistoryList ()
72- : _buildGraphCard (),
81+ child: showHistory ? _buildHistoryList () : _buildGraphCard (),
7382 ),
7483 ),
7584 ],
@@ -101,18 +110,17 @@ class _HomeDegreeGraph extends State<HomeDegreeGraph> {
101110 show: true ,
102111 drawVerticalLine: false ,
103112 horizontalInterval: 0.5 ,
104- getDrawingHorizontalLine: (value) => FlLine (
105- color: Colors .grey[300 ],
106- strokeWidth: 1 ,
107- ),
113+ getDrawingHorizontalLine: (value) =>
114+ FlLine (color: Colors .grey[300 ], strokeWidth: 1 ),
108115 ),
109116 titlesData: FlTitlesData (
110117 leftTitles: AxisTitles (
111118 sideTitles: SideTitles (
112119 showTitles: true ,
113120 interval: 0.5 ,
114121 getTitlesWidget: (value, meta) {
115- if (value == 35.2 || value == 40.5 ) return const SizedBox .shrink ();
122+ if (value == 35.2 || value == 40.5 )
123+ return const SizedBox .shrink ();
116124 return Text (
117125 value.toStringAsFixed (1 ),
118126 style: const TextStyle (
@@ -131,7 +139,8 @@ class _HomeDegreeGraph extends State<HomeDegreeGraph> {
131139 getTitlesWidget: (value, meta) {
132140 if (value % 1 != 0 ) return const SizedBox .shrink ();
133141 int idx = value.toInt ();
134- if (idx < 0 || idx >= dates.length) return const SizedBox .shrink ();
142+ if (idx < 0 || idx >= dates.length)
143+ return const SizedBox .shrink ();
135144 return Padding (
136145 padding: const EdgeInsets .only (top: 8 ),
137146 child: Text (
@@ -147,12 +156,14 @@ class _HomeDegreeGraph extends State<HomeDegreeGraph> {
147156 interval: 1 ,
148157 ),
149158 ),
150- rightTitles: AxisTitles (sideTitles: SideTitles (showTitles: false )),
151- topTitles: AxisTitles (sideTitles: SideTitles (showTitles: false )),
152- ),
153- borderData: FlBorderData (
154- show: false ,
159+ rightTitles: AxisTitles (
160+ sideTitles: SideTitles (showTitles: false ),
161+ ),
162+ topTitles: AxisTitles (
163+ sideTitles: SideTitles (showTitles: false ),
164+ ),
155165 ),
166+ borderData: FlBorderData (show: false ),
156167 lineBarsData: [
157168 LineChartBarData (
158169 spots: spots,
@@ -162,12 +173,13 @@ class _HomeDegreeGraph extends State<HomeDegreeGraph> {
162173 isStrokeCapRound: true ,
163174 dotData: FlDotData (
164175 show: true ,
165- getDotPainter: (spot, percent, bar, index) => FlDotCirclePainter (
166- radius: 3 ,
167- color: Colors .white,
168- strokeWidth: 2.5 ,
169- strokeColor: Colors .orange,
170- ),
176+ getDotPainter: (spot, percent, bar, index) =>
177+ FlDotCirclePainter (
178+ radius: 3 ,
179+ color: Colors .white,
180+ strokeWidth: 2.5 ,
181+ strokeColor: Colors .orange,
182+ ),
171183 ),
172184 ),
173185 ],
@@ -223,11 +235,7 @@ class _HomeDegreeGraph extends State<HomeDegreeGraph> {
223235 ),
224236 ),
225237 if (idx != history.length - 1 )
226- Container (
227- width: 2 ,
228- height: 24 ,
229- color: Colors .orange,
230- ),
238+ Container (width: 2 , height: 24 , color: Colors .orange),
231239 ],
232240 ),
233241 const SizedBox (width: 8 ),
0 commit comments