fix: Format

This commit is contained in:
Krille Fear 2021-10-17 14:15:29 +02:00
parent 12cdee068d
commit a2f247920c
10 changed files with 48 additions and 27 deletions

View File

@ -177,8 +177,8 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
), ),
body: Center( body: Center(
child: ConstrainedBox( child: ConstrainedBox(
constraints: constraints: const BoxConstraints(
const BoxConstraints(maxWidth: FluffyThemes.columnWidth * 1.5), maxWidth: FluffyThemes.columnWidth * 1.5),
child: ListView( child: ListView(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
children: [ children: [
@ -235,7 +235,8 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
primary: Theme.of(context).secondaryHeaderColor, primary: Theme.of(context).secondaryHeaderColor,
onPrimary: Theme.of(context).primaryColor, onPrimary: Theme.of(context).primaryColor,
), ),
icon: const Icon(Icons.transfer_within_a_station_outlined), icon:
const Icon(Icons.transfer_within_a_station_outlined),
label: Text(L10n.of(context).transferFromAnotherDevice), label: Text(L10n.of(context).transferFromAnotherDevice),
onPressed: () async { onPressed: () async {
final req = await showFutureLoadingDialog( final req = await showFutureLoadingDialog(

View File

@ -42,7 +42,8 @@ class ArchiveView extends StatelessWidget {
} else { } else {
controller.archive = snapshot.data; controller.archive = snapshot.data;
if (controller.archive.isEmpty) { if (controller.archive.isEmpty) {
return const Center(child: Icon(Icons.archive_outlined, size: 80)); return const Center(
child: Icon(Icons.archive_outlined, size: 80));
} }
return ListView.builder( return ListView.builder(
itemCount: controller.archive.length, itemCount: controller.archive.length,

View File

@ -121,7 +121,8 @@ class ChatDetailsView extends StatelessWidget {
text: room.topic?.isEmpty ?? true text: room.topic?.isEmpty ?? true
? L10n.of(context).addGroupDescription ? L10n.of(context).addGroupDescription
: room.topic, : room.topic,
linkStyle: const TextStyle(color: Colors.blueAccent), linkStyle:
const TextStyle(color: Colors.blueAccent),
textStyle: TextStyle( textStyle: TextStyle(
fontSize: 14, fontSize: 14,
color: Theme.of(context) color: Theme.of(context)
@ -181,7 +182,8 @@ class ChatDetailsView extends StatelessWidget {
backgroundColor: backgroundColor:
Theme.of(context).scaffoldBackgroundColor, Theme.of(context).scaffoldBackgroundColor,
foregroundColor: Colors.grey, foregroundColor: Colors.grey,
child: const Icon(Icons.insert_emoticon_outlined), child:
const Icon(Icons.insert_emoticon_outlined),
), ),
title: Text(L10n.of(context).emoteSettings), title: Text(L10n.of(context).emoteSettings),
subtitle: Text(L10n.of(context).setCustomEmotes), subtitle: Text(L10n.of(context).setCustomEmotes),
@ -315,7 +317,8 @@ class ChatDetailsView extends StatelessWidget {
backgroundColor: backgroundColor:
Theme.of(context).scaffoldBackgroundColor, Theme.of(context).scaffoldBackgroundColor,
foregroundColor: Colors.grey, foregroundColor: Colors.grey,
child: const Icon(Icons.edit_attributes_outlined), child:
const Icon(Icons.edit_attributes_outlined),
), ),
onTap: () => onTap: () =>
VRouter.of(context).to('permissions'), VRouter.of(context).to('permissions'),

View File

@ -103,7 +103,8 @@ class ChatEncryptionSettingsView extends StatelessWidget {
), ),
subtitle: Text( subtitle: Text(
deviceKeys[i].userId, deviceKeys[i].userId,
style: const TextStyle(fontWeight: FontWeight.w300), style: const TextStyle(
fontWeight: FontWeight.w300),
), ),
), ),
), ),
@ -152,7 +153,8 @@ class ChatEncryptionSettingsView extends StatelessWidget {
children: [ children: [
Text( Text(
deviceKeys[i].deviceId, deviceKeys[i].deviceId,
style: const TextStyle(fontWeight: FontWeight.w300), style: const TextStyle(
fontWeight: FontWeight.w300),
), ),
const Spacer(), const Spacer(),
Text( Text(

View File

@ -303,8 +303,10 @@ class ChatView extends StatelessWidget {
? AnimatedContainer( ? AnimatedContainer(
height: seenByText.isEmpty ? 0 : 24, height: seenByText.isEmpty ? 0 : 24,
duration: seenByText.isEmpty duration: seenByText.isEmpty
? const Duration(milliseconds: 0) ? const Duration(
: const Duration(milliseconds: 300), milliseconds: 0)
: const Duration(
milliseconds: 300),
alignment: controller.filteredEvents alignment: controller.filteredEvents
.isNotEmpty && .isNotEmpty &&
controller.filteredEvents controller.filteredEvents
@ -318,7 +320,8 @@ class ChatView extends StatelessWidget {
bottom: 8, bottom: 8,
), ),
child: Container( child: Container(
padding: const EdgeInsets.symmetric( padding:
const EdgeInsets.symmetric(
horizontal: 4), horizontal: 4),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme.of(context) color: Theme.of(context)
@ -559,7 +562,8 @@ class ChatView extends StatelessWidget {
Text(L10n.of(context) Text(L10n.of(context)
.tryToSendAgain), .tryToSendAgain),
const SizedBox(width: 4), const SizedBox(width: 4),
const Icon(Icons.send_outlined, const Icon(
Icons.send_outlined,
size: 16), size: 16),
], ],
), ),
@ -593,7 +597,8 @@ class ChatView extends StatelessWidget {
), ),
title: title:
Text(L10n.of(context).sendFile), Text(L10n.of(context).sendFile),
contentPadding: const EdgeInsets.all(0), contentPadding:
const EdgeInsets.all(0),
), ),
), ),
PopupMenuItem<String>( PopupMenuItem<String>(
@ -606,7 +611,8 @@ class ChatView extends StatelessWidget {
), ),
title: Text( title: Text(
L10n.of(context).sendImage), L10n.of(context).sendImage),
contentPadding: const EdgeInsets.all(0), contentPadding:
const EdgeInsets.all(0),
), ),
), ),
if (PlatformInfos.isMobile) if (PlatformInfos.isMobile)
@ -621,7 +627,8 @@ class ChatView extends StatelessWidget {
), ),
title: Text( title: Text(
L10n.of(context).openCamera), L10n.of(context).openCamera),
contentPadding: const EdgeInsets.all(0), contentPadding:
const EdgeInsets.all(0),
), ),
), ),
if (controller.room if (controller.room
@ -639,7 +646,8 @@ class ChatView extends StatelessWidget {
), ),
title: Text( title: Text(
L10n.of(context).sendSticker), L10n.of(context).sendSticker),
contentPadding: const EdgeInsets.all(0), contentPadding:
const EdgeInsets.all(0),
), ),
), ),
if (PlatformInfos.isMobile) if (PlatformInfos.isMobile)
@ -654,7 +662,8 @@ class ChatView extends StatelessWidget {
), ),
title: Text(L10n.of(context) title: Text(L10n.of(context)
.voiceMessage), .voiceMessage),
contentPadding: const EdgeInsets.all(0), contentPadding:
const EdgeInsets.all(0),
), ),
), ),
if (PlatformInfos.isMobile) if (PlatformInfos.isMobile)
@ -669,7 +678,8 @@ class ChatView extends StatelessWidget {
), ),
title: Text(L10n.of(context) title: Text(L10n.of(context)
.shareLocation), .shareLocation),
contentPadding: const EdgeInsets.all(0), contentPadding:
const EdgeInsets.all(0),
), ),
), ),
], ],
@ -725,7 +735,8 @@ class ChatView extends StatelessWidget {
alignment: Alignment.center, alignment: Alignment.center,
child: IconButton( child: IconButton(
tooltip: L10n.of(context).voiceMessage, tooltip: L10n.of(context).voiceMessage,
icon: const Icon(Icons.mic_none_outlined), icon:
const Icon(Icons.mic_none_outlined),
onPressed: onPressed:
controller.voiceMessageAction, controller.voiceMessageAction,
), ),

View File

@ -56,7 +56,8 @@ class DevicesSettingsView extends StatelessWidget {
style: const TextStyle(color: Colors.red), style: const TextStyle(color: Colors.red),
), ),
trailing: controller.loadingDeletingDevices trailing: controller.loadingDeletingDevices
? const CircularProgressIndicator.adaptive(strokeWidth: 2) ? const CircularProgressIndicator.adaptive(
strokeWidth: 2)
: const Icon(Icons.delete_outline), : const Icon(Icons.delete_outline),
onTap: controller.loadingDeletingDevices onTap: controller.loadingDeletingDevices
? null ? null

View File

@ -8,7 +8,8 @@ import 'package:vrouter/vrouter.dart';
class MultipleEmotesSettingsView extends StatelessWidget { class MultipleEmotesSettingsView extends StatelessWidget {
final MultipleEmotesSettingsController controller; final MultipleEmotesSettingsController controller;
const MultipleEmotesSettingsView(this.controller, {Key key}) : super(key: key); const MultipleEmotesSettingsView(this.controller, {Key key})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

View File

@ -31,7 +31,8 @@ class Store {
static final _mutex = AsyncMutex(); static final _mutex = AsyncMutex();
Store() Store()
: secureStorage = PlatformInfos.isMobile ? const FlutterSecureStorage() : null; : secureStorage =
PlatformInfos.isMobile ? const FlutterSecureStorage() : null;
Future<void> _setupLocalStorage() async { Future<void> _setupLocalStorage() async {
if (storage == null) { if (storage == null) {

View File

@ -26,7 +26,7 @@ class MessageContent extends StatelessWidget {
final Event event; final Event event;
final Color textColor; final Color textColor;
const MessageContent(this.event, {Key key,this.textColor}) : super(key: key); const MessageContent(this.event, {Key key, this.textColor}) : super(key: key);
void _verifyOrRequestKey(BuildContext context) async { void _verifyOrRequestKey(BuildContext context) async {
if (event.content['can_request_session'] != true) { if (event.content['can_request_session'] != true) {

View File

@ -79,8 +79,8 @@ class ProfileBottomSheet extends StatelessWidget {
child: snapshot.hasError child: snapshot.hasError
? Text(snapshot.error ? Text(snapshot.error
.toLocalizedString(context)) .toLocalizedString(context))
: const CircularProgressIndicator.adaptive( : const CircularProgressIndicator
strokeWidth: 2), .adaptive(strokeWidth: 2),
) )
: ContentBanner( : ContentBanner(
profile.avatarUrl, profile.avatarUrl,