Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge in latest changes, continue to edit settings screens
  • Loading branch information
jordansprojects committed Jul 25, 2026
commit 913f17422c147d99d600e280990b143e9d320c57
2 changes: 1 addition & 1 deletion lib/src/view/settings/board_settings_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class _BoardSettingsScreenState extends ConsumerState<BoardSettingsScreen> {
),
SettingsListTile(
settingsLabel: Text(context.l10n.pieceSet),
settingsValue: boardPrefs.pieceSet.label,
settingsValue: boardPrefs.pieceSet3D?.label ?? boardPrefs.pieceSet.label,
onTap: () {
Navigator.of(context).push(PieceSetScreen.buildRoute());
},
Expand Down
81 changes: 41 additions & 40 deletions lib/src/view/settings/piece_set_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ void remove3DPieceSetFromPreferences(){

return DefaultTabController(
length: 2,
child: Scaffold(
appBar: AppBar(
child: PlatformScaffold(
appBar: PlatformAppBar(
title: Text(context.l10n.pieceSet),
actions: [if (isLoading) const PlatformAppBarLoadingIndicator()],
bottom: const TabBar(
Expand All @@ -109,6 +109,44 @@ void remove3DPieceSetFromPreferences(){
),
body: TabBarView(
children: [
Center(
child: SafeArea(
child: ListView.separated(
itemCount: PieceSet.values.length,
separatorBuilder: (_, _) => Theme.of(context).platform == TargetPlatform.iOS
? const PlatformDivider()
: const SizedBox.shrink(),
itemBuilder: (context, index) {
final pieceSet = PieceSet.values[index];
return ListTile(
trailing: boardPrefs.pieceSet == pieceSet && boardPrefs.pieceSet3D == null ? const Icon(Icons.check) : null,
title: Text(pieceSet.label),
subtitle: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 264),
child: Stack(
children: [
BrightnessHueFilter(
brightness: boardPrefs.brightness,
hue: boardPrefs.hue,
child: boardPrefs.boardTheme.thumbnail,
),
Row(
children: [
for (final img in getPieceImages(pieceSet)) Image(image: img, height: 44),
],
),
],

),
),
onTap: isLoading ? null : () => onChanged(pieceSet),
selected: boardPrefs.pieceSet == pieceSet,
);
},
),
),
),

Center(
child: SafeArea(
child: ListView.separated(
Expand Down Expand Up @@ -149,44 +187,7 @@ void remove3DPieceSetFromPreferences(){
},
),
),
),
Center(
child: SafeArea(
child: ListView.separated(
itemCount: PieceSet.values.length,
separatorBuilder: (_, _) => Theme.of(context).platform == TargetPlatform.iOS
? const PlatformDivider()
: const SizedBox.shrink(),
itemBuilder: (context, index) {
final pieceSet = PieceSet.values[index];
return ListTile(
trailing: boardPrefs.pieceSet == pieceSet ? const Icon(Icons.check) : null,
title: Text(pieceSet.label),
subtitle: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 264),
child: Stack(
children: [
BrightnessHueFilter(
brightness: boardPrefs.brightness,
hue: boardPrefs.hue,
child: boardPrefs.boardTheme.thumbnail,
),
Row(
children: [
for (final img in getPieceImages(pieceSet)) Image(image: img, height: 44),
],
),
],

),
),
onTap: isLoading ? null : () => onChanged(pieceSet),
selected: boardPrefs.pieceSet == pieceSet,
);
},
),
),
),
)
],
),
),
Expand Down
Loading