mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 22:57:12 -04:00
fix spelling
This commit is contained in:
parent
6f05d317e9
commit
75f021744b
1 changed files with 6 additions and 6 deletions
|
@ -128,10 +128,10 @@ class _FlowyColorButtonState extends State<FlowyColorButton> {
|
||||||
|
|
||||||
final style = widget.controller.getSelectionStyle();
|
final style = widget.controller.getSelectionStyle();
|
||||||
final values = style.values.where((v) => v.key == Attribute.background.key).map((v) => v.value);
|
final values = style.values.where((v) => v.key == Attribute.background.key).map((v) => v.value);
|
||||||
int initailColor = 0;
|
int initialColor = 0;
|
||||||
if (values.isNotEmpty) {
|
if (values.isNotEmpty) {
|
||||||
assert(values.length == 1);
|
assert(values.length == 1);
|
||||||
initailColor = stringToHex(values.first);
|
initialColor = stringToHex(values.first);
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledDialog(
|
StyledDialog(
|
||||||
|
@ -145,7 +145,7 @@ class _FlowyColorButtonState extends State<FlowyColorButton> {
|
||||||
_changeColor(context, color);
|
_changeColor(context, color);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initailColor: initailColor,
|
initialColor: initialColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
).show(context);
|
).show(context);
|
||||||
|
@ -168,8 +168,8 @@ class FlowyColorPicker extends StatefulWidget {
|
||||||
0xffdefff1,
|
0xffdefff1,
|
||||||
];
|
];
|
||||||
final Function(Color?) onColorChanged;
|
final Function(Color?) onColorChanged;
|
||||||
final int initailColor;
|
final int initialColor;
|
||||||
FlowyColorPicker({Key? key, required this.onColorChanged, this.initailColor = 0}) : super(key: key);
|
FlowyColorPicker({Key? key, required this.onColorChanged, this.initialColor = 0}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<FlowyColorPicker> createState() => _FlowyColorPickerState();
|
State<FlowyColorPicker> createState() => _FlowyColorPickerState();
|
||||||
|
@ -207,7 +207,7 @@ class _FlowyColorPickerState extends State<FlowyColorPicker> {
|
||||||
delegate: SliverChildBuilderDelegate(
|
delegate: SliverChildBuilderDelegate(
|
||||||
(BuildContext context, int index) {
|
(BuildContext context, int index) {
|
||||||
if (widget.colors.length > index) {
|
if (widget.colors.length > index) {
|
||||||
final isSelected = widget.colors[index] == widget.initailColor;
|
final isSelected = widget.colors[index] == widget.initialColor;
|
||||||
return ColorItem(
|
return ColorItem(
|
||||||
color: Color(widget.colors[index]),
|
color: Color(widget.colors[index]),
|
||||||
onPressed: widget.onColorChanged,
|
onPressed: widget.onColorChanged,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue