Formatting

This commit is contained in:
Sarah Jamie Lewis 2022-02-02 14:12:58 -08:00
parent f00b78be76
commit 812bfaac4e
9 changed files with 28 additions and 13 deletions

View File

@ -37,7 +37,7 @@ Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
print("runApp()");
runApp(Flwtch());
sleep(Duration(seconds:1));
sleep(Duration(seconds: 1));
}
class Flwtch extends StatefulWidget {

View File

@ -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<ContactInfoState> get groups => _groups.sublist(0); //todo: copy?? dont want caller able to bypass changenotifier
}
}

View File

@ -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),

View File

@ -163,7 +163,7 @@ class _ContactsViewState extends State<ContactsView> {
builder: (context, child) => RepaintBoundary(child: ContactRow()),
);
});
final divided = ListTile.divideTiles(
context: context,
tiles: tiles,

View File

@ -107,7 +107,7 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
items: themes.keys.map<DropdownMenuItem<String>>((String themeId) {
return DropdownMenuItem<String>(
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),

View File

@ -108,7 +108,12 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
}
// 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));

View File

@ -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;

View File

@ -80,7 +80,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
Widget wdgIcons = Platform.isAndroid
? SizedBox.shrink()
: Visibility(
visible: true,//Provider.of<AppState>(context).hoveredIndex == Provider.of<MessageMetadata>(context).messageID,
visible: true, //Provider.of<AppState>(context).hoveredIndex == Provider.of<MessageMetadata>(context).messageID,
maintainSize: true,
maintainAnimation: true,
maintainState: true,

View File

@ -89,10 +89,7 @@ class _ProfileRowState extends State<ProfileRow> {
builder: (BuildContext buildcontext) {
return OrientationBuilder(builder: (orientationBuilderContext, orientation) {
return MultiProvider(
providers: [
ChangeNotifierProvider<ProfileInfoState>.value(value: profile),
ChangeNotifierProvider<ContactListState>.value(value: profile.contactList)
],
providers: [ChangeNotifierProvider<ProfileInfoState>.value(value: profile), ChangeNotifierProvider<ContactListState>.value(value: profile.contactList)],
builder: (innercontext, widget) {
var appState = Provider.of<AppState>(context);
var settings = Provider.of<Settings>(context);