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(
child: ConstrainedBox(
constraints:
const BoxConstraints(maxWidth: FluffyThemes.columnWidth * 1.5),
constraints: const BoxConstraints(
maxWidth: FluffyThemes.columnWidth * 1.5),
child: ListView(
padding: const EdgeInsets.all(16.0),
children: [
@ -235,7 +235,8 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
primary: Theme.of(context).secondaryHeaderColor,
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),
onPressed: () async {
final req = await showFutureLoadingDialog(

View File

@ -42,7 +42,8 @@ class ArchiveView extends StatelessWidget {
} else {
controller.archive = snapshot.data;
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(
itemCount: controller.archive.length,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -26,7 +26,7 @@ class MessageContent extends StatelessWidget {
final Event event;
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 {
if (event.content['can_request_session'] != true) {

View File

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