chore: Update dependencies
This commit is contained in:
parent
da7e433ea3
commit
7a74a8a93f
52 changed files with 163 additions and 175 deletions
|
|
@ -75,6 +75,13 @@ class ChatInputRow extends StatelessWidget {
|
|||
]
|
||||
: <Widget>[
|
||||
KeyBoardShortcuts(
|
||||
keysToPress: {
|
||||
LogicalKeyboardKey.altLeft,
|
||||
LogicalKeyboardKey.keyA
|
||||
},
|
||||
onKeysPressed: () =>
|
||||
controller.onAddPopupMenuButtonSelected('file'),
|
||||
helpLabel: L10n.of(context)!.sendFile,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
height: 56,
|
||||
|
|
@ -168,18 +175,17 @@ class ChatInputRow extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
keysToPress: {
|
||||
LogicalKeyboardKey.altLeft,
|
||||
LogicalKeyboardKey.keyA
|
||||
},
|
||||
onKeysPressed: () =>
|
||||
controller.onAddPopupMenuButtonSelected('file'),
|
||||
helpLabel: L10n.of(context)!.sendFile,
|
||||
),
|
||||
Container(
|
||||
height: 56,
|
||||
alignment: Alignment.center,
|
||||
child: KeyBoardShortcuts(
|
||||
keysToPress: {
|
||||
LogicalKeyboardKey.altLeft,
|
||||
LogicalKeyboardKey.keyE
|
||||
},
|
||||
onKeysPressed: controller.emojiPickerAction,
|
||||
helpLabel: L10n.of(context)!.emojis,
|
||||
child: IconButton(
|
||||
tooltip: L10n.of(context)!.emojis,
|
||||
icon: PageTransitionSwitcher(
|
||||
|
|
@ -192,8 +198,8 @@ class ChatInputRow extends StatelessWidget {
|
|||
animation: primaryAnimation,
|
||||
secondaryAnimation: secondaryAnimation,
|
||||
transitionType: SharedAxisTransitionType.scaled,
|
||||
child: child,
|
||||
fillColor: Colors.transparent,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
child: Icon(
|
||||
|
|
@ -205,12 +211,6 @@ class ChatInputRow extends StatelessWidget {
|
|||
),
|
||||
onPressed: controller.emojiPickerAction,
|
||||
),
|
||||
keysToPress: {
|
||||
LogicalKeyboardKey.altLeft,
|
||||
LogicalKeyboardKey.keyE
|
||||
},
|
||||
onKeysPressed: controller.emojiPickerAction,
|
||||
helpLabel: L10n.of(context)!.emojis,
|
||||
),
|
||||
),
|
||||
if (controller.matrix!.isMultiAccount &&
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ class CupertinoWidgetsBottomSheet extends StatelessWidget {
|
|||
(widget) => Link(
|
||||
builder: (context, callback) {
|
||||
return CupertinoActionSheetAction(
|
||||
child: Text(widget.name ?? widget.url),
|
||||
onPressed: callback ?? () {},
|
||||
child: Text(widget.name ?? widget.url),
|
||||
);
|
||||
},
|
||||
target: LinkTarget.blank,
|
||||
|
|
@ -41,8 +41,8 @@ class CupertinoWidgetsBottomSheet extends StatelessWidget {
|
|||
},
|
||||
),
|
||||
CupertinoActionSheetAction(
|
||||
child: Text(L10n.of(context)!.cancel),
|
||||
onPressed: Navigator.of(context).pop,
|
||||
child: Text(L10n.of(context)!.cancel),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ class EncryptionButton extends StatefulWidget {
|
|||
final Room room;
|
||||
const EncryptionButton(this.room, {Key? key}) : super(key: key);
|
||||
@override
|
||||
_EncryptionButtonState createState() => _EncryptionButtonState();
|
||||
EncryptionButtonState createState() => EncryptionButtonState();
|
||||
}
|
||||
|
||||
class _EncryptionButtonState extends State<EncryptionButton> {
|
||||
class EncryptionButtonState extends State<EncryptionButton> {
|
||||
StreamSubscription? _onSyncSub;
|
||||
|
||||
void _enableEncryptionAction() async {
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@ class AudioPlayerWidget extends StatefulWidget {
|
|||
: super(key: key);
|
||||
|
||||
@override
|
||||
_AudioPlayerState createState() => _AudioPlayerState();
|
||||
AudioPlayerState createState() => AudioPlayerState();
|
||||
}
|
||||
|
||||
enum AudioPlayerStatus { notDownloaded, downloading, downloaded }
|
||||
|
||||
class _AudioPlayerState extends State<AudioPlayerWidget> {
|
||||
class AudioPlayerState extends State<AudioPlayerWidget> {
|
||||
AudioPlayerStatus status = AudioPlayerStatus.notDownloaded;
|
||||
final AudioPlayer audioPlayer = AudioPlayer();
|
||||
|
||||
|
|
|
|||
|
|
@ -87,10 +87,7 @@ class ReplyContent extends StatelessWidget {
|
|||
future: displayEvent.fetchSenderUser(),
|
||||
builder: (context, snapshot) {
|
||||
return Text(
|
||||
(snapshot.data?.calcDisplayname() ??
|
||||
displayEvent.senderFromMemoryOrFallback
|
||||
.calcDisplayname()) +
|
||||
':',
|
||||
'${snapshot.data?.calcDisplayname() ?? displayEvent.senderFromMemoryOrFallback.calcDisplayname()}:',
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ class Sticker extends StatefulWidget {
|
|||
const Sticker(this.event, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_StickerState createState() => _StickerState();
|
||||
StickerState createState() => StickerState();
|
||||
}
|
||||
|
||||
class _StickerState extends State<Sticker> {
|
||||
class StickerState extends State<Sticker> {
|
||||
bool? animated;
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ class EventVideoPlayer extends StatefulWidget {
|
|||
const EventVideoPlayer(this.event, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_EventVideoPlayerState createState() => _EventVideoPlayerState();
|
||||
EventVideoPlayerState createState() => EventVideoPlayerState();
|
||||
}
|
||||
|
||||
class _EventVideoPlayerState extends State<EventVideoPlayer> {
|
||||
class EventVideoPlayerState extends State<EventVideoPlayer> {
|
||||
ChewieController? _chewieManager;
|
||||
bool _isDownloading = false;
|
||||
String? _networkUri;
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ class InputBar extends StatelessWidget {
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('/' + command,
|
||||
Text('/$command',
|
||||
style: const TextStyle(fontFamily: 'monospace')),
|
||||
Text(
|
||||
hint,
|
||||
|
|
@ -319,14 +319,14 @@ class InputBar extends StatelessWidget {
|
|||
: controller!.text.substring(controller!.selection.baseOffset + 1);
|
||||
var insertText = '';
|
||||
if (suggestion['type'] == 'command') {
|
||||
insertText = suggestion['name']! + ' ';
|
||||
insertText = '${suggestion['name']!} ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
RegExp(r'^(/\w*)$'),
|
||||
(Match m) => '/' + insertText,
|
||||
(Match m) => '/$insertText',
|
||||
);
|
||||
}
|
||||
if (suggestion['type'] == 'emoji') {
|
||||
insertText = suggestion['emoji']! + ' ';
|
||||
insertText = '${suggestion['emoji']!} ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
suggestion['current_word']!,
|
||||
(Match m) => insertText,
|
||||
|
|
@ -351,21 +351,21 @@ class InputBar extends StatelessWidget {
|
|||
break;
|
||||
}
|
||||
}
|
||||
insertText = ':${isUnique ? '' : insertPack! + '~'}$insertEmote: ';
|
||||
insertText = ':${isUnique ? '' : '${insertPack!}~'}$insertEmote: ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
RegExp(r'(\s|^)(:(?:[-\w]+~)?[-\w]+)$'),
|
||||
(Match m) => '${m[1]}$insertText',
|
||||
);
|
||||
}
|
||||
if (suggestion['type'] == 'user') {
|
||||
insertText = suggestion['mention']! + ' ';
|
||||
insertText = '${suggestion['mention']!} ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
RegExp(r'(\s|^)(@[-\w]+)$'),
|
||||
(Match m) => '${m[1]}$insertText',
|
||||
);
|
||||
}
|
||||
if (suggestion['type'] == 'room') {
|
||||
insertText = suggestion['mxid']! + ' ';
|
||||
insertText = '${suggestion['mxid']!} ';
|
||||
startText = replaceText.replaceAllMapped(
|
||||
RegExp(r'(\s|^)(#[-\w]+)$'),
|
||||
(Match m) => '${m[1]}$insertText',
|
||||
|
|
@ -401,9 +401,7 @@ class InputBar extends StatelessWidget {
|
|||
final val = controller!.value;
|
||||
final selection = val.selection.start;
|
||||
final messageWithoutNewLine =
|
||||
controller!.text.substring(0, val.selection.start) +
|
||||
'\n' +
|
||||
controller!.text.substring(val.selection.end);
|
||||
'${controller!.text.substring(0, val.selection.start)}\n${controller!.text.substring(val.selection.end)}';
|
||||
controller!.value = TextEditingValue(
|
||||
text: messageWithoutNewLine,
|
||||
selection: TextSelection.fromPosition(
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ class RecordingDialog extends StatefulWidget {
|
|||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_RecordingDialogState createState() => _RecordingDialogState();
|
||||
RecordingDialogState createState() => RecordingDialogState();
|
||||
}
|
||||
|
||||
class _RecordingDialogState extends State<RecordingDialog> {
|
||||
class RecordingDialogState extends State<RecordingDialog> {
|
||||
Timer? _recorderSubscription;
|
||||
Duration _duration = Duration.zero;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ class SendFileDialog extends StatefulWidget {
|
|||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_SendFileDialogState createState() => _SendFileDialogState();
|
||||
SendFileDialogState createState() => SendFileDialogState();
|
||||
}
|
||||
|
||||
class _SendFileDialogState extends State<SendFileDialog> {
|
||||
class SendFileDialogState extends State<SendFileDialog> {
|
||||
bool origImage = false;
|
||||
|
||||
/// Images smaller than 20kb don't need compression.
|
||||
|
|
@ -92,7 +92,7 @@ class _SendFileDialogState extends State<SendFileDialog> {
|
|||
),
|
||||
InkWell(
|
||||
onTap: () => setState(() => origImage = !origImage),
|
||||
child: Text(L10n.of(context)!.sendOriginal + ' ($sizeString)'),
|
||||
child: Text('${L10n.of(context)!.sendOriginal} ($sizeString)'),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ class SendLocationDialog extends StatefulWidget {
|
|||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_SendLocationDialogState createState() => _SendLocationDialogState();
|
||||
SendLocationDialogState createState() => SendLocationDialogState();
|
||||
}
|
||||
|
||||
class _SendLocationDialogState extends State<SendLocationDialog> {
|
||||
class SendLocationDialogState extends State<SendLocationDialog> {
|
||||
bool disabled = false;
|
||||
bool denied = false;
|
||||
bool isSending = false;
|
||||
|
|
@ -54,19 +54,19 @@ class _SendLocationDialogState extends State<SendLocationDialog> {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
Position _position;
|
||||
Position position;
|
||||
try {
|
||||
_position = await Geolocator.getCurrentPosition(
|
||||
position = await Geolocator.getCurrentPosition(
|
||||
desiredAccuracy: LocationAccuracy.best,
|
||||
timeLimit: const Duration(seconds: 30),
|
||||
);
|
||||
} on TimeoutException {
|
||||
_position = await Geolocator.getCurrentPosition(
|
||||
position = await Geolocator.getCurrentPosition(
|
||||
desiredAccuracy: LocationAccuracy.medium,
|
||||
timeLimit: const Duration(seconds: 30),
|
||||
);
|
||||
}
|
||||
setState(() => position = _position);
|
||||
setState(() => position = position);
|
||||
} catch (e) {
|
||||
setState(() => error = e);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class StickerPickerDialogState extends State<StickerPickerDialog> {
|
|||
final packSlugs = stickerPacks.keys.toList();
|
||||
|
||||
// ignore: prefer_function_declarations_over_variables
|
||||
final _packBuilder = (BuildContext context, int packIndex) {
|
||||
final packBuilder = (BuildContext context, int packIndex) {
|
||||
final pack = stickerPacks[packSlugs[packIndex]]!;
|
||||
final filteredImagePackImageEntried = pack.images.entries.toList();
|
||||
if (searchFilter?.isNotEmpty ?? false) {
|
||||
|
|
@ -128,7 +128,7 @@ class StickerPickerDialogState extends State<StickerPickerDialog> {
|
|||
),
|
||||
SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
_packBuilder,
|
||||
packBuilder,
|
||||
childCount: packSlugs.length,
|
||||
)),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue