Skip to content

Commit 2509a64

Browse files
committed
dart format per request
1 parent 2332cd1 commit 2509a64

File tree

3 files changed

+30
-19
lines changed

3 files changed

+30
-19
lines changed

material_3_demo/lib/color_box.dart

+10-11
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ import 'package:flutter/material.dart';
22
import 'package:flutter/services.dart';
33

44
class ColorBox extends StatefulWidget {
5-
const ColorBox({
6-
super.key,
7-
required this.label,
8-
required this.tone,
9-
required this.color,
10-
required this.onColor,
11-
required this.height,
12-
required this.width,
13-
this.displayPaletteInfo = false
14-
});
5+
const ColorBox(
6+
{super.key,
7+
required this.label,
8+
required this.tone,
9+
required this.color,
10+
required this.onColor,
11+
required this.height,
12+
required this.width,
13+
this.displayPaletteInfo = false});
1514

1615
final String label;
1716
final String tone;
@@ -62,7 +61,7 @@ class _ColorBoxState extends State<ColorBox> {
6261
padding: EdgeInsets.zero,
6362
color: widget.onColor,
6463
tooltip: 'Copy hex color',
65-
icon: const Icon(Icons.copy, size:24),
64+
icon: const Icon(Icons.copy, size: 24),
6665
onPressed: () async {
6766
final messenger = ScaffoldMessenger.of(context);
6867
// Copy color as hex to clipboard

material_3_demo/lib/color_palettes_screen.dart

+20-6
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,31 @@ class ColorPalettesScreen extends StatelessWidget {
9696
);
9797
} else {
9898
var seed = Theme.of(context).colorScheme.primary;
99-
var lightScheme = ColorScheme.fromSeed(seedColor: seed, brightness: Brightness.light);
100-
var darkScheme = ColorScheme.fromSeed(seedColor: seed, brightness: Brightness.dark);
99+
var lightScheme = ColorScheme.fromSeed(
100+
seedColor: seed, brightness: Brightness.light);
101+
var darkScheme = ColorScheme.fromSeed(
102+
seedColor: seed, brightness: Brightness.dark);
101103
return SingleChildScrollView(
102104
child: Padding(
103105
padding: const EdgeInsets.all(8),
104106
child: Column(
105107
children: [
106-
SchemePreview(label:"Light ColorScheme", scheme: lightScheme, brightness: Brightness.light, contrast: 1.0, colorMatch: false,),
107-
const SizedBox(height:16),
108-
SchemePreview(label:"Dark ColorScheme", scheme: darkScheme, brightness: Brightness.dark, contrast: 1.0, colorMatch: false,),
109-
const SizedBox(height:16),
108+
SchemePreview(
109+
label: "Light ColorScheme",
110+
scheme: lightScheme,
111+
brightness: Brightness.light,
112+
contrast: 1.0,
113+
colorMatch: false,
114+
),
115+
const SizedBox(height: 16),
116+
SchemePreview(
117+
label: "Dark ColorScheme",
118+
scheme: darkScheme,
119+
brightness: Brightness.dark,
120+
contrast: 1.0,
121+
colorMatch: false,
122+
),
123+
const SizedBox(height: 16),
110124
],
111125
),
112126
),

material_3_demo/lib/scheme.dart

-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ class SchemePreview extends StatefulWidget {
2525
}
2626

2727
class _SchemePreviewState extends State<SchemePreview> {
28-
2928
@override
3029
Widget build(BuildContext context) {
31-
3230
final theme = Theme.of(context);
3331
final fonts = theme.textTheme;
3432
final colors = theme.colorScheme;

0 commit comments

Comments
 (0)