Skip to content

Commit

Permalink
Squad page improve (#297)
Browse files Browse the repository at this point in the history
* fix: squad page style

* fix: show upgrade level in ship info
  • Loading branch information
andychucs authored Aug 12, 2024
1 parent f2de6be commit fd896f7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
20 changes: 12 additions & 8 deletions lib/pages/dashboard_pages/squad_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import '../../providers/generatable/kancolle_localization_provider.dart';

const _sectionMargin = EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 10.0, 10.0);
const _normalMargin = EdgeInsetsDirectional.fromSTEB(20.0, 10.0, 20.0, 10.0);

const _kListPadding = EdgeInsetsDirectional.only(start: 10.0, end: 8.0);
class SquadInfo extends ConsumerStatefulWidget {
const SquadInfo({super.key});

Expand Down Expand Up @@ -73,12 +73,15 @@ class _SquadInfoState extends ConsumerState<SquadInfo>
))
.toList(),
buttonBuilder: (context, showMenu) => CupertinoButton(
padding: EdgeInsets.zero,
onPressed: () => showMenu(),
child: Row(
children: [
Text(S.of(context).KCDashboardShipScoutScoreCoefficient),
const Icon(
Text(S.of(context).KCDashboardShipScoutScoreCoefficient,
style: TextStyle(fontSize: CupertinoTheme.of(context).textTheme.textStyle.fontSize),),
Icon(
Icons.keyboard_arrow_down,
size: CupertinoTheme.of(context).textTheme.textStyle.fontSize,
),
],
),
Expand Down Expand Up @@ -181,10 +184,7 @@ class _SquadInfoState extends ConsumerState<SquadInfo>
for (final ship in squad.ships)
CupertinoListTile(
title: Text(ship.name!),
padding:
const EdgeInsetsDirectional
.only(
start: 10.0, end: 8.0),
padding: _kListPadding,
leading: CarouselSlider(
items: [
AttributeLabel.vertical(
Expand Down Expand Up @@ -510,7 +510,7 @@ class ShipInfo extends StatelessWidget {
child: ScrollViewWithCupertinoScrollbar(
children: [
CupertinoListSection.insetGrouped(
margin: _sectionMargin,
margin: tabBottomListMargin,
children: [
CupertinoListTile(
title: Text("Lv"),
Expand All @@ -520,6 +520,10 @@ class ShipInfo extends StatelessWidget {
title: Text("Lv. up EXP"),
additionalInfo: Text('${ship.exp?[1]}'),
),
CupertinoListTile(
title: Text(S.current.KCDashboardShipUpgradeLevel),
additionalInfo: Text('${ship.upgradeLevel}'),
),
CupertinoListTile(
title: Text(S.current.KCDashboardShipCondition),
additionalInfo: Text('${ship.condition}'),
Expand Down
6 changes: 5 additions & 1 deletion lib/widgets/squads_share_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ class SquadsShareButton extends StatelessWidget {
return CupertinoListTile(
title: Text(S.current.TextShare),
onTap: showMenu,
trailing: const Icon(CupertinoIcons.share),
trailing: Icon(
CupertinoIcons.share,
size: CupertinoTheme.of(context).textTheme.textStyle.fontSize,
color: CupertinoColors.systemGrey2.resolveFrom(context),
),
);
}
if (child == 'iconButton') {
Expand Down

0 comments on commit fd896f7

Please sign in to comment.