Skip to content

Commit 790344f

Browse files
committed
chore: melos format
1 parent 804d895 commit 790344f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+679
-825
lines changed

examples/tagflow/lib/app.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ class _TagflowExampleState extends State<TagflowExample> {
3232
future: pendingFonts,
3333
builder: (context, snapshot) {
3434
if (snapshot.connectionState == ConnectionState.waiting) {
35-
return const Center(
36-
child: CircularProgressIndicator(),
37-
);
35+
return const Center(child: CircularProgressIndicator());
3836
}
3937
return MaterialApp.router(
4038
theme: AppTheme.theme,

examples/tagflow/lib/screens/article_example.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ final class ArticleExample extends ExamplePage {
7676
theme.styles['blockquote'] ?? TagflowStyle.empty;
7777

7878
final effectiveQuoteStyle = blockquoteStyle.merge(
79-
const TagflowStyle(
80-
padding: EdgeInsets.symmetric(horizontal: 8),
81-
),
79+
const TagflowStyle(padding: EdgeInsets.symmetric(horizontal: 8)),
8280
);
8381

8482
return {
@@ -96,9 +94,7 @@ final class ArticleExample extends ExamplePage {
9694
margin: EdgeInsets.zero,
9795
padding: EdgeInsets.zero,
9896
),
99-
'blockquote p': const TagflowStyle(
100-
margin: EdgeInsets.zero,
101-
),
97+
'blockquote p': const TagflowStyle(margin: EdgeInsets.zero),
10298
};
10399
},
104100
);

examples/tagflow/lib/screens/home_screen.dart

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ class HomeScreen extends StatelessWidget {
88
@override
99
Widget build(BuildContext context) {
1010
return Scaffold(
11-
appBar: AppBar(
12-
title: const Text('Tagflow Examples'),
13-
centerTitle: false,
14-
),
11+
appBar: AppBar(title: const Text('Tagflow Examples'), centerTitle: false),
1512
body: ListView.separated(
1613
itemCount: allExamples.length,
1714
separatorBuilder: (context, index) => const Divider(),
@@ -29,11 +26,7 @@ class HomeScreen extends StatelessWidget {
2926
}
3027

3128
final class ExampleCard extends StatelessWidget {
32-
const ExampleCard({
33-
required this.example,
34-
required this.onTap,
35-
super.key,
36-
});
29+
const ExampleCard({required this.example, required this.onTap, super.key});
3730

3831
final Example example;
3932
final VoidCallback onTap;

examples/tagflow/lib/screens/table_example.dart

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,10 @@ final class TableExample extends ExamplePage {
281281
}
282282

283283
@override
284-
List<ElementConverter<TagflowNode>> get converters => !useTagflowTable
285-
? super.converters
286-
: [
287-
const TagflowTableConverter(),
288-
const TagflowTableCellConverter(),
289-
];
284+
List<ElementConverter<TagflowNode>> get converters =>
285+
!useTagflowTable
286+
? super.converters
287+
: [const TagflowTableConverter(), const TagflowTableCellConverter()];
290288

291289
@override
292290
PreferredSizeWidget? buildAppBar(BuildContext context) {
@@ -295,24 +293,25 @@ final class TableExample extends ExamplePage {
295293
actions: [
296294
PopupMenuButton<void>(
297295
icon: const Icon(Icons.more_vert),
298-
itemBuilder: (context) => [
299-
PopupMenuItem(
300-
child: Row(
301-
mainAxisSize: MainAxisSize.min,
302-
children: [
303-
const Text('Use tagflow_table'),
304-
const SizedBox(width: 16),
305-
Switch(
306-
value: useTagflowTable,
307-
onChanged: (value) {
308-
updateUseTagflowTable(value: value);
309-
Navigator.of(context).pop();
310-
},
296+
itemBuilder:
297+
(context) => [
298+
PopupMenuItem(
299+
child: Row(
300+
mainAxisSize: MainAxisSize.min,
301+
children: [
302+
const Text('Use tagflow_table'),
303+
const SizedBox(width: 16),
304+
Switch(
305+
value: useTagflowTable,
306+
onChanged: (value) {
307+
updateUseTagflowTable(value: value);
308+
Navigator.of(context).pop();
309+
},
310+
),
311+
],
311312
),
312-
],
313-
),
314-
),
315-
],
313+
),
314+
],
316315
),
317316
],
318317
);

examples/tagflow/lib/utils/router.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ import 'package:tagflow_example/utils/examples.dart';
44

55
final router = GoRouter(
66
routes: [
7-
GoRoute(
8-
path: '/',
9-
builder: (context, state) => const HomeScreen(),
10-
),
7+
GoRoute(path: '/', builder: (context, state) => const HomeScreen()),
118
...allExamples.map(
129
(example) => GoRoute(
1310
path: example.path,

examples/tagflow/lib/widgets/example_page.dart

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ abstract class ExamplePage extends StatefulWidget {
2222
return TagflowTheme.fromTheme(
2323
theme,
2424
codeStyle: codeTextTheme.bodyMedium,
25-
inlineCodePadding:
26-
const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
25+
inlineCodePadding: const EdgeInsets.symmetric(
26+
horizontal: 12,
27+
vertical: 4,
28+
),
2729
);
2830
}
2931

3032
PreferredSizeWidget? buildAppBar(BuildContext context) {
31-
return AppBar(
32-
title: Text(title),
33-
);
33+
return AppBar(title: Text(title));
3434
}
3535

3636
@override
@@ -66,9 +66,7 @@ class _ExamplePageState extends State<ExamplePage> {
6666
converters: widget.converters,
6767
theme: widget.createTheme(context),
6868
options: TagflowOptions(
69-
selectable: const TagflowSelectableOptions(
70-
enabled: true,
71-
),
69+
selectable: const TagflowSelectableOptions(enabled: true),
7270
linkTapCallback: (url, attributes) async {
7371
if (await canLaunchUrlString(url)) {
7472
await launchUrlString(url);
@@ -90,9 +88,7 @@ final class _PlaceholderExample extends ExamplePage {
9088
@override
9189
Widget build(BuildContext context) {
9290
return Scaffold(
93-
appBar: AppBar(
94-
title: const Text('Placeholder'),
95-
),
91+
appBar: AppBar(title: const Text('Placeholder')),
9692
body: const Placeholder(),
9793
);
9894
}

packages/tagflow/lib/src/converter/converter.dart

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ abstract class ElementConverter<T extends TagflowNode> {
4343

4444
@protected
4545
@visibleForTesting
46-
4746
/// Match positive selectors (without negation)
4847
bool matchPositiveSelector(TagflowNode element, String selector) {
4948
// Handle pseudo-selectors
@@ -107,11 +106,7 @@ abstract class ElementConverter<T extends TagflowNode> {
107106
}
108107

109108
/// Convert the element to a widget
110-
Widget convert(
111-
T element,
112-
BuildContext context,
113-
TagflowConverter converter,
114-
);
109+
Widget convert(T element, BuildContext context, TagflowConverter converter);
115110

116111
/// Get the computed style for an element
117112
///
@@ -124,8 +119,9 @@ abstract class ElementConverter<T extends TagflowNode> {
124119
BuildContext context, {
125120
bool inherit = true,
126121
}) {
127-
return TagflowThemeProvider.of(context)
128-
.resolveStyle(element, inherit: inherit, context: context);
122+
return TagflowThemeProvider.of(
123+
context,
124+
).resolveStyle(element, inherit: inherit, context: context);
129125
}
130126

131127
@override

packages/tagflow/lib/src/converter/converters/blockquote_converter.dart

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ final class BlockquoteConverter extends ElementConverter<TagflowElement> {
2121
return StyledContainer(
2222
style: style,
2323
tag: element.tag,
24-
child: children.length == 1
25-
? children.first
26-
: Column(
27-
crossAxisAlignment: CrossAxisAlignment.stretch,
28-
mainAxisSize: MainAxisSize.min,
29-
children: children,
30-
),
24+
child:
25+
children.length == 1
26+
? children.first
27+
: Column(
28+
crossAxisAlignment: CrossAxisAlignment.stretch,
29+
mainAxisSize: MainAxisSize.min,
30+
children: children,
31+
),
3132
);
3233
}
3334
}
@@ -50,12 +51,7 @@ final class BlockquoteFooterConverter extends ElementConverter<TagflowElement> {
5051
return StyledContainer(
5152
style: style,
5253
tag: element.tag,
53-
child: Row(
54-
children: [
55-
const Text('\u2014'),
56-
...children,
57-
],
58-
),
54+
child: Row(children: [const Text('\u2014'), ...children]),
5955
);
6056
}
6157
}

packages/tagflow/lib/src/converter/converters/container_converter.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ class ContainerConverter extends ElementConverter<TagflowElement> {
77

88
@override
99
Set<String> get supportedTags => {
10-
'div',
11-
'section',
12-
'article',
13-
'aside',
14-
'nav',
15-
'header',
16-
'footer',
17-
'main',
18-
};
10+
'div',
11+
'section',
12+
'article',
13+
'aside',
14+
'nav',
15+
'header',
16+
'footer',
17+
'main',
18+
};
1919

2020
@override
2121
Widget convert(

packages/tagflow/lib/src/converter/converters/img_converter.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ final class ImgConverter extends ElementConverter<TagflowImgElement> {
3838
case TagflowImageSelectionBehavior.altTextOnly:
3939
return element.alt;
4040
case TagflowImageSelectionBehavior.custom:
41-
return options?.selectable.imageSelectionBehaviorTextBuilder
42-
?.call(element, context);
41+
return options?.selectable.imageSelectionBehaviorTextBuilder?.call(
42+
element,
43+
context,
44+
);
4345
case null:
4446
return null;
4547
}

0 commit comments

Comments
 (0)