New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create QuillToolbarSelectHeaderStyleDropdownButton
#1575
Changes from all commits
09cc386
7f60504
8bba105
cb77385
e712890
a9711b8
520a4e4
80861b4
49d4679
53ae93d
177afea
fd2a941
a2cc5d2
9966d17
e748ad7
b4b917f
70e954f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,22 +229,43 @@ class FlutterQuillLocalizationsRu extends FlutterQuillLocalizations { | |
String get insertImage => 'Вставить изображение'; | ||
|
||
@override | ||
String get pickAPhotoFromYourGallery => 'Pick a photo from your gallery'; | ||
String get pickAPhotoFromYourGallery => 'Выберите фотографю из вашей галереи'; | ||
|
||
@override | ||
String get takeAPhotoUsingYourCamera => | ||
'Take a photo using your phone camera'; | ||
'Создайте фотографю, использую фотокамеру'; | ||
|
||
@override | ||
String get pasteAPhotoUsingALink => 'Paste a photo using a link'; | ||
String get pasteAPhotoUsingALink => 'Вставьте фотографию, используя ссылку'; | ||
|
||
@override | ||
String get pickAVideoFromYourGallery => 'Pick a video from your gallery'; | ||
String get pickAVideoFromYourGallery => 'Выберете видео из вашей галереи'; | ||
|
||
@override | ||
String get recordAVideoUsingYourCamera => | ||
'Record a video using your phone camera'; | ||
'Запишите видео, используя вдеокамеру'; | ||
|
||
Comment on lines
+232
to
247
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, you should update the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. |
||
@override | ||
String get pasteAVideoUsingALink => 'Paste a video using a link'; | ||
String get pasteAVideoUsingALink => 'Вставьте видео, используя ссылку'; | ||
|
||
@override | ||
String get normal => 'Обычный'; | ||
|
||
@override | ||
String get heading1 => 'Заголовок 1'; | ||
|
||
@override | ||
String get heading2 => 'Заголовок 2'; | ||
|
||
@override | ||
String get heading3 => 'Заголовок 3'; | ||
|
||
@override | ||
String get heading4 => 'Заголовок 4'; | ||
|
||
@override | ||
String get heading5 => 'Заголовок 5'; | ||
|
||
@override | ||
String get heading6 => 'Заголовок 6'; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -231,22 +231,44 @@ class FlutterQuillLocalizationsUk extends FlutterQuillLocalizations { | |
String get insertImage => 'Вставити зображення'; | ||
|
||
@override | ||
String get pickAPhotoFromYourGallery => 'Pick a photo from your gallery'; | ||
String get pickAPhotoFromYourGallery => 'Оберіть фотографію з вашої галереї'; | ||
|
||
@override | ||
String get takeAPhotoUsingYourCamera => | ||
'Take a photo using your phone camera'; | ||
'Створіть фотографію, використовуючи фотокамеру'; | ||
|
||
@override | ||
String get pasteAPhotoUsingALink => 'Paste a photo using a link'; | ||
String get pasteAPhotoUsingALink => | ||
Comment on lines
+234
to
+241
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
'Вставте фотографію, використовуючи посилання'; | ||
|
||
@override | ||
String get pickAVideoFromYourGallery => 'Pick a video from your gallery'; | ||
String get pickAVideoFromYourGallery => 'Оберіть відео з вашої галереї'; | ||
|
||
@override | ||
String get recordAVideoUsingYourCamera => | ||
'Record a video using your phone camera'; | ||
'Запишіть відео, використовуючи відеокамеру'; | ||
|
||
@override | ||
String get pasteAVideoUsingALink => 'Paste a video using a link'; | ||
String get pasteAVideoUsingALink => 'Вставте відео, використовуючи посилання'; | ||
|
||
@override | ||
String get normal => 'Звичайний'; | ||
|
||
@override | ||
String get heading1 => 'Заголовок 1'; | ||
|
||
@override | ||
String get heading2 => 'Заголовок 2'; | ||
|
||
@override | ||
String get heading3 => 'Заголовок 3'; | ||
|
||
@override | ||
String get heading4 => 'Заголовок 4'; | ||
|
||
@override | ||
String get heading5 => 'Заголовок 5'; | ||
|
||
@override | ||
String get heading6 => 'Заголовок 6'; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
import '../../../../widgets/controller.dart'; | ||
import '../../../documents/attribute.dart'; | ||
import '../../../themes/quill_icon_theme.dart'; | ||
import '../../quill_configurations.dart'; | ||
|
||
class QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions | ||
extends QuillToolbarBaseButtonExtraOptions { | ||
const QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions({ | ||
required this.currentValue, | ||
required super.controller, | ||
required super.context, | ||
required super.onPressed, | ||
}); | ||
final Attribute currentValue; | ||
} | ||
|
||
class QuillToolbarSelectHeaderStyleDropdownButtonOptions | ||
extends QuillToolbarBaseButtonOptions< | ||
QuillToolbarSelectHeaderStyleDropdownButtonOptions, | ||
QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions> { | ||
const QuillToolbarSelectHeaderStyleDropdownButtonOptions({ | ||
super.controller, | ||
super.iconData, | ||
super.afterButtonPressed, | ||
super.tooltip, | ||
super.iconTheme, | ||
super.childBuilder, | ||
this.iconSize, | ||
this.iconButtonFactor, | ||
this.fillColor, | ||
this.hoverElevation = 1, | ||
this.highlightElevation = 1, | ||
this.onSelected, | ||
this.attributes, | ||
this.padding, | ||
this.style, | ||
this.width, | ||
this.labelOverflow = TextOverflow.visible, | ||
this.itemHeight, | ||
this.itemPadding, | ||
this.defaultItemColor, | ||
this.renderItemTextStyle = false, | ||
ellet0 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}); | ||
|
||
final double? iconSize; | ||
final double? iconButtonFactor; | ||
final Color? fillColor; | ||
final double hoverElevation; | ||
final double highlightElevation; | ||
final ValueChanged<String>? onSelected; | ||
final List<Attribute>? attributes; | ||
final EdgeInsetsGeometry? padding; | ||
final TextStyle? style; | ||
final double? width; | ||
final TextOverflow labelOverflow; | ||
final double? itemHeight; | ||
final EdgeInsets? itemPadding; | ||
final Color? defaultItemColor; | ||
final bool renderItemTextStyle; | ||
|
||
QuillToolbarSelectHeaderStyleDropdownButtonOptions copyWith({ | ||
Color? fillColor, | ||
double? hoverElevation, | ||
double? highlightElevation, | ||
List<PopupMenuEntry<String>>? items, | ||
ValueChanged<String>? onSelected, | ||
List<Attribute>? attributes, | ||
EdgeInsetsGeometry? padding, | ||
TextStyle? style, | ||
double? width, | ||
TextOverflow? labelOverflow, | ||
bool? renderFontFamilies, | ||
bool? overrideTooltipByFontFamily, | ||
double? itemHeight, | ||
EdgeInsets? itemPadding, | ||
Color? defaultItemColor, | ||
double? iconSize, | ||
double? iconButtonFactor, | ||
QuillController? controller, | ||
IconData? iconData, | ||
VoidCallback? afterButtonPressed, | ||
String? tooltip, | ||
QuillIconTheme? iconTheme, | ||
bool? renderItemTextStyle, | ||
}) { | ||
return QuillToolbarSelectHeaderStyleDropdownButtonOptions( | ||
attributes: attributes ?? this.attributes, | ||
controller: controller ?? this.controller, | ||
iconData: iconData ?? this.iconData, | ||
afterButtonPressed: afterButtonPressed ?? this.afterButtonPressed, | ||
tooltip: tooltip ?? this.tooltip, | ||
iconTheme: iconTheme ?? this.iconTheme, | ||
onSelected: onSelected ?? this.onSelected, | ||
padding: padding ?? this.padding, | ||
style: style ?? this.style, | ||
width: width ?? this.width, | ||
labelOverflow: labelOverflow ?? this.labelOverflow, | ||
itemHeight: itemHeight ?? this.itemHeight, | ||
itemPadding: itemPadding ?? this.itemPadding, | ||
defaultItemColor: defaultItemColor ?? this.defaultItemColor, | ||
iconSize: iconSize ?? this.iconSize, | ||
iconButtonFactor: iconButtonFactor ?? this.iconButtonFactor, | ||
fillColor: fillColor ?? this.fillColor, | ||
hoverElevation: hoverElevation ?? this.hoverElevation, | ||
highlightElevation: highlightElevation ?? this.highlightElevation, | ||
renderItemTextStyle: renderItemTextStyle ?? this.renderItemTextStyle, | ||
); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,12 +158,24 @@ class Attribute<T> extends Equatable { | |
Attribute.video.key, | ||
}; | ||
|
||
/// "attributes":{"header": 1 } | ||
static const Attribute<int?> h1 = HeaderAttribute(level: 1); | ||
|
||
/// "attributes":{"header": 2 } | ||
static const Attribute<int?> h2 = HeaderAttribute(level: 2); | ||
|
||
/// "attributes":{"header": 3 } | ||
static const Attribute<int?> h3 = HeaderAttribute(level: 3); | ||
|
||
/// "attributes":{"header": 4 } | ||
static const Attribute<int?> h4 = HeaderAttribute(level: 4); | ||
|
||
/// "attributes":{"header": 5 } | ||
static const Attribute<int?> h5 = HeaderAttribute(level: 5); | ||
|
||
/// "attributes":{"header": 6 } | ||
static const Attribute<int?> h6 = HeaderAttribute(level: 6); | ||
Comment on lines
+170
to
+177
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @singerdmx |
||
|
||
// "attributes":{"align":"left"} | ||
static const Attribute<String?> leftAlignment = AlignAttribute('left'); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is auto-generated, please edit the the
quill_en.arb
insteadand run the script we mentioned in the development notes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. I was to hurry. I think I can update translations after merge the PR with new widget.