flutter: Add some commas

This commit is contained in:
Calcitem 2021-03-29 00:25:20 +08:00
parent ca10ce20d9
commit 329b4792d1
2 changed files with 23 additions and 15 deletions

View File

@ -44,20 +44,25 @@ class SettingsListTile extends StatelessWidget {
title: Text(titleString, style: AppTheme.switchListTileTitleStyle),
subtitle: subtitleString == null
? null
: Text(subtitleString!,
style: TextStyle(color: UIColors.secondaryColor)),
trailing: Row(mainAxisSize: MainAxisSize.min, children: <Widget>[
Text(
trailingColor == null
? (trailingString == null ? "" : trailingString!)
: trailingColor!.toRadixString(16),
style: TextStyle(
backgroundColor:
trailingColor == null ? null : Color(trailingColor!),
: Text(
subtitleString!,
style: TextStyle(color: UIColors.secondaryColor),
),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
trailingColor == null
? (trailingString == null ? "" : trailingString!)
: trailingColor!.toRadixString(16),
style: TextStyle(
backgroundColor:
trailingColor == null ? null : Color(trailingColor!),
),
),
),
Icon(Icons.keyboard_arrow_right, color: UIColors.secondaryColor),
]),
Icon(Icons.keyboard_arrow_right, color: UIColors.secondaryColor),
],
),
onTap: onTap,
);
}

View File

@ -15,6 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import 'package:flutter/material.dart';
import 'package:sanmill/style/app_theme.dart';
import 'package:sanmill/style/colors.dart';
@ -44,8 +45,10 @@ class SettingsSwitchListTile extends StatelessWidget {
title: Text(titleString, style: AppTheme.switchListTileTitleStyle),
subtitle: subtitleString == null
? null
: Text(subtitleString!,
style: TextStyle(color: UIColors.secondaryColor)),
: Text(
subtitleString!,
style: TextStyle(color: UIColors.secondaryColor),
),
);
}
}