Remote sync of webdav
This commit is contained in:
parent
f01186df79
commit
483fbeafb6
44 changed files with 4842 additions and 975 deletions
28
lib/widgets/image_source_sheet.dart
Normal file
28
lib/widgets/image_source_sheet.dart
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
|
||||
/// Bottom sheet letting the user pick a photo from the camera or their
|
||||
/// existing library. Shared by any screen that needs to snap or choose a
|
||||
/// photo (receipt capture, VIN scanning) so the choice looks and behaves
|
||||
/// the same everywhere.
|
||||
Future<ImageSource?> chooseImageSource(BuildContext context) {
|
||||
return showModalBottomSheet<ImageSource>(
|
||||
context: context,
|
||||
builder: (context) => SafeArea(
|
||||
child: Wrap(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.camera_alt_outlined),
|
||||
title: const Text('Take Photo'),
|
||||
onTap: () => Navigator.of(context).pop(ImageSource.camera),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.photo_library_outlined),
|
||||
title: const Text('Choose from Gallery'),
|
||||
onTap: () => Navigator.of(context).pop(ImageSource.gallery),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue