@@ -841,23 +841,20 @@ steps:
841
841
class LineChartPainter extends CustomPainter {
842
842
@override
843
843
void paint(Canvas canvas, Size size) {
844
- final axisPaint =
845
- Paint()
846
- ..color = Colors.black
847
- ..strokeWidth = 2
848
- ..style = PaintingStyle.stroke;
844
+ final axisPaint = Paint()
845
+ ..color = Colors.black
846
+ ..strokeWidth = 2
847
+ ..style = PaintingStyle.stroke;
849
848
850
- final dataPaint =
851
- Paint()
852
- ..color = Colors.blue
853
- ..strokeWidth = 2
854
- ..style = PaintingStyle.stroke;
849
+ final dataPaint = Paint()
850
+ ..color = Colors.blue
851
+ ..strokeWidth = 2
852
+ ..style = PaintingStyle.stroke;
855
853
856
- final markingLinePaint =
857
- Paint()
858
- ..color = Colors.red
859
- ..strokeWidth = 2
860
- ..style = PaintingStyle.stroke;
854
+ final markingLinePaint = Paint()
855
+ ..color = Colors.red
856
+ ..strokeWidth = 2
857
+ ..style = PaintingStyle.stroke;
861
858
862
859
final mockDataPoints = [
863
860
const Offset(15, 155),
@@ -872,16 +869,14 @@ steps:
872
869
const Offset(200, -10),
873
870
];
874
871
875
- final axis =
876
- Path()
877
- ..moveTo(0, 0)
878
- ..lineTo(0, size.height)
879
- ..lineTo(size.width, size.height);
872
+ final axis = Path()
873
+ ..moveTo(0, 0)
874
+ ..lineTo(0, size.height)
875
+ ..lineTo(size.width, size.height);
880
876
881
- final markingLine =
882
- Path()
883
- ..moveTo(-10, 50)
884
- ..lineTo(size.width + 10, 50);
877
+ final markingLine = Path()
878
+ ..moveTo(-10, 50)
879
+ ..lineTo(size.width + 10, 50);
885
880
886
881
final data = Path()..moveTo(1, 180);
887
882
@@ -970,10 +965,9 @@ steps:
970
965
return MaterialApp(
971
966
theme: ThemeData(
972
967
appBarTheme: AppBarTheme(
973
- backgroundColor:
974
- ColorScheme.fromSeed(
975
- seedColor: Colors.deepPurple,
976
- ).primaryContainer,
968
+ backgroundColor: ColorScheme.fromSeed(
969
+ seedColor: Colors.deepPurple,
970
+ ).primaryContainer,
977
971
),
978
972
textTheme: const TextTheme(
979
973
titleMedium: TextStyle(fontFamily: 'Chewy', fontSize: 20),
@@ -1999,7 +1993,7 @@ steps:
1999
1993
2000
1994
import 'home_screen.dart';
2001
1995
import 'news_data.dart';
2002
- @@ -13,23 +15,34 @@ class ArticleScreen extends StatefulWidget {
1996
+ @@ -13,23 +15,33 @@ class ArticleScreen extends StatefulWidget {
2003
1997
}
2004
1998
2005
1999
class _ArticleScreenState extends State<ArticleScreen> {
@@ -2034,10 +2028,9 @@ steps:
2034
2028
+ const LineChart(),
2035
2029
+ key: 'filename',
2036
2030
+ logicalSize: _globalKey.currentContext!.size!,
2037
- + pixelRatio:
2038
- + MediaQuery.of(
2039
- + _globalKey.currentContext!,
2040
- + ).devicePixelRatio,
2031
+ + pixelRatio: MediaQuery.of(
2032
+ + _globalKey.currentContext!,
2033
+ + ).devicePixelRatio,
2041
2034
+ )
2042
2035
+ as String;
2043
2036
+ setState(() {
@@ -2047,7 +2040,7 @@ steps:
2047
2040
updateHeadline(widget.article);
2048
2041
},
2049
2042
label: const Text('Update Homescreen'),
2050
- @@ -44,7 +57 ,11 @@ class _ArticleScreenState extends State<ArticleScreen> {
2043
+ @@ -44,7 +56 ,11 @@ class _ArticleScreenState extends State<ArticleScreen> {
2051
2044
const SizedBox(height: 20.0),
2052
2045
Text(widget.article.articleText!),
2053
2046
const SizedBox(height: 20.0),
0 commit comments