Skip to content

Commit

Permalink
think in ui , 增加dart构造的最佳实践
Browse files Browse the repository at this point in the history
  • Loading branch information
chen56 committed Mar 22, 2024
1 parent aeb9fa8 commit 1719cf0
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ main() {
Row(),
),
]);
StyledWidget(padding: const EdgeInsets.all(10), decoration: const BoxDecoration(color: Colors.amber, shape: BoxShape.circle))(
const StyledWidget(
padding: EdgeInsets.all(10),
decoration: BoxDecoration(color: Colors.amber, shape: BoxShape.circle),
)(
Row(crossAxisAlignment: CrossAxisAlignment.baseline, children: [
FilledButton(onPressed: () => {}, child: const Text("ss")),
Container(color: Colors.amber)(
Row(children: [
StyledWidget(alignment: Alignment.center)(
const StyledWidget(alignment: Alignment.center)(
Row(crossAxisAlignment: CrossAxisAlignment.baseline, children: [
FilledButton(onPressed: () => {}, child: const Text("ss")),
]),
Expand Down Expand Up @@ -57,7 +60,7 @@ class StyledWidget extends StatelessWidget {
this.decoration,
this.alignment,
this.child,
}) ;
});

@override
Widget build(BuildContext context) {
Expand Down

0 comments on commit 1719cf0

Please sign in to comment.