Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion demo_app/lib/screens/img_file.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class _ImgFileState extends State<_ImgFileTab> {
}

@override
Widget build(BuildContext _) => AnimatedBuilder(
Widget build(BuildContext context) => AnimatedBuilder(
animation: status,
builder: (_, __) {
switch (status.value) {
Expand Down
2 changes: 1 addition & 1 deletion demo_app/lib/screens/wordpress.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class PostsScreen extends StatelessWidget {
const PostsScreen(this.domain, {super.key, this.title});

@override
Widget build(BuildContext _) => Scaffold(
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(title: Text(title ?? domain)),
body: _PostsList('https://$domain/wp-json/wp/v2/posts?_embed'),
);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/lib/src/internal/ops/style_text_align.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extension StyleTextAlign on WidgetFactory {
priority: Early.cssTextAlign,
);

static Widget _center(BuildContext _, Widget child) =>
static Widget _center(BuildContext context, Widget child) =>
Center(heightFactor: 1.0, child: child);

static BuildTree _onParsed(BuildTree tree) {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/lib/src/widgets/css_sizing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ class CssBlock extends SingleChildRenderObjectWidget {
const CssBlock({super.child, super.key});

@override
RenderObject createRenderObject(BuildContext _) =>
RenderObject createRenderObject(BuildContext context) =>
_RenderCssSizing(preferredWidth: const CssSizingValue.percentage(100));

@override
void updateRenderObject(BuildContext _, RenderObject renderObject) =>
void updateRenderObject(BuildContext context, RenderObject renderObject) =>
(renderObject as _RenderCssSizing).setPreferredSize(
null,
const CssSizingValue.percentage(100),
Expand Down
4 changes: 2 additions & 2 deletions packages/core/lib/src/widgets/html_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class HtmlListItem extends MultiChildRenderObjectWidget {
);

@override
RenderObject createRenderObject(BuildContext _) =>
RenderObject createRenderObject(BuildContext context) =>
_ListItemRenderObject(textDirection: textDirection);

@override
Expand All @@ -34,7 +34,7 @@ class HtmlListItem extends MultiChildRenderObjectWidget {
}

@override
void updateRenderObject(BuildContext _, RenderObject renderObject) =>
void updateRenderObject(BuildContext context, RenderObject renderObject) =>
(renderObject as _ListItemRenderObject).textDirection = textDirection;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/core/lib/src/widgets/html_list_marker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class HtmlListMarker extends LeafRenderObjectWidget {
: markerType = HtmlListMarkerType.square;

@override
RenderObject createRenderObject(BuildContext _) =>
RenderObject createRenderObject(BuildContext context) =>
_ListMarkerRenderObject(markerType, textStyle);

@override
Expand All @@ -44,7 +44,7 @@ class HtmlListMarker extends LeafRenderObjectWidget {
}

@override
void updateRenderObject(BuildContext _, RenderObject renderObject) {
void updateRenderObject(BuildContext context, RenderObject renderObject) {
(renderObject as _ListMarkerRenderObject)
..markerType = markerType
..textStyle = textStyle;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/lib/src/widgets/html_ruby.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class HtmlRuby extends MultiChildRenderObjectWidget {
);

@override
RenderObject createRenderObject(BuildContext _) => _RubyRenderObject();
RenderObject createRenderObject(BuildContext context) => _RubyRenderObject();
}

class _RubyParentData extends ContainerBoxParentData<RenderBox> {}
Expand Down
4 changes: 2 additions & 2 deletions packages/core/lib/src/widgets/html_table.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class HtmlTable extends MultiChildRenderObjectWidget {
});

@override
RenderObject createRenderObject(BuildContext _) => _TableRenderObject(
RenderObject createRenderObject(BuildContext context) => _TableRenderObject(
border,
textDirection,
borderCollapse: borderCollapse,
Expand Down Expand Up @@ -74,7 +74,7 @@ class HtmlTable extends MultiChildRenderObjectWidget {
}

@override
void updateRenderObject(BuildContext _, RenderObject renderObject) {
void updateRenderObject(BuildContext context, RenderObject renderObject) {
(renderObject as _TableRenderObject)
..setBorder(border)
..setBorderCollapse(borderCollapse)
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/_.dart
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ class HitTestApp extends StatelessWidget {
const HitTestApp({required this.html, super.key, required this.list});

@override
Widget build(BuildContext _) => MaterialApp(
Widget build(BuildContext context) => MaterialApp(
home: Scaffold(
body: HtmlWidget(
html,
Expand Down
6 changes: 3 additions & 3 deletions packages/core/test/anchor_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ class _ColumnTestApp extends StatelessWidget {
});

@override
Widget build(BuildContext _) => Scaffold(
Widget build(BuildContext context) => Scaffold(
body: SingleChildScrollView(
child: Column(
children: [
Expand All @@ -485,7 +485,7 @@ class _ListViewTestApp extends StatelessWidget {
const _ListViewTestApp({this.html});

@override
Widget build(BuildContext _) => Scaffold(
Widget build(BuildContext context) => Scaffold(
body: HtmlWidget(
html ?? htmlDefault,
factoryBuilder: () => _WidgetFactory(),
Expand All @@ -501,7 +501,7 @@ class _SliverListTestApp extends StatelessWidget {
const _SliverListTestApp({this.keyBottom});

@override
Widget build(BuildContext _) => Scaffold(
Widget build(BuildContext context) => Scaffold(
body: CustomScrollView(
cacheExtent: 0,
slivers: [
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/core_config_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ class _OnTapUrlApp extends StatelessWidget {
});

@override
Widget build(BuildContext _) => MaterialApp(
Widget build(BuildContext context) => MaterialApp(
home: Scaffold(
body: HtmlWidget(
'<a href="$href">Tap me</a>',
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/style_background_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ class _Golden extends StatelessWidget {
const _Golden(this.html);

@override
Widget build(BuildContext _) => Scaffold(
Widget build(BuildContext context) => Scaffold(
body: Padding(
padding: const EdgeInsets.all(8.0),
child: HtmlWidget(
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/style_display_flex_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ class _Golden extends StatelessWidget {
});

@override
Widget build(BuildContext _) {
Widget build(BuildContext context) {
final inlineStyle = '$kCssDisplay: $kCssDisplayFlex; '
'$kCssFlexDirection: $flexDirection; '
'$kCssAlignItems: $alignItem; '
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/style_sizing_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ class _Golden extends StatelessWidget {
const _Golden(this.html);

@override
Widget build(BuildContext _) => Scaffold(
Widget build(BuildContext context) => Scaffold(
body: Padding(
padding: const EdgeInsets.all(8.0),
child: HtmlWidget(html),
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/tag_li_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ class _Golden extends StatelessWidget {
const _Golden(this.contents);

@override
Widget build(BuildContext _) => Scaffold(
Widget build(BuildContext context) => Scaffold(
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/tag_table_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ class _Golden extends StatelessWidget {
const _Golden(this.contents);

@override
Widget build(BuildContext _) => Scaffold(
Widget build(BuildContext context) => Scaffold(
body: Padding(
padding: const EdgeInsets.all(8.0),
child: HtmlWidget(contents),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class _PlayButton extends StatelessWidget {
});

@override
Widget build(BuildContext _) => StreamBuilder<bool>(
Widget build(BuildContext context) => StreamBuilder<bool>(
builder: (_, snapshot) {
final isPlaying = snapshot.data ?? false;
return IconButton(
Expand All @@ -178,7 +178,7 @@ class _PositionText extends StatelessWidget {
});

@override
Widget build(BuildContext _) => StreamBuilder<Duration?>(
Widget build(BuildContext context) => StreamBuilder<Duration?>(
builder: (_, duration) => StreamBuilder<Duration>(
builder: (_, position) {
final max = duration.data?.inSeconds ?? -1;
Expand Down Expand Up @@ -268,7 +268,7 @@ class _MuteButton extends StatelessWidget {
});

@override
Widget build(BuildContext _) => StreamBuilder<double>(
Widget build(BuildContext context) => StreamBuilder<double>(
builder: (_, snapshot) {
final isMuted = (snapshot.data ?? 1.0) == 0;
return IconButton(
Expand Down
2 changes: 1 addition & 1 deletion packages/fwfh_svg/test/svg_factory_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class _Golden extends StatelessWidget {
});

@override
Widget build(BuildContext _) => Scaffold(
Widget build(BuildContext context) => Scaffold(
body: Padding(
padding: const EdgeInsets.all(8.0),
child: HtmlWidget(
Expand Down
3 changes: 1 addition & 2 deletions packages/fwfh_url_launcher/test/_.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import '../../core/test/_.dart' as helper;

const tapText = helper.tapText;

Future<String> explain(WidgetTester tester, String html) =>
helper.explain(
Future<String> explain(WidgetTester tester, String html) => helper.explain(
tester,
null,
hw: HtmlWidget(
Expand Down
2 changes: 1 addition & 1 deletion packages/fwfh_webview/lib/src/web_view/fallback.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import 'web_view.dart';

class WebViewState extends State<WebView> {
@override
Widget build(BuildContext _) => throw UnimplementedError();
Widget build(BuildContext context) => throw UnimplementedError();
}
2 changes: 1 addition & 1 deletion packages/fwfh_webview/lib/src/web_view/js_interop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class WebViewState extends State<WebView> {
}

@override
Widget build(BuildContext _) => AspectRatio(
Widget build(BuildContext context) => AspectRatio(
aspectRatio: widget.aspectRatio,
child: _iframeWidget,
);
Expand Down
3 changes: 2 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ sonar.dart.lcov.reportPaths=packages/*/coverage/lcov.info
sonar.projectKey=daohoangson_flutter_widget_from_html
sonar.organization=daohoangson
sonar.sources=packages
sonar.test.inclusions=**/test/*
sonar.test.inclusions=**/test/**/*, \
packages/*/example/main.dart