Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,33 @@ class SelectCameraActionDialog extends StatelessWidget {
return SizedBox(
height: 150,
width: double.infinity,
child: SingleChildScrollView(
child: Column(
children: [
ListTile(
title: Text(context.loc.photo),
subtitle: Text(
context.loc.takeAPhotoUsingYourCamera,
child: SafeArea(
top: false,
left: false,
right: false,
child: SingleChildScrollView(
child: Column(
children: [
ListTile(
title: Text(context.loc.photo),
subtitle: Text(
context.loc.takeAPhotoUsingYourCamera,
),
leading: const Icon(Icons.photo_sharp),
enabled: !isDesktopApp,
onTap: () => Navigator.of(context).pop(CameraAction.image),
),
leading: const Icon(Icons.photo_sharp),
enabled: !isDesktopApp,
onTap: () => Navigator.of(context).pop(CameraAction.image),
),
ListTile(
title: Text(context.loc.video),
subtitle: Text(
context.loc.recordAVideoUsingYourCamera,
ListTile(
title: Text(context.loc.video),
subtitle: Text(
context.loc.recordAVideoUsingYourCamera,
),
leading: const Icon(Icons.camera),
enabled: !isDesktopApp,
onTap: () => Navigator.of(context).pop(CameraAction.video),
),
leading: const Icon(Icons.camera),
enabled: !isDesktopApp,
onTap: () => Navigator.of(context).pop(CameraAction.video),
),
],
],
),
),
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,40 @@ class SelectImageSourceDialog extends StatelessWidget {
return Container(
constraints: const BoxConstraints(minHeight: 200),
width: double.infinity,
child: SingleChildScrollView(
child: Column(
children: [
ListTile(
title: Text(context.loc.gallery),
subtitle: Text(
context.loc.pickAPhotoFromYourGallery,
child: SafeArea(
top: false,
left: false,
right: false,
child: SingleChildScrollView(
child: Column(
children: [
ListTile(
title: Text(context.loc.gallery),
subtitle: Text(
context.loc.pickAPhotoFromYourGallery,
),
leading: const Icon(Icons.photo_sharp),
onTap: () => Navigator.of(context).pop(InsertImageSource.gallery),
),
leading: const Icon(Icons.photo_sharp),
onTap: () => Navigator.of(context).pop(InsertImageSource.gallery),
),
ListTile(
title: Text(context.loc.camera),
subtitle: Text(
context.loc.takeAPhotoUsingYourCamera,
ListTile(
title: Text(context.loc.camera),
subtitle: Text(
context.loc.takeAPhotoUsingYourCamera,
),
leading: const Icon(Icons.camera),
enabled: !isDesktopApp,
onTap: () => Navigator.of(context).pop(InsertImageSource.camera),
),
leading: const Icon(Icons.camera),
enabled: !isDesktopApp,
onTap: () => Navigator.of(context).pop(InsertImageSource.camera),
),
ListTile(
title: Text(context.loc.link),
subtitle: Text(
context.loc.pasteAPhotoUsingALink,
ListTile(
title: Text(context.loc.link),
subtitle: Text(
context.loc.pasteAPhotoUsingALink,
),
leading: const Icon(Icons.link),
onTap: () => Navigator.of(context).pop(InsertImageSource.link),
),
leading: const Icon(Icons.link),
onTap: () => Navigator.of(context).pop(InsertImageSource.link),
),
],
],
),
),
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,38 @@ class SelectVideoSourceDialog extends StatelessWidget {
return Container(
constraints: const BoxConstraints(minHeight: 200),
width: double.infinity,
child: SingleChildScrollView(
child: Column(
children: [
ListTile(
title: Text(context.loc.gallery),
subtitle: Text(
context.loc.pickAVideoFromYourGallery,
child: SafeArea(
top: false,
left: false,
right: false,
child: SingleChildScrollView(
child: Column(
children: [
ListTile(
title: Text(context.loc.gallery),
subtitle: Text(
context.loc.pickAVideoFromYourGallery,
),
leading: const Icon(Icons.photo_sharp),
onTap: () => Navigator.of(context).pop(InsertVideoSource.gallery),
),
leading: const Icon(Icons.photo_sharp),
onTap: () => Navigator.of(context).pop(InsertVideoSource.gallery),
),
ListTile(
title: Text(context.loc.camera),
subtitle: Text(context.loc.recordAVideoUsingYourCamera),
leading: const Icon(Icons.camera),
enabled: !isDesktopApp,
onTap: () => Navigator.of(context).pop(InsertVideoSource.camera),
),
ListTile(
title: Text(context.loc.link),
subtitle: Text(
context.loc.pasteAVideoUsingALink,
ListTile(
title: Text(context.loc.camera),
subtitle: Text(context.loc.recordAVideoUsingYourCamera),
leading: const Icon(Icons.camera),
enabled: !isDesktopApp,
onTap: () => Navigator.of(context).pop(InsertVideoSource.camera),
),
leading: const Icon(Icons.link),
onTap: () => Navigator.of(context).pop(InsertVideoSource.link),
),
],
ListTile(
title: Text(context.loc.link),
subtitle: Text(
context.loc.pasteAVideoUsingALink,
),
leading: const Icon(Icons.link),
onTap: () => Navigator.of(context).pop(InsertVideoSource.link),
),
],
),
),
),
);
Expand Down
46 changes: 27 additions & 19 deletions lib/src/editor/widgets/link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -228,25 +228,33 @@ Future<LinkMenuAction> _showMaterialMenu(
final result = await showModalBottomSheet<LinkMenuAction>(
context: context,
builder: (ctx) {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
_MaterialAction(
title: context.loc.open,
icon: Icons.language_sharp,
onPressed: () => Navigator.of(context).pop(LinkMenuAction.launch),
),
_MaterialAction(
title: context.loc.copy,
icon: Icons.copy_sharp,
onPressed: () => Navigator.of(context).pop(LinkMenuAction.copy),
),
_MaterialAction(
title: context.loc.remove,
icon: Icons.link_off_sharp,
onPressed: () => Navigator.of(context).pop(LinkMenuAction.remove),
),
],
return SafeArea(
top: false,
left: false,
right: false,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
_MaterialAction(
title: context.loc.open,
icon: Icons.language_sharp,
onPressed: () =>
Navigator.of(context).pop(LinkMenuAction.launch),
),
_MaterialAction(
title: context.loc.copy,
icon: Icons.copy_sharp,
onPressed: () =>
Navigator.of(context).pop(LinkMenuAction.copy),
),
_MaterialAction(
title: context.loc.remove,
icon: Icons.link_off_sharp,
onPressed: () =>
Navigator.of(context).pop(LinkMenuAction.remove),
),
],
),
);
},
);
Expand Down
Loading