Skip to content

Commit

Permalink
Merge branch 'develop' into Issue942
Browse files Browse the repository at this point in the history
  • Loading branch information
Thuyhaile authored Nov 8, 2023
2 parents c6773bc + 76bf9ee commit 88f5933
Show file tree
Hide file tree
Showing 17 changed files with 117 additions and 549 deletions.
2 changes: 0 additions & 2 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>NSCameraUsageDescription</key>
<string>Appen kræver adgang til dit kamera for at oprette nye piktogrammer.</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
Expand Down
11 changes: 0 additions & 11 deletions lib/blocs/new_citizen_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,6 @@ class NewCitizenBloc extends BlocBase {
});
}

/// pushes an imagePicker screen, then sets the pictogram image,
/// to the selected image from the gallery
void takePictureWithCamera() {
ImagePicker().pickImage(source: ImageSource.camera).then((XFile f) {
if (f != null) {
_publishImage(File(f.path));
_checkInput();
}
});
}

/// pushes an imagePicker screen, then sets the profile picture image,
/// to the selected image from the gallery
void chooseImageFromGallery() {
Expand Down
106 changes: 0 additions & 106 deletions lib/blocs/take_image_with_camera_bloc.dart

This file was deleted.

11 changes: 0 additions & 11 deletions lib/blocs/toolbar_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ class ToolbarBloc extends BlocBase {
case AppBarIcon.burgerMenu:
_iconsToAdd.add(_createIconBurgermenu(callback));
break;
case AppBarIcon.camera:
_iconsToAdd.add(_createIconCamera(callback));
break;
case AppBarIcon.cancel:
_iconsToAdd.add(_createIconCancel(callback));
break;
Expand Down Expand Up @@ -163,14 +160,6 @@ class ToolbarBloc extends BlocBase {
);
}

IconButton _createIconCamera(VoidCallback callback) {
return IconButton(
icon: Image.asset('assets/icons/camera.png'),
tooltip: 'Åbn kamera',
onPressed: callback,
);
}

IconButton _createIconCancel(VoidCallback callback) {
return IconButton(
icon: Image.asset('assets/icons/cancel.png'),
Expand Down
5 changes: 0 additions & 5 deletions lib/bootstrap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import 'package:weekplanner/blocs/new_weekplan_bloc.dart';
import 'package:weekplanner/blocs/pictogram_bloc.dart';
import 'package:weekplanner/blocs/pictogram_image_bloc.dart';
import 'package:weekplanner/blocs/settings_bloc.dart';
import 'package:weekplanner/blocs/take_image_with_camera_bloc.dart';
import 'package:weekplanner/blocs/timer_bloc.dart';
import 'package:weekplanner/blocs/toolbar_bloc.dart';
import 'package:weekplanner/blocs/upload_from_gallery_bloc.dart';
Expand Down Expand Up @@ -110,9 +109,5 @@ class Bootstrap {
di.registerDependency<CopyResolveBloc>(() {
return CopyResolveBloc(di.get<Api>());
});

di.registerDependency<TakePictureWithCameraBloc>(() {
return TakePictureWithCameraBloc(di.get<Api>());
});
}
}
3 changes: 0 additions & 3 deletions lib/models/enums/app_bar_icons_enum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ enum AppBarIcon {
/// Icon for opening burger menu
burgerMenu,

/// Icon for opening camera
camera,

/// Icon for cancelling action
cancel,

Expand Down
11 changes: 6 additions & 5 deletions lib/screens/new_citizen_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,12 @@ class _NewCitizenScreenState extends State<NewCitizenScreen> {
child: StreamBuilder<File>(
stream: widget._bloc.file,
builder: (BuildContext context,
AsyncSnapshot<File> snapshot) =>
snapshot.data != null
? widget._displayImage(snapshot.data)
: widget._displayIfNoImage()),
),

AsyncSnapshot<File> snapshot) =>
snapshot.data != null
? widget._displayImage(snapshot.data)
: widget._displayIfNoImage()),
),
),
],
),
Expand Down
10 changes: 0 additions & 10 deletions lib/screens/pictogram_search_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:flutter/material.dart';
import 'package:weekplanner/blocs/pictogram_bloc.dart';
import 'package:weekplanner/di.dart';
import 'package:weekplanner/routes.dart';
import 'package:weekplanner/screens/take_picture_with_camera_screen.dart';
import 'package:weekplanner/screens/upload_image_from_phone_screen.dart';
import 'package:weekplanner/widgets/bottom_app_bar_button_widget.dart';
import 'package:weekplanner/widgets/giraf_app_bar_widget.dart';
Expand Down Expand Up @@ -148,15 +147,6 @@ class _PictogramSearchState extends State<PictogramSearch> {
context, UploadImageFromPhone());
}
),
BottomAppBarButton(
buttonText: 'Tag billede',
buttonKey: 'TagBilledeButton',
assetPath: 'assets/icons/camera.png',
dialogFunction: (BuildContext context) {
Routes().push(
context, TakePictureWithCamera());
}
)
]
)))
]
Expand Down
Loading

0 comments on commit 88f5933

Please sign in to comment.