Skip to content

Commit

Permalink
issues fixed (orientation issue , lag , app quit automatically fixed)
Browse files Browse the repository at this point in the history
  • Loading branch information
yassinebot committed Nov 26, 2021
1 parent 437d438 commit 14d1080
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion example/.flutter-plugins-dependencies
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"camera","path":"D:\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\camera-0.8.1\\\\","dependencies":[]}],"android":[{"name":"camera","path":"D:\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\camera-0.8.1\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"camera","dependencies":[]}],"date_created":"2021-11-25 08:13:26.168139","version":"2.0.3"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"camera","path":"D:\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\camera-0.8.1\\\\","dependencies":[]}],"android":[{"name":"camera","path":"D:\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\camera-0.8.1\\\\","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"camera","dependencies":[]}],"date_created":"2021-11-26 08:09:42.771618","version":"2.0.3"}
13 changes: 8 additions & 5 deletions lib/src/presentation/camera_page.dart
Expand Up @@ -86,11 +86,15 @@ class _CameraCameraState extends State<CameraCamera> {
initialData: CameraStatusEmpty(),
builder: (_, snapshot) => snapshot.data!.when(
preview: (controller) => Stack(
fit: StackFit.passthrough,
children: [
CameraCameraPreviewWidg(
widget: widget,
controller: controller,
),
Container(
width: double.infinity,
height: double.infinity,
child: CameraCameraPreviewWidg(
widget: widget,
controller: controller,
)),
if (bloc.status.preview.cameras.length > 1)
FlipCamera(bloc: bloc)
],
Expand All @@ -107,7 +111,6 @@ class _CameraCameraState extends State<CameraCamera> {
}
}


class CameraCameraPreviewWidg extends StatelessWidget {
final CameraCameraController controller;
const CameraCameraPreviewWidg({
Expand Down
32 changes: 16 additions & 16 deletions lib/src/presentation/widgets/floating_buttons/zoom_button.dart
Expand Up @@ -16,23 +16,23 @@ class ZoomButton extends StatelessWidget {
alignment: Alignment.bottomCenter,
child: Padding(
padding: const EdgeInsets.only(bottom: 10.0),
child: Container(
height: 40,
width: 40,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.black.withOpacity(0.6),
),
child: IconButton(
icon: Center(
child: Text(
"${zoomLevel.toStringAsFixed(1)}x",
style: TextStyle(color: Colors.white, fontSize: 12),
),
child: InkWell(
onTap: () {
controller.zoomChange();
},
child: Container(
height: 40,
width: 40,
alignment: Alignment.center,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.black.withOpacity(0.6),
),
child: Text(
"${zoomLevel.toStringAsFixed(1)}x",
style: TextStyle(color: Colors.white, fontSize: 12),
textAlign: TextAlign.center,
),
onPressed: () {
controller.zoomChange();
},
),
),
),
Expand Down

0 comments on commit 14d1080

Please sign in to comment.