Showing
2 changed files
with
10 additions
and
7 deletions
1 | import 'dart:io'; | 1 | import 'dart:io'; |
2 | 2 | ||
3 | import 'package:flutter/material.dart'; | 3 | import 'package:flutter/material.dart'; |
4 | - | ||
5 | import 'preview_screen.dart'; | 4 | import 'preview_screen.dart'; |
6 | 5 | ||
7 | class CapturesScreen extends StatelessWidget { | 6 | class CapturesScreen extends StatelessWidget { |
8 | final List<File> imageFileList; | 7 | final List<File> imageFileList; |
9 | 8 | ||
10 | - const CapturesScreen({required this.imageFileList}); | 9 | + const CapturesScreen({ |
10 | + Key? key, | ||
11 | + required this.imageFileList, | ||
12 | + }) : super(key: key); | ||
11 | 13 | ||
12 | @override | 14 | @override |
13 | Widget build(BuildContext context) { | 15 | Widget build(BuildContext context) { |
14 | return Scaffold( | 16 | return Scaffold( |
15 | backgroundColor: Colors.black, | 17 | backgroundColor: Colors.black, |
16 | body: SingleChildScrollView( | 18 | body: SingleChildScrollView( |
17 | - physics: BouncingScrollPhysics(), | 19 | + physics: const BouncingScrollPhysics(), |
18 | child: Column( | 20 | child: Column( |
19 | crossAxisAlignment: CrossAxisAlignment.start, | 21 | crossAxisAlignment: CrossAxisAlignment.start, |
20 | children: [ | 22 | children: [ |
21 | - Padding( | 23 | + const Padding( |
22 | - padding: const EdgeInsets.all(16.0), | 24 | + padding: EdgeInsets.all(16.0), |
23 | child: Text( | 25 | child: Text( |
24 | 'Captures', | 26 | 'Captures', |
25 | style: TextStyle( | 27 | style: TextStyle( |
... | @@ -30,7 +32,7 @@ class CapturesScreen extends StatelessWidget { | ... | @@ -30,7 +32,7 @@ class CapturesScreen extends StatelessWidget { |
30 | ), | 32 | ), |
31 | GridView.count( | 33 | GridView.count( |
32 | shrinkWrap: true, | 34 | shrinkWrap: true, |
33 | - physics: NeverScrollableScrollPhysics(), | 35 | + physics: const NeverScrollableScrollPhysics(), |
34 | crossAxisCount: 2, | 36 | crossAxisCount: 2, |
35 | children: [ | 37 | children: [ |
36 | for (File imageFile in imageFileList) | 38 | for (File imageFile in imageFileList) | ... | ... |
... | @@ -9,9 +9,10 @@ class PreviewScreen extends StatelessWidget { | ... | @@ -9,9 +9,10 @@ class PreviewScreen extends StatelessWidget { |
9 | final List<File> fileList; | 9 | final List<File> fileList; |
10 | 10 | ||
11 | const PreviewScreen({ | 11 | const PreviewScreen({ |
12 | + Key? key, | ||
12 | required this.imageFile, | 13 | required this.imageFile, |
13 | required this.fileList, | 14 | required this.fileList, |
14 | - }); | 15 | + }) : super(key: key); |
15 | 16 | ||
16 | @override | 17 | @override |
17 | Widget build(BuildContext context) { | 18 | Widget build(BuildContext context) { | ... | ... |
-
Please register or login to post a comment