docs: Allow multiple infoboxes on a page to have code (#1814)

This commit is contained in:
Pasha Stetsenko
2022-07-23 18:17:51 -07:00
committed by GitHub
parent 0a41b2dabe
commit 68ef250a9f
2 changed files with 4 additions and 4 deletions

View File

@ -119,7 +119,7 @@ class FlutterAppDirective(SphinxDirective):
onclick=f'run_flutter_app("{iframe_url}")', onclick=f'run_flutter_app("{iframe_url}")',
)) ))
if 'code' in self.modes: if 'code' in self.modes:
code_id = self.app_name + "-source" code_id = self.app_name + "-source-" + page
result.append(self._generate_code_listings(code_id)) result.append(self._generate_code_listings(code_id))
result.append(Button( result.append(Button(
'', '',

View File

@ -42,7 +42,7 @@ Possible uses:
```{flutter-app} ```{flutter-app}
:sources: ../flame/examples :sources: ../flame/examples
:page: decorator_grayscale :page: decorator_grayscale
:show: widget infobox :show: widget code infobox
:width: 180 :width: 180
:height: 160 :height: 160
``` ```
@ -66,7 +66,7 @@ Possible uses:
```{flutter-app} ```{flutter-app}
:sources: ../flame/examples :sources: ../flame/examples
:page: decorator_tint :page: decorator_tint
:show: widget infobox :show: widget code infobox
:width: 180 :width: 180
:height: 160 :height: 160
``` ```
@ -92,7 +92,7 @@ Possible uses:
```{flutter-app} ```{flutter-app}
:sources: ../flame/examples :sources: ../flame/examples
:page: decorator_rotate3d :page: decorator_rotate3d
:show: widget infobox :show: widget code infobox
:width: 180 :width: 180
:height: 160 :height: 160
``` ```