Skip to content

Commit

Permalink
[flutter_web] colors 可视化
Browse files Browse the repository at this point in the history
  • Loading branch information
chen56 committed May 14, 2024
1 parent dd14e8c commit 39dc681
Show file tree
Hide file tree
Showing 6 changed files with 705 additions and 434 deletions.
19 changes: 9 additions & 10 deletions notes/flutter_web/lib/routes/notes/style&theming/colors/page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import 'package:you_flutter_internal/you_flutter_internal.dart';

@NoteAnnotation(label: "Color roles", publish: true)
void build(BuildContext context, Cell print) {
print(const MD(r'''
# Color roles
ref
- <https://m3.material.io/styles/color/roles>
'''));

print(const MaterialColorRoles());
// print(const MD(r'''
// # Color roles
//
// ref
//
// - <https://m3.material.io/styles/color/roles>
//
// '''));

print(MaterialColorRoles());
}
3 changes: 3 additions & 0 deletions packages/you_flutter/lib/src/better_ui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ extension StyleExtension on Widget {
Widget marginAll$(double value) {
return Container(margin: EdgeInsets.all(value), child: this);
}
Widget margin$(EdgeInsets margin) {
return Container(margin: margin, child: this);
}

/// Warp a [Padding]
Widget padding$(EdgeInsetsGeometry padding) => Padding(padding: padding, child: this);
Expand Down
Loading

0 comments on commit 39dc681

Please sign in to comment.