fix: styling take picture
This commit is contained in:
parent
59e046bd92
commit
27ba55314b
|
@ -2,6 +2,7 @@ import 'dart:io';
|
|||
|
||||
import 'package:cims_apps/application/assets/path_assets.dart';
|
||||
import 'package:cims_apps/application/component/button/button_view.dart';
|
||||
import 'package:cims_apps/application/component/custom_app_bar/custom_app_bar.dart';
|
||||
import 'package:cims_apps/application/component/image/image_view.dart';
|
||||
import 'package:cims_apps/application/component/take_picture_screen/take_picture_screen.dart';
|
||||
import 'package:cims_apps/application/theme/color_palette.dart';
|
||||
|
@ -94,10 +95,8 @@ class _DisplayPictureScreenState extends State<DisplayPictureScreen> {
|
|||
return Consumer<SubmissionDataViewModel>(
|
||||
builder: (context, provider, child) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Preview'),
|
||||
automaticallyImplyLeading: false,
|
||||
),
|
||||
appBar: CustomAppBar(
|
||||
height: SizeConfig.height * .08, title: 'Preview'),
|
||||
body: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24.0),
|
||||
child: Column(
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:camera/camera.dart';
|
||||
import 'package:cims_apps/application/assets/path_assets.dart';
|
||||
import 'package:cims_apps/application/component/custom_app_bar/custom_app_bar.dart';
|
||||
import 'package:cims_apps/application/component/image/image_view.dart';
|
||||
import 'package:cims_apps/application/component/take_picture_screen/display_picture_screen.dart';
|
||||
import 'package:cims_apps/core/route/route.dart';
|
||||
|
@ -27,7 +28,6 @@ class TakePictureScreenState extends State<TakePictureScreen> {
|
|||
late String _takeContent;
|
||||
|
||||
Future<void> changeFlash() async {
|
||||
await _controller.setFlashMode(FlashMode.auto);
|
||||
setState(() {
|
||||
isFlash = !isFlash;
|
||||
});
|
||||
|
@ -44,6 +44,7 @@ class TakePictureScreenState extends State<TakePictureScreen> {
|
|||
// Next, initialize the controller. This returns a Future.
|
||||
_initializeControllerFuture = _controller.initialize();
|
||||
_takeContent = widget.takeContent;
|
||||
_controller.setFlashMode(isFlash ? FlashMode.torch : FlashMode.off);
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -57,9 +58,10 @@ class TakePictureScreenState extends State<TakePictureScreen> {
|
|||
Widget build(BuildContext context) {
|
||||
// Fill this out in the next steps.
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Registration'),
|
||||
actions: [
|
||||
appBar: CustomAppBar(
|
||||
title: 'Registration',
|
||||
height: SizeConfig.height * .08,
|
||||
trailing: [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
changeFlash();
|
||||
|
|
Loading…
Reference in New Issue
Block a user