2024-11-10 14:56:09 +00:00
|
|
|
import 'dart:math' as math;
|
|
|
|
|
2024-11-10 13:48:42 +00:00
|
|
|
import 'package:collection/collection.dart';
|
2024-11-10 04:41:56 +00:00
|
|
|
import 'package:dropdown_button2/dropdown_button2.dart';
|
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
|
|
|
import 'package:flutter/gestures.dart';
|
2024-11-09 17:34:58 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2024-11-10 04:41:56 +00:00
|
|
|
import 'package:gap/gap.dart';
|
|
|
|
import 'package:go_router/go_router.dart';
|
2024-11-10 08:41:11 +00:00
|
|
|
import 'package:image_picker/image_picker.dart';
|
2024-11-10 04:41:56 +00:00
|
|
|
import 'package:material_symbols_icons/symbols.dart';
|
2024-11-21 16:28:29 +00:00
|
|
|
import 'package:pasteboard/pasteboard.dart';
|
2024-11-10 04:41:56 +00:00
|
|
|
import 'package:styled_widget/styled_widget.dart';
|
2024-11-11 13:30:05 +00:00
|
|
|
import 'package:surface/controllers/post_write_controller.dart';
|
2024-11-10 04:41:56 +00:00
|
|
|
import 'package:surface/providers/sn_network.dart';
|
|
|
|
import 'package:surface/types/post.dart';
|
|
|
|
import 'package:surface/widgets/account/account_image.dart';
|
2024-11-10 10:37:34 +00:00
|
|
|
import 'package:surface/widgets/loading_indicator.dart';
|
|
|
|
import 'package:surface/widgets/post/post_item.dart';
|
2024-11-10 08:41:11 +00:00
|
|
|
import 'package:surface/widgets/post/post_media_pending_list.dart';
|
2024-11-10 04:41:56 +00:00
|
|
|
import 'package:surface/widgets/post/post_meta_editor.dart';
|
2024-11-10 08:41:11 +00:00
|
|
|
import 'package:surface/widgets/dialog.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
2024-11-09 17:34:58 +00:00
|
|
|
|
2024-11-10 04:41:56 +00:00
|
|
|
class PostEditorScreen extends StatefulWidget {
|
|
|
|
final String mode;
|
2024-11-10 10:37:34 +00:00
|
|
|
final int? postEditId;
|
|
|
|
final int? postReplyId;
|
|
|
|
final int? postRepostId;
|
|
|
|
const PostEditorScreen({
|
|
|
|
super.key,
|
|
|
|
required this.mode,
|
|
|
|
required this.postEditId,
|
|
|
|
required this.postReplyId,
|
|
|
|
required this.postRepostId,
|
|
|
|
});
|
2024-11-10 04:41:56 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
State<PostEditorScreen> createState() => _PostEditorScreenState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _PostEditorScreenState extends State<PostEditorScreen> {
|
2024-11-11 13:30:05 +00:00
|
|
|
final PostWriteController _writeController = PostWriteController();
|
2024-11-10 04:41:56 +00:00
|
|
|
|
2024-11-11 13:30:05 +00:00
|
|
|
bool _isFetching = false;
|
|
|
|
bool get _isLoading => _isFetching || _writeController.isLoading;
|
2024-11-10 04:41:56 +00:00
|
|
|
|
|
|
|
List<SnPublisher>? _publishers;
|
|
|
|
|
2024-11-10 10:37:34 +00:00
|
|
|
Future<void> _fetchPublishers() async {
|
2024-11-11 13:30:05 +00:00
|
|
|
setState(() => _isFetching = true);
|
2024-11-10 08:52:24 +00:00
|
|
|
|
2024-11-10 04:41:56 +00:00
|
|
|
try {
|
2024-11-11 13:30:05 +00:00
|
|
|
final sn = context.read<SnNetworkProvider>();
|
|
|
|
final resp = await sn.client.get('/cgi/co/publishers');
|
|
|
|
_publishers = List<SnPublisher>.from(
|
|
|
|
resp.data?.map((e) => SnPublisher.fromJson(e)) ?? [],
|
2024-11-10 10:37:34 +00:00
|
|
|
);
|
2024-11-11 13:30:05 +00:00
|
|
|
_writeController.setPublisher(_publishers?.firstOrNull);
|
2024-11-10 04:41:56 +00:00
|
|
|
} catch (err) {
|
2024-11-10 08:52:24 +00:00
|
|
|
if (!mounted) return;
|
2024-11-10 04:41:56 +00:00
|
|
|
context.showErrorDialog(err);
|
|
|
|
} finally {
|
2024-11-11 13:30:05 +00:00
|
|
|
setState(() => _isFetching = false);
|
2024-11-10 04:41:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void _updateMeta() {
|
2024-11-11 13:30:05 +00:00
|
|
|
showModalBottomSheet(
|
2024-11-10 04:41:56 +00:00
|
|
|
context: context,
|
2024-11-11 13:30:05 +00:00
|
|
|
builder: (context) => PostMetaEditor(controller: _writeController),
|
2024-11-10 04:41:56 +00:00
|
|
|
useRootNavigator: true,
|
2024-11-11 13:30:05 +00:00
|
|
|
);
|
2024-11-10 04:41:56 +00:00
|
|
|
}
|
|
|
|
|
2024-11-10 08:41:11 +00:00
|
|
|
final _imagePicker = ImagePicker();
|
|
|
|
|
|
|
|
void _selectMedia() async {
|
|
|
|
final result = await _imagePicker.pickMultipleMedia();
|
|
|
|
if (result.isEmpty) return;
|
2024-11-11 13:30:05 +00:00
|
|
|
_writeController.addAttachments(
|
|
|
|
result.map((e) => PostWriteMedia.fromFile(e)),
|
|
|
|
);
|
2024-11-10 08:41:11 +00:00
|
|
|
}
|
|
|
|
|
2024-11-21 16:28:29 +00:00
|
|
|
void _pasteMedia() async {
|
|
|
|
final imageBytes = await Pasteboard.image;
|
|
|
|
if (imageBytes == null) return;
|
|
|
|
_writeController.addAttachments([
|
|
|
|
PostWriteMedia.fromBytes(
|
|
|
|
imageBytes,
|
|
|
|
'attachmentPastedImage'.tr(),
|
|
|
|
PostWriteMediaType.image,
|
|
|
|
),
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
2024-11-10 04:41:56 +00:00
|
|
|
@override
|
|
|
|
void dispose() {
|
2024-11-11 13:30:05 +00:00
|
|
|
_writeController.dispose();
|
2024-11-10 04:41:56 +00:00
|
|
|
super.dispose();
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
2024-11-11 13:30:05 +00:00
|
|
|
if (!PostWriteController.kTitleMap.keys.contains(widget.mode)) {
|
2024-11-10 04:41:56 +00:00
|
|
|
context.showErrorDialog('Unknown post type');
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
_fetchPublishers();
|
2024-11-11 13:30:05 +00:00
|
|
|
_writeController.fetchRelatedPost(
|
|
|
|
context,
|
|
|
|
editing: widget.postEditId,
|
|
|
|
replying: widget.postReplyId,
|
|
|
|
reposting: widget.postRepostId,
|
|
|
|
);
|
2024-11-10 04:41:56 +00:00
|
|
|
}
|
2024-11-09 17:34:58 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2024-11-11 13:30:05 +00:00
|
|
|
return ListenableBuilder(
|
|
|
|
listenable: _writeController,
|
|
|
|
builder: (context, _) {
|
2024-11-14 14:21:13 +00:00
|
|
|
return Scaffold(
|
2024-11-11 13:30:05 +00:00
|
|
|
appBar: AppBar(
|
|
|
|
leading: BackButton(
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
flexibleSpace: Column(
|
|
|
|
children: [
|
|
|
|
Text(_writeController.title.isNotEmpty
|
|
|
|
? _writeController.title
|
|
|
|
: 'untitled'.tr())
|
|
|
|
.textStyle(Theme.of(context).textTheme.titleLarge!)
|
|
|
|
.textColor(Colors.white),
|
|
|
|
Text(PostWriteController.kTitleMap[widget.mode]!)
|
|
|
|
.tr()
|
|
|
|
.textColor(Colors.white.withAlpha((255 * 0.9).round())),
|
|
|
|
],
|
|
|
|
).padding(top: math.max(MediaQuery.of(context).padding.top, 8)),
|
|
|
|
actions: [
|
|
|
|
IconButton(
|
|
|
|
icon: const Icon(Symbols.tune),
|
|
|
|
onPressed: _writeController.isBusy ? null : _updateMeta,
|
|
|
|
),
|
2024-11-24 12:23:06 +00:00
|
|
|
const Gap(8),
|
2024-11-11 13:30:05 +00:00
|
|
|
],
|
2024-11-10 04:41:56 +00:00
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
body: Column(
|
|
|
|
children: [
|
|
|
|
DropdownButtonHideUnderline(
|
|
|
|
child: DropdownButton2<SnPublisher>(
|
|
|
|
isExpanded: true,
|
|
|
|
hint: Text(
|
|
|
|
'fieldPostPublisher',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 14,
|
|
|
|
color: Theme.of(context).hintColor,
|
|
|
|
),
|
|
|
|
).tr(),
|
|
|
|
items: <DropdownMenuItem<SnPublisher>>[
|
|
|
|
...(_publishers?.map(
|
|
|
|
(item) => DropdownMenuItem<SnPublisher>(
|
|
|
|
enabled: _writeController.editingPost == null,
|
|
|
|
value: item,
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
AccountImage(content: item.avatar, radius: 16),
|
|
|
|
const Gap(8),
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(item.nick).textStyle(
|
|
|
|
Theme.of(context)
|
|
|
|
.textTheme
|
|
|
|
.bodyMedium!),
|
|
|
|
Text('@${item.name}')
|
|
|
|
.textStyle(Theme.of(context)
|
|
|
|
.textTheme
|
|
|
|
.bodySmall!)
|
|
|
|
.fontSize(12),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
) ??
|
|
|
|
[]),
|
|
|
|
DropdownMenuItem<SnPublisher>(
|
|
|
|
value: null,
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
CircleAvatar(
|
|
|
|
radius: 16,
|
|
|
|
backgroundColor: Colors.transparent,
|
|
|
|
foregroundColor:
|
|
|
|
Theme.of(context).colorScheme.onSurface,
|
|
|
|
child: const Icon(Symbols.add),
|
|
|
|
),
|
|
|
|
const Gap(8),
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text('publishersNew').tr().textStyle(
|
|
|
|
Theme.of(context).textTheme.bodyMedium!),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
value: _writeController.publisher,
|
|
|
|
onChanged: (SnPublisher? value) {
|
|
|
|
if (value == null) {
|
|
|
|
GoRouter.of(context)
|
|
|
|
.pushNamed('accountPublisherNew')
|
|
|
|
.then((value) {
|
|
|
|
if (value == true) {
|
|
|
|
_publishers = null;
|
|
|
|
_fetchPublishers();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
_writeController.setPublisher(value);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
buttonStyleData: const ButtonStyleData(
|
|
|
|
padding: EdgeInsets.only(right: 16),
|
|
|
|
height: 48,
|
|
|
|
),
|
|
|
|
menuItemStyleData: const MenuItemStyleData(
|
|
|
|
height: 48,
|
|
|
|
),
|
2024-11-10 04:41:56 +00:00
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
),
|
|
|
|
const Divider(height: 1),
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
padding: EdgeInsets.only(bottom: 8),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
// Replying Notice
|
|
|
|
if (_writeController.replyingPost != null)
|
|
|
|
Column(
|
2024-11-10 04:41:56 +00:00
|
|
|
children: [
|
2024-11-11 13:30:05 +00:00
|
|
|
Theme(
|
|
|
|
data: Theme.of(context).copyWith(
|
|
|
|
dividerColor: Colors.transparent,
|
|
|
|
),
|
|
|
|
child: ExpansionTile(
|
|
|
|
minTileHeight: 48,
|
|
|
|
leading:
|
|
|
|
const Icon(Symbols.reply).padding(left: 4),
|
|
|
|
title: Text('postReplyingNotice')
|
|
|
|
.fontSize(15)
|
|
|
|
.tr(args: [
|
|
|
|
'@${_writeController.replyingPost!.publisher.name}'
|
|
|
|
]),
|
|
|
|
children: <Widget>[
|
|
|
|
PostItem(data: _writeController.replyingPost!)
|
2024-11-10 04:41:56 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
const Divider(height: 1),
|
2024-11-10 04:41:56 +00:00
|
|
|
],
|
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
// Reposting Notice
|
|
|
|
if (_writeController.repostingPost != null)
|
|
|
|
Column(
|
2024-11-10 04:41:56 +00:00
|
|
|
children: [
|
2024-11-11 13:30:05 +00:00
|
|
|
Theme(
|
|
|
|
data: Theme.of(context).copyWith(
|
|
|
|
dividerColor: Colors.transparent,
|
|
|
|
),
|
|
|
|
child: ExpansionTile(
|
|
|
|
minTileHeight: 48,
|
|
|
|
leading: const Icon(Symbols.forward)
|
|
|
|
.padding(left: 4),
|
|
|
|
title: Text('postRepostingNotice')
|
|
|
|
.fontSize(15)
|
|
|
|
.tr(args: [
|
|
|
|
'@${_writeController.repostingPost!.publisher.name}'
|
|
|
|
]),
|
|
|
|
children: <Widget>[
|
|
|
|
PostItem(
|
2024-11-23 10:04:30 +00:00
|
|
|
data: _writeController.repostingPost!,
|
|
|
|
)
|
2024-11-11 13:30:05 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const Divider(height: 1),
|
2024-11-10 04:41:56 +00:00
|
|
|
],
|
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
// Editing Notice
|
|
|
|
if (_writeController.editingPost != null)
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
Theme(
|
|
|
|
data: Theme.of(context).copyWith(
|
|
|
|
dividerColor: Colors.transparent,
|
|
|
|
),
|
|
|
|
child: ExpansionTile(
|
|
|
|
minTileHeight: 48,
|
|
|
|
leading: const Icon(Symbols.edit_note)
|
|
|
|
.padding(left: 4),
|
|
|
|
title: Text('postEditingNotice')
|
|
|
|
.fontSize(15)
|
|
|
|
.tr(args: [
|
|
|
|
'@${_writeController.editingPost!.publisher.name}'
|
|
|
|
]),
|
|
|
|
children: <Widget>[
|
|
|
|
PostItem(data: _writeController.editingPost!)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
const Divider(height: 1),
|
|
|
|
],
|
2024-11-10 12:07:26 +00:00
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
// Content Input Area
|
|
|
|
TextField(
|
|
|
|
controller: _writeController.contentController,
|
|
|
|
maxLines: null,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
hintText: 'fieldPostContent'.tr(),
|
|
|
|
hintStyle: TextStyle(fontSize: 14),
|
|
|
|
isCollapsed: true,
|
|
|
|
contentPadding: const EdgeInsets.symmetric(
|
|
|
|
horizontal: 16,
|
2024-11-10 12:07:26 +00:00
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
border: InputBorder.none,
|
2024-11-10 12:07:26 +00:00
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
onTapOutside: (_) =>
|
|
|
|
FocusManager.instance.primaryFocus?.unfocus(),
|
2024-11-11 14:43:09 +00:00
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
]
|
|
|
|
.expandIndexed(
|
|
|
|
(idx, ele) => [
|
|
|
|
if (idx != 0 || _writeController.isRelatedNull)
|
|
|
|
const Gap(8),
|
|
|
|
ele,
|
|
|
|
],
|
|
|
|
)
|
|
|
|
.toList(),
|
|
|
|
),
|
|
|
|
),
|
2024-11-10 04:41:56 +00:00
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
if (_writeController.attachments.isNotEmpty)
|
|
|
|
PostMediaPendingList(
|
2024-11-23 09:32:48 +00:00
|
|
|
attachments: _writeController.attachments,
|
|
|
|
isBusy: _writeController.isBusy,
|
|
|
|
onUpdate: (int idx, PostWriteMedia updatedMedia) async {
|
|
|
|
_writeController.setIsBusy(true);
|
|
|
|
try {
|
|
|
|
_writeController.setAttachmentAt(idx, updatedMedia);
|
|
|
|
} finally {
|
|
|
|
_writeController.setIsBusy(false);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onRemove: (int idx) async {
|
|
|
|
_writeController.setIsBusy(true);
|
|
|
|
try {
|
|
|
|
_writeController.removeAttachmentAt(idx);
|
|
|
|
} finally {
|
|
|
|
_writeController.setIsBusy(false);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onUpdateBusy: (state) => _writeController.setIsBusy(state),
|
2024-11-11 13:30:05 +00:00
|
|
|
).padding(bottom: 8),
|
|
|
|
Material(
|
|
|
|
elevation: 2,
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
2024-11-10 04:41:56 +00:00
|
|
|
children: [
|
2024-11-11 13:30:05 +00:00
|
|
|
LoadingIndicator(isActive: _isLoading),
|
|
|
|
if (_writeController.isBusy &&
|
|
|
|
_writeController.progress != null)
|
|
|
|
TweenAnimationBuilder<double>(
|
|
|
|
tween: Tween(begin: 0, end: _writeController.progress),
|
|
|
|
duration: Duration(milliseconds: 300),
|
|
|
|
builder: (context, value, _) =>
|
|
|
|
LinearProgressIndicator(value: value, minHeight: 2),
|
|
|
|
)
|
|
|
|
else if (_writeController.isBusy)
|
|
|
|
const LinearProgressIndicator(value: null, minHeight: 2),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: ScrollConfiguration(
|
|
|
|
behavior: _PostEditorActionScrollBehavior(),
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
child: Row(
|
|
|
|
children: [
|
2024-11-21 16:28:29 +00:00
|
|
|
PopupMenuButton(
|
2024-11-11 13:30:05 +00:00
|
|
|
icon: Icon(
|
|
|
|
Symbols.add_photo_alternate,
|
|
|
|
color:
|
|
|
|
Theme.of(context).colorScheme.primary,
|
|
|
|
),
|
2024-11-21 16:28:29 +00:00
|
|
|
itemBuilder: (context) => [
|
|
|
|
PopupMenuItem(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
const Icon(Symbols.photo_library),
|
|
|
|
const Gap(16),
|
|
|
|
Text('addAttachmentFromAlbum').tr(),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
_selectMedia();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
PopupMenuItem(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
const Icon(Symbols.content_paste),
|
|
|
|
const Gap(16),
|
|
|
|
Text('addAttachmentFromClipboard')
|
|
|
|
.tr(),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
_pasteMedia();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
2024-11-11 13:30:05 +00:00
|
|
|
),
|
|
|
|
],
|
2024-11-10 04:41:56 +00:00
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
),
|
2024-11-10 04:41:56 +00:00
|
|
|
),
|
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
TextButton.icon(
|
|
|
|
onPressed: (_writeController.isBusy ||
|
|
|
|
_writeController.publisher == null)
|
|
|
|
? null
|
2024-11-11 14:43:09 +00:00
|
|
|
: () {
|
|
|
|
_writeController.post(context).then((_) {
|
|
|
|
if (!context.mounted) return;
|
|
|
|
Navigator.pop(context, true);
|
|
|
|
});
|
|
|
|
},
|
2024-11-11 13:30:05 +00:00
|
|
|
icon: const Icon(Symbols.send),
|
|
|
|
label: Text('postPublish').tr(),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
).padding(horizontal: 16),
|
2024-11-10 04:41:56 +00:00
|
|
|
],
|
2024-11-11 13:30:05 +00:00
|
|
|
).padding(
|
|
|
|
bottom: MediaQuery.of(context).padding.bottom,
|
|
|
|
top: 4,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
2024-11-10 04:41:56 +00:00
|
|
|
),
|
2024-11-11 13:30:05 +00:00
|
|
|
);
|
|
|
|
},
|
2024-11-10 04:41:56 +00:00
|
|
|
);
|
2024-11-09 17:34:58 +00:00
|
|
|
}
|
|
|
|
}
|
2024-11-10 04:41:56 +00:00
|
|
|
|
|
|
|
class _PostEditorActionScrollBehavior extends MaterialScrollBehavior {
|
|
|
|
@override
|
|
|
|
Set<PointerDeviceKind> get dragDevices => {
|
|
|
|
PointerDeviceKind.touch,
|
|
|
|
PointerDeviceKind.mouse,
|
|
|
|
};
|
|
|
|
}
|