Showing
3 changed files
with
10 additions
and
11 deletions
| @@ -164,8 +164,10 @@ class MyAppState extends State<MyApp> with SingleTickerProviderStateMixin { | @@ -164,8 +164,10 @@ class MyAppState extends State<MyApp> with SingleTickerProviderStateMixin { | ||
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | void _showSources() { | 166 | void _showSources() { |
| 167 | - ul.launch( | 167 | + ul.launchUrl( |
| 168 | + Uri.parse( | ||
| 168 | 'https://github.com/DavBfr/dart_pdf/blob/master/demo/lib/examples/${examples[_tab].file}', | 169 | 'https://github.com/DavBfr/dart_pdf/blob/master/demo/lib/examples/${examples[_tab].file}', |
| 170 | + ), | ||
| 169 | ); | 171 | ); |
| 170 | } | 172 | } |
| 171 | 173 |
| @@ -273,10 +273,6 @@ class _Percent extends pw.StatelessWidget { | @@ -273,10 +273,6 @@ class _Percent extends pw.StatelessWidget { | ||
| 273 | required this.size, | 273 | required this.size, |
| 274 | required this.value, | 274 | required this.value, |
| 275 | required this.title, | 275 | required this.title, |
| 276 | - this.fontSize = 1.2, | ||
| 277 | - this.color = green, | ||
| 278 | - this.backgroundColor = PdfColors.grey300, | ||
| 279 | - this.strokeWidth = 5, | ||
| 280 | }); | 276 | }); |
| 281 | 277 | ||
| 282 | final double size; | 278 | final double size; |
| @@ -285,13 +281,13 @@ class _Percent extends pw.StatelessWidget { | @@ -285,13 +281,13 @@ class _Percent extends pw.StatelessWidget { | ||
| 285 | 281 | ||
| 286 | final pw.Widget title; | 282 | final pw.Widget title; |
| 287 | 283 | ||
| 288 | - final double fontSize; | 284 | + static const fontSize = 1.2; |
| 289 | 285 | ||
| 290 | - final PdfColor color; | 286 | + PdfColor get color => green; |
| 291 | 287 | ||
| 292 | - final PdfColor backgroundColor; | 288 | + static const backgroundColor = PdfColors.grey300; |
| 293 | 289 | ||
| 294 | - final double strokeWidth; | 290 | + static const strokeWidth = 5.0; |
| 295 | 291 | ||
| 296 | @override | 292 | @override |
| 297 | pw.Widget build(pw.Context context) { | 293 | pw.Widget build(pw.Context context) { |
| @@ -27,8 +27,9 @@ class App extends StatelessWidget { | @@ -27,8 +27,9 @@ class App extends StatelessWidget { | ||
| 27 | 27 | ||
| 28 | @override | 28 | @override |
| 29 | Widget build(BuildContext context) { | 29 | Widget build(BuildContext context) { |
| 30 | - const scrollbarTheme = | ||
| 31 | - ScrollbarThemeData(isAlwaysShown: true, showTrackOnHover: true); | 30 | + final scrollbarTheme = ScrollbarThemeData( |
| 31 | + thumbVisibility: MaterialStateProperty.all(true), | ||
| 32 | + ); | ||
| 32 | 33 | ||
| 33 | return MaterialApp( | 34 | return MaterialApp( |
| 34 | theme: ThemeData.light().copyWith(scrollbarTheme: scrollbarTheme), | 35 | theme: ThemeData.light().copyWith(scrollbarTheme: scrollbarTheme), |
-
Please register or login to post a comment