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,9 +44,13 @@ class SettingsListTile extends StatelessWidget {
title: Text(titleString, style: AppTheme.switchListTileTitleStyle), title: Text(titleString, style: AppTheme.switchListTileTitleStyle),
subtitle: subtitleString == null subtitle: subtitleString == null
? null ? null
: Text(subtitleString!, : Text(
style: TextStyle(color: UIColors.secondaryColor)), subtitleString!,
trailing: Row(mainAxisSize: MainAxisSize.min, children: <Widget>[ style: TextStyle(color: UIColors.secondaryColor),
),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text( Text(
trailingColor == null trailingColor == null
? (trailingString == null ? "" : trailingString!) ? (trailingString == null ? "" : trailingString!)
@ -57,7 +61,8 @@ class SettingsListTile extends StatelessWidget {
), ),
), ),
Icon(Icons.keyboard_arrow_right, color: UIColors.secondaryColor), Icon(Icons.keyboard_arrow_right, color: UIColors.secondaryColor),
]), ],
),
onTap: onTap, onTap: onTap,
); );
} }

View File

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