Skip to content

Commit

Permalink
Set ConfigItem label text style correctly (#208)
Browse files Browse the repository at this point in the history
* Set ConfigItem label text style correctly

* Add right padding for chevrons
  • Loading branch information
IanVS authored Dec 18, 2024
1 parent a449a65 commit afc3abd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion lib/components/config/ConfigItem.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:io';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mobile_nebula/services/utils.dart';
Expand Down Expand Up @@ -25,7 +27,12 @@ class ConfigItem extends StatelessWidget {
child: Row(
crossAxisAlignment: crossAxisAlignment,
children: <Widget>[
Container(width: labelWidth, child: label),
Container(
width: labelWidth,
child: Platform.isAndroid
? label
: DefaultTextStyle(
style: CupertinoTheme.of(context).textTheme.textStyle, child: Container(child: label))),
Expanded(child: content),
],
));
Expand Down
2 changes: 1 addition & 1 deletion lib/components/config/ConfigPageItem.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class ConfigPageItem extends StatelessWidget {
onPressed: this.disabled ? null : onPressed,
color: Utils.configItemBackground(context),
child: Container(
padding: EdgeInsets.only(left: 15),
padding: EdgeInsets.only(left: 15, right: 15),
constraints: BoxConstraints(minHeight: Utils.minInteractiveSize, minWidth: double.infinity),
child: Row(
crossAxisAlignment: crossAxisAlignment,
Expand Down

0 comments on commit afc3abd

Please sign in to comment.