From 812bfaac4e69cc8696a25200b8abde83532f6d63 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 2 Feb 2022 14:12:58 -0800 Subject: [PATCH] Formatting --- lib/main.dart | 2 +- lib/models/remoteserver.dart | 4 ++-- lib/themes/opaque.dart | 6 +++++- lib/views/contactsview.dart | 2 +- lib/views/globalsettingsview.dart | 2 +- lib/views/profilemgrview.dart | 7 ++++++- lib/widgets/buttontextfield.dart | 11 ++++++++++- lib/widgets/messagerow.dart | 2 +- lib/widgets/profilerow.dart | 5 +---- 9 files changed, 28 insertions(+), 13 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 21b1a01f..f6174247 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -37,7 +37,7 @@ Future main() async { WidgetsFlutterBinding.ensureInitialized(); print("runApp()"); runApp(Flwtch()); - sleep(Duration(seconds:1)); + sleep(Duration(seconds: 1)); } class Flwtch extends StatefulWidget { diff --git a/lib/models/remoteserver.dart b/lib/models/remoteserver.dart index f9e658dd..2af03cd4 100644 --- a/lib/models/remoteserver.dart +++ b/lib/models/remoteserver.dart @@ -34,7 +34,7 @@ class RemoteServerInfoState extends ChangeNotifier { if (status == "Authenticated") { // syncing, set lastPreSyncMessageTime _groups.forEach((g) { - if(g.lastMessageTime.isAfter(lastPreSyncMessagTime)) { + if (g.lastMessageTime.isAfter(lastPreSyncMessagTime)) { lastPreSyncMessagTime = g.lastMessageTime; } }); @@ -52,4 +52,4 @@ class RemoteServerInfoState extends ChangeNotifier { } List get groups => _groups.sublist(0); //todo: copy?? dont want caller able to bypass changenotifier -} \ No newline at end of file +} diff --git a/lib/themes/opaque.dart b/lib/themes/opaque.dart index f0e578aa..b71f655e 100644 --- a/lib/themes/opaque.dart +++ b/lib/themes/opaque.dart @@ -183,7 +183,11 @@ ThemeData mkThemeData(Settings opaque) { scrollbarTheme: ScrollbarThemeData(isAlwaysShown: false, thumbColor: MaterialStateProperty.all(opaque.current().scrollbarDefaultColor)), tabBarTheme: TabBarTheme(indicator: UnderlineTabIndicator(borderSide: BorderSide(color: opaque.current().defaultButtonActiveColor))), dialogTheme: DialogTheme( - backgroundColor: opaque.current().backgroundPaneColor, titleTextStyle: TextStyle(color: opaque.current().mainTextColor), contentTextStyle: TextStyle(color: opaque.current().mainTextColor, )), + backgroundColor: opaque.current().backgroundPaneColor, + titleTextStyle: TextStyle(color: opaque.current().mainTextColor), + contentTextStyle: TextStyle( + color: opaque.current().mainTextColor, + )), textTheme: TextTheme( headline1: TextStyle(color: opaque.current().mainTextColor), headline2: TextStyle(color: opaque.current().mainTextColor), diff --git a/lib/views/contactsview.dart b/lib/views/contactsview.dart index 7f6b2236..9bc2f28d 100644 --- a/lib/views/contactsview.dart +++ b/lib/views/contactsview.dart @@ -163,7 +163,7 @@ class _ContactsViewState extends State { builder: (context, child) => RepaintBoundary(child: ContactRow()), ); }); - + final divided = ListTile.divideTiles( context: context, tiles: tiles, diff --git a/lib/views/globalsettingsview.dart b/lib/views/globalsettingsview.dart index f4cec611..5b733587 100644 --- a/lib/views/globalsettingsview.dart +++ b/lib/views/globalsettingsview.dart @@ -107,7 +107,7 @@ class _GlobalSettingsViewState extends State { items: themes.keys.map>((String themeId) { return DropdownMenuItem( value: themeId, - child: Text("ddi_$themeId",key: Key("ddi_$themeId")),//getThemeName(context, themeId)), + child: Text("ddi_$themeId", key: Key("ddi_$themeId")), //getThemeName(context, themeId)), ); }).toList()), leading: Icon(CwtchIcons.change_theme, color: settings.current().mainTextColor), diff --git a/lib/views/profilemgrview.dart b/lib/views/profilemgrview.dart index 69657178..f22de587 100644 --- a/lib/views/profilemgrview.dart +++ b/lib/views/profilemgrview.dart @@ -108,7 +108,12 @@ class _ProfileMgrViewState extends State { } // Global Settings - actions.add(IconButton(key: Key("OpenSettingsView"), icon: Icon(Icons.settings), tooltip: AppLocalizations.of(context)!.tooltipOpenSettings, splashRadius: Material.defaultSplashRadius / 2, onPressed: _pushGlobalSettings)); + actions.add(IconButton( + key: Key("OpenSettingsView"), + icon: Icon(Icons.settings), + tooltip: AppLocalizations.of(context)!.tooltipOpenSettings, + splashRadius: Material.defaultSplashRadius / 2, + onPressed: _pushGlobalSettings)); // shutdown cwtch actions.add(IconButton(icon: Icon(Icons.close), tooltip: AppLocalizations.of(context)!.shutdownCwtchTooltip, splashRadius: Material.defaultSplashRadius / 2, onPressed: _modalShutdown)); diff --git a/lib/widgets/buttontextfield.dart b/lib/widgets/buttontextfield.dart index ecd2631f..dd695de2 100644 --- a/lib/widgets/buttontextfield.dart +++ b/lib/widgets/buttontextfield.dart @@ -5,7 +5,16 @@ import 'package:provider/provider.dart'; // Provides a styled Text Field for use in Form Widgets. // Callers must provide a text controller, label helper text and a validator. class CwtchButtonTextField extends StatefulWidget { - CwtchButtonTextField({required this.controller, required this.onPressed, required this.icon, required this.tooltip, this.readonly = true, this.labelText, this.testKey, this.onChanged,}); + CwtchButtonTextField({ + required this.controller, + required this.onPressed, + required this.icon, + required this.tooltip, + this.readonly = true, + this.labelText, + this.testKey, + this.onChanged, + }); final TextEditingController controller; final Function()? onPressed; final Function(String)? onChanged; diff --git a/lib/widgets/messagerow.dart b/lib/widgets/messagerow.dart index 4b109d12..354bb46a 100644 --- a/lib/widgets/messagerow.dart +++ b/lib/widgets/messagerow.dart @@ -80,7 +80,7 @@ class MessageRowState extends State with SingleTickerProviderStateMi Widget wdgIcons = Platform.isAndroid ? SizedBox.shrink() : Visibility( - visible: true,//Provider.of(context).hoveredIndex == Provider.of(context).messageID, + visible: true, //Provider.of(context).hoveredIndex == Provider.of(context).messageID, maintainSize: true, maintainAnimation: true, maintainState: true, diff --git a/lib/widgets/profilerow.dart b/lib/widgets/profilerow.dart index acbdce0a..1ab6e273 100644 --- a/lib/widgets/profilerow.dart +++ b/lib/widgets/profilerow.dart @@ -89,10 +89,7 @@ class _ProfileRowState extends State { builder: (BuildContext buildcontext) { return OrientationBuilder(builder: (orientationBuilderContext, orientation) { return MultiProvider( - providers: [ - ChangeNotifierProvider.value(value: profile), - ChangeNotifierProvider.value(value: profile.contactList) - ], + providers: [ChangeNotifierProvider.value(value: profile), ChangeNotifierProvider.value(value: profile.contactList)], builder: (innercontext, widget) { var appState = Provider.of(context); var settings = Provider.of(context);