Skip to content
Merged
Changes from all commits
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
10 changes: 10 additions & 0 deletions lib/src/view/analysis/analysis_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ class _AnalysisScreenState extends ConsumerState<_AnalysisScreen>

class _Title extends StatelessWidget {
const _Title({required this.variant});

final Variant variant;

static const excludedIcons = [Variant.standard, Variant.fromPosition];
Expand Down Expand Up @@ -301,6 +302,7 @@ class _BottomBar extends ConsumerWidget {

void _moveForward(WidgetRef ref) =>
ref.read(analysisControllerProvider(options).notifier).userNext();

void _moveBackward(WidgetRef ref) =>
ref.read(analysisControllerProvider(options).notifier).userPrevious();

Expand Down Expand Up @@ -332,6 +334,14 @@ class _BottomBar extends ConsumerWidget {
).push(BoardEditorScreen.buildRoute(context, initialFen: boardFen));
},
),
if (analysisState.gameId != null)
BottomSheetAction(
makeLabel: (context) => Text(context.l10n.mobileShareGameURL),
onPressed: () {
final boardUrl = lichessUri('/${analysisState.gameId}/${analysisState.pov.name}');
launchShareDialog(context, uri: boardUrl);
},
),
// PGN share can be used to quickly analyze a position, so engine must be allowed to access
if (analysisState.isComputerAnalysisAllowed)
BottomSheetAction(
Expand Down