diff --git a/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/widget/toolbar/color_picker.dart b/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/widget/toolbar/color_picker.dart index b103ae2fc2..da91a1d2cf 100644 --- a/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/widget/toolbar/color_picker.dart +++ b/frontend/app_flowy/lib/workspace/presentation/stack_page/doc/widget/toolbar/color_picker.dart @@ -128,10 +128,10 @@ class _FlowyColorButtonState extends State { final style = widget.controller.getSelectionStyle(); final values = style.values.where((v) => v.key == Attribute.background.key).map((v) => v.value); - int initailColor = 0; + int initialColor = 0; if (values.isNotEmpty) { assert(values.length == 1); - initailColor = stringToHex(values.first); + initialColor = stringToHex(values.first); } StyledDialog( @@ -145,7 +145,7 @@ class _FlowyColorButtonState extends State { _changeColor(context, color); } }, - initailColor: initailColor, + initialColor: initialColor, ), ), ).show(context); @@ -168,8 +168,8 @@ class FlowyColorPicker extends StatefulWidget { 0xffdefff1, ]; final Function(Color?) onColorChanged; - final int initailColor; - FlowyColorPicker({Key? key, required this.onColorChanged, this.initailColor = 0}) : super(key: key); + final int initialColor; + FlowyColorPicker({Key? key, required this.onColorChanged, this.initialColor = 0}) : super(key: key); @override State createState() => _FlowyColorPickerState(); @@ -207,7 +207,7 @@ class _FlowyColorPickerState extends State { delegate: SliverChildBuilderDelegate( (BuildContext context, int index) { if (widget.colors.length > index) { - final isSelected = widget.colors[index] == widget.initailColor; + final isSelected = widget.colors[index] == widget.initialColor; return ColorItem( color: Color(widget.colors[index]), onPressed: widget.onColorChanged, diff --git a/shared-lib/flowy-derive/src/proto_buf/serialize.rs b/shared-lib/flowy-derive/src/proto_buf/serialize.rs index 9e838a5aa3..9a14034c18 100644 --- a/shared-lib/flowy-derive/src/proto_buf/serialize.rs +++ b/shared-lib/flowy-derive/src/proto_buf/serialize.rs @@ -109,7 +109,7 @@ fn gen_token_stream(ctxt: &Ctxt, member: &syn::Member, ty: &syn::Type, is_option } } -// e.g. pub cells: Vec, the memeber will be cells, ty would be Vec +// e.g. pub cells: Vec, the member will be cells, ty would be Vec fn token_stream_for_vec(ctxt: &Ctxt, member: &syn::Member, ty: &syn::Type) -> Option { let ty_info = parse_ty(ctxt, ty)?; match ident_category(ty_info.ident) {