@@ -26,7 +26,6 @@ class _CameraScreenState extends State<CameraScreen> {
26
26
late Future <void >
27
27
_initializeControllerFuture; //Future to wait until camera initializes
28
28
int selectedCamera = 1 ;
29
- List <File > capturedImages = [];
30
29
31
30
initializeCamera (int cameraIndex) async {
32
31
_controller = CameraController (
@@ -52,20 +51,26 @@ class _CameraScreenState extends State<CameraScreen> {
52
51
return Scaffold (
53
52
backgroundColor: Colors .blueAccent,
54
53
body: Container (
55
- alignment: Alignment .topCenter,
56
- transform: Matrix4 .rotationY (0 ),
57
- color: Colors .black,
58
- child: FutureBuilder <void >(
59
- future: _initializeControllerFuture,
60
- builder: (context, snapshot) {
61
- if (snapshot.connectionState == ConnectionState .done) {
62
- // If the Future is complete, display the preview.
63
- return CameraPreview (_controller);
64
- } else {
65
- // Otherwise, display a loading indicator.
66
- return const Center (child: CircularProgressIndicator ());
67
- }
68
- },
54
+ child: Container (
55
+ alignment: Alignment .center,
56
+ // transform: Matrix4.rotationY(1),
57
+ color: Colors .black,
58
+ child: FutureBuilder <void >(
59
+ future: _initializeControllerFuture,
60
+ builder: (context, snapshot) {
61
+ if (snapshot.connectionState == ConnectionState .done) {
62
+ // If the Future is complete, display the preview.
63
+ return Container (
64
+ alignment: Alignment .center,
65
+ transform: Matrix4 .rotationZ (0.5 ),
66
+ child: CameraPreview (_controller),
67
+ );
68
+ } else {
69
+ // Otherwise, display a loading indicator.
70
+ return const Center (child: CircularProgressIndicator ());
71
+ }
72
+ },
73
+ ),
69
74
),
70
75
),
71
76
);
0 commit comments