Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix formatting of code snippets on iOS dev pages #11021

Merged
merged 45 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7246dfc
Update swiftui-devs.md
piedcipher Aug 7, 2024
328af76
Update canvas.dart
piedcipher Aug 7, 2024
3a825e9
Update text_button.dart
piedcipher Aug 7, 2024
f97e036
Update swiftui-devs.md
piedcipher Aug 7, 2024
66372be
Update row.dart
piedcipher Aug 7, 2024
79ac9ea
Update column.dart
piedcipher Aug 7, 2024
82838b6
Update scroll.dart
piedcipher Aug 7, 2024
f672eb1
Update simple_animation.dart
piedcipher Aug 7, 2024
33c6c47
Update navigation.dart
piedcipher Aug 7, 2024
cf96e31
Update openapp.dart
piedcipher Aug 7, 2024
641b0a8
Update cupertino_themes.dart
piedcipher Aug 7, 2024
e81a5f8
Update cupertino_themes.dart
piedcipher Aug 7, 2024
67ea781
Update stylingbutton.dart
piedcipher Aug 7, 2024
8ec0396
Update cupertino_themes.dart
piedcipher Aug 7, 2024
b398b28
Update navigation.dart
piedcipher Aug 7, 2024
fc7f847
Update canvas.dart
piedcipher Aug 7, 2024
6ae42fd
Update simple_animation.dart
piedcipher Aug 7, 2024
ea49ea6
Update scroll.dart
piedcipher Aug 7, 2024
ffb52ee
Update column.dart
piedcipher Aug 7, 2024
9199a59
Update row.dart
piedcipher Aug 7, 2024
7a73319
Update text_button.dart
piedcipher Aug 7, 2024
15ee3a9
Update canvas.dart
piedcipher Aug 7, 2024
a07f898
Update column.dart
piedcipher Aug 7, 2024
dd4e6cb
Update cupertino_themes.dart
piedcipher Aug 7, 2024
9af3597
Update cupertino_themes.dart
piedcipher Aug 7, 2024
3e6e1e9
Update row.dart
piedcipher Aug 7, 2024
90d7b9d
Update scroll.dart
piedcipher Aug 7, 2024
89a1e57
Update scroll.dart
piedcipher Aug 7, 2024
aba9cd6
Update simple_animation.dart
piedcipher Aug 7, 2024
e5c3ff9
Update simple_animation.dart
piedcipher Aug 7, 2024
c5dd349
Update openapp.dart
piedcipher Aug 7, 2024
d0d96b1
Update text_button.dart
piedcipher Aug 7, 2024
f4a3f86
Update text_button.dart
piedcipher Aug 7, 2024
15dfaef
Update navigation.dart
piedcipher Aug 7, 2024
e18e8e9
Update text_button.dart
piedcipher Aug 7, 2024
aa9878e
Update text_button.dart
piedcipher Aug 7, 2024
8c4f301
Update stylingbutton.dart
piedcipher Aug 7, 2024
97c0b8f
Update stylingbutton.dart
piedcipher Aug 7, 2024
d6c902e
Update stylingbutton.dart
piedcipher Aug 7, 2024
a33f8a9
Update stylingbutton.dart
piedcipher Aug 7, 2024
a3e15cd
Update stylingbutton.dart
piedcipher Aug 7, 2024
9b6d687
Merge branch 'main' into fix/10725
domesticmouse Aug 9, 2024
a4d3222
Merge branch 'main' into fix/10725
parlough Sep 9, 2024
9346457
Move region comments up and add replacement instructions
parlough Sep 9, 2024
8572493
Merge branch 'main' into fix/10725
parlough Sep 9, 2024
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
4 changes: 2 additions & 2 deletions examples/get-started/flutter-for/ios_devs/lib/canvas.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class SignatureState extends State<Signature> {
},
onPanEnd: (details) => _points.add(null),
child:
// #docregion custom-paint
CustomPaint(
// #docregion custom-paint
CustomPaint(
painter: SignaturePainter(_points),
size: Size.infinite,
),
Expand Down
4 changes: 2 additions & 2 deletions examples/get-started/flutter-for/ios_devs/lib/column.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class HomePage extends StatelessWidget {
return const Scaffold(
body: Center(
child:
// #docregion column
Column(
// #docregion column
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(CupertinoIcons.globe),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const
// #docregion theme
CupertinoApp(
// #docregion theme
CupertinoApp(
theme: CupertinoThemeData(
brightness: Brightness.dark,
),
Expand All @@ -38,8 +38,8 @@ class HomePage extends StatelessWidget {
),
child: Center(
child:
// #docregion styling-text
Text(
// #docregion styling-text
Text(
'Hello, world!',
style: TextStyle(
fontSize: 30,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ class HomePage extends StatelessWidget {
),
child: Material(
child:
// #docregion list-view
ListView.builder(
// #docregion list-view
ListView.builder(
itemCount: mockPersons.length,
itemBuilder: (context, index) {
final person = mockPersons.elementAt(index);
Expand Down
4 changes: 2 additions & 2 deletions examples/get-started/flutter-for/ios_devs/lib/openapp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class HomePage extends StatelessWidget {
child: SafeArea(
child: Center(
child:
// #docregion open-app-example
CupertinoButton(
// #docregion open-app-example
CupertinoButton(
onPressed: () async {
await launchUrl(
Uri.parse('https://google.com'),
Expand Down
4 changes: 2 additions & 2 deletions examples/get-started/flutter-for/ios_devs/lib/row.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class HomePage extends StatelessWidget {
return const Scaffold(
body: Center(
child:
// #docregion row
Row(
// #docregion row
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(CupertinoIcons.globe),
Expand Down
4 changes: 2 additions & 2 deletions examples/get-started/flutter-for/ios_devs/lib/scroll.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ class HomePage extends StatelessWidget {
// inside a scroll view of type
// SingleChildScrollView (equivalent of a ScrollView in SwiftUI).
body:
// #docregion scroll-example
SingleChildScrollView(
// #docregion scroll-example
SingleChildScrollView(
child: Column(
children: mockPersons
.map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class _MyHomePageState extends State<MyHomePage> {
return Scaffold(
body: Center(
child:
// #docregion animated-button
AnimatedRotation(
// #docregion animated-button
AnimatedRotation(
duration: const Duration(seconds: 1),
turns: turns,
curve: Curves.easeIn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class HomePage extends StatelessWidget {
return CupertinoPageScaffold(
navigationBar: const CupertinoNavigationBar(
middle:
// #docregion custom-font
Text(
// #docregion custom-font
Text(
'Cupertino',
style: TextStyle(
fontSize: 40,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class HomePage extends StatelessWidget {
return Scaffold(
body: Center(
child:
// #docregion text-button
CupertinoButton(
// #docregion text-button
CupertinoButton(
onPressed: () {
// This closure is called when your button is tapped.
},
Expand Down
22 changes: 11 additions & 11 deletions src/content/get-started/flutter-for/swiftui-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ use the `CupertinoButton` class:

<?code-excerpt "lib/text_button.dart (text-button)"?>
```dart
CupertinoButton(
CupertinoButton(
onPressed: () {
// This closure is called when your button is tapped.
},
Expand Down Expand Up @@ -362,7 +362,7 @@ HStack {

<?code-excerpt "lib/row.dart (row)"?>
```dart
Row(
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(CupertinoIcons.globe),
Expand Down Expand Up @@ -407,7 +407,7 @@ except it swaps [`Column`][] for `Row`:

<?code-excerpt "lib/column.dart (column)"?>
```dart
Column(
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(CupertinoIcons.globe),
Expand Down Expand Up @@ -619,7 +619,7 @@ of the `Person` class to create the custom `PersonView` widget.

<?code-excerpt "lib/scroll.dart (scroll-example)"?>
```dart
SingleChildScrollView(
SingleChildScrollView(
child: Column(
children: mockPersons
.map(
Expand Down Expand Up @@ -772,7 +772,7 @@ This animates the `Transform.rotate` widget.

<?code-excerpt "lib/simple_animation.dart (animated-button)"?>
```dart
AnimatedRotation(
AnimatedRotation(
duration: const Duration(seconds: 1),
turns: turns,
curve: Curves.easeIn,
Expand Down Expand Up @@ -825,7 +825,7 @@ with two classes that help you draw:

<?code-excerpt "lib/canvas.dart (custom-paint)"?>
```dart
CustomPaint(
CustomPaint(
painter: SignaturePainter(_points),
size: Size.infinite,
),
Expand Down Expand Up @@ -963,7 +963,7 @@ call your navigation routes using their names.

<?code-excerpt "lib/navigation.dart (list-view)"?>
```dart
ListView.builder(
ListView.builder(
itemCount: mockPersons.length,
itemBuilder: (context, index) {
final person = mockPersons.elementAt(index);
Expand Down Expand Up @@ -1098,7 +1098,7 @@ In **Flutter**, use the [`url_launcher`][] plugin.

<?code-excerpt "lib/openapp.dart (open-app-example)"?>
```dart
CupertinoButton(
CupertinoButton(
onPressed: () async {
await launchUrl(
Uri.parse('https://google.com'),
Expand Down Expand Up @@ -1139,7 +1139,7 @@ of the `App` class:

<?code-excerpt "lib/cupertino_themes.dart (theme)"?>
```dart
CupertinoApp(
CupertinoApp(
theme: CupertinoThemeData(
brightness: Brightness.dark,
),
Expand Down Expand Up @@ -1175,7 +1175,7 @@ of the `style` parameter of the `Text` widget.

<?code-excerpt "lib/cupertino_themes.dart (styling-text)"?>
```dart
Text(
Text(
'Hello, world!',
style: TextStyle(
fontSize: 30,
Expand Down Expand Up @@ -1284,7 +1284,7 @@ following example:

<?code-excerpt "lib/stylingbutton.dart (custom-font)"?>
```dart
Text(
Text(
'Cupertino',
style: TextStyle(
fontSize: 40,
Expand Down
Loading