mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Merge pull request #945 from AppFlowy-IO/feat/update_flutter_packages
Feat/update flutter packages
This commit is contained in:
commit
7b53b2c523
@ -31,10 +31,10 @@ class MoveWindowDetector extends StatefulWidget {
|
||||
final Widget? child;
|
||||
|
||||
@override
|
||||
_MoveWindowDetectorState createState() => _MoveWindowDetectorState();
|
||||
MoveWindowDetectorState createState() => MoveWindowDetectorState();
|
||||
}
|
||||
|
||||
class _MoveWindowDetectorState extends State<MoveWindowDetector> {
|
||||
class MoveWindowDetectorState extends State<MoveWindowDetector> {
|
||||
double winX = 0;
|
||||
double winY = 0;
|
||||
|
||||
@ -59,7 +59,8 @@ class _MoveWindowDetectorState extends State<MoveWindowDetector> {
|
||||
final double dy = windowPos[1];
|
||||
final deltaX = details.globalPosition.dx - winX;
|
||||
final deltaY = details.globalPosition.dy - winY;
|
||||
await CocoaWindowChannel.instance.setWindowPosition(Offset(dx + deltaX, dy - deltaY));
|
||||
await CocoaWindowChannel.instance
|
||||
.setWindowPosition(Offset(dx + deltaX, dy - deltaY));
|
||||
},
|
||||
child: widget.child,
|
||||
);
|
||||
|
@ -23,7 +23,7 @@ class BoardBloc extends Bloc<BoardEvent, BoardState> {
|
||||
final BoardDataController _gridDataController;
|
||||
late final AFBoardDataController boardController;
|
||||
final MoveRowFFIService _rowService;
|
||||
LinkedHashMap<String, GroupController> groupControllers = LinkedHashMap.new();
|
||||
LinkedHashMap<String, GroupController> groupControllers = LinkedHashMap();
|
||||
|
||||
GridFieldCache get fieldCache => _gridDataController.fieldCache;
|
||||
String get gridId => _gridDataController.gridId;
|
||||
|
@ -52,7 +52,8 @@ class BoardDataController {
|
||||
BoardDataController({required ViewPB view})
|
||||
: gridId = view.id,
|
||||
_listener = BoardListener(view.id),
|
||||
_blocks = LinkedHashMap.new(),
|
||||
// ignore: prefer_collection_literals
|
||||
_blocks = LinkedHashMap(),
|
||||
_gridFFIService = GridFFIService(gridId: view.id),
|
||||
fieldCache = GridFieldCache(gridId: view.id);
|
||||
|
||||
|
@ -79,7 +79,7 @@ class BoardDateCellState with _$BoardDateCellState {
|
||||
String _dateStrFromCellData(DateCellDataPB? cellData) {
|
||||
String dateStr = "";
|
||||
if (cellData != null) {
|
||||
dateStr = cellData.date + " " + cellData.time;
|
||||
dateStr = "${cellData.date} ${cellData.time}";
|
||||
}
|
||||
return dateStr;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ class _BoardSelectOptionCellState extends State<BoardSelectOptionCell> {
|
||||
alignment: AlignmentDirectional.center,
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
Wrap(children: children, spacing: 4, runSpacing: 2),
|
||||
Wrap(spacing: 4, runSpacing: 2, children: children),
|
||||
_SelectOptionDialog(
|
||||
controller: widget.cellControllerBuilder.build(),
|
||||
),
|
||||
|
@ -26,8 +26,8 @@ class BoardCardContainer extends StatelessWidget {
|
||||
final accessories = accessoryBuilder!(context);
|
||||
if (accessories.isNotEmpty) {
|
||||
container = _CardEnterRegion(
|
||||
child: container,
|
||||
accessories: accessories,
|
||||
child: container,
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -78,9 +78,9 @@ class CardAccessoryContainer extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
return GestureDetector(
|
||||
child: hover,
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => accessory.onTap(context),
|
||||
child: hover,
|
||||
);
|
||||
}).toList();
|
||||
|
||||
|
@ -40,11 +40,11 @@ class DocumentBanner extends StatelessWidget {
|
||||
downColor: theme.main1,
|
||||
outlineColor: Colors.white,
|
||||
borderRadius: Corners.s8Border,
|
||||
onPressed: onRestore,
|
||||
child: FlowyText.medium(
|
||||
LocaleKeys.deletePagePrompt_restore.tr(),
|
||||
color: Colors.white,
|
||||
fontSize: 14),
|
||||
onPressed: onRestore),
|
||||
fontSize: 14)),
|
||||
const HSpace(20),
|
||||
BaseStyledButton(
|
||||
minWidth: 220,
|
||||
@ -55,11 +55,11 @@ class DocumentBanner extends StatelessWidget {
|
||||
downColor: theme.main1,
|
||||
outlineColor: Colors.white,
|
||||
borderRadius: Corners.s8Border,
|
||||
onPressed: onDelete,
|
||||
child: FlowyText.medium(
|
||||
LocaleKeys.deletePagePrompt_deletePermanent.tr(),
|
||||
color: Colors.white,
|
||||
fontSize: 14),
|
||||
onPressed: onDelete),
|
||||
fontSize: 14)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -16,7 +16,10 @@ class EditorCheckboxBuilder extends QuillCheckboxBuilder {
|
||||
EditorCheckboxBuilder(this.theme);
|
||||
|
||||
@override
|
||||
Widget build({required BuildContext context, required bool isChecked, required ValueChanged<bool> onChanged}) {
|
||||
Widget build(
|
||||
{required BuildContext context,
|
||||
required bool isChecked,
|
||||
required ValueChanged<bool> onChanged}) {
|
||||
return FlowyEditorCheckbox(
|
||||
theme: theme,
|
||||
isChecked: isChecked,
|
||||
@ -37,10 +40,10 @@ class FlowyEditorCheckbox extends StatefulWidget {
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_FlowyEditorCheckboxState createState() => _FlowyEditorCheckboxState();
|
||||
FlowyEditorCheckboxState createState() => FlowyEditorCheckboxState();
|
||||
}
|
||||
|
||||
class _FlowyEditorCheckboxState extends State<FlowyEditorCheckbox> {
|
||||
class FlowyEditorCheckboxState extends State<FlowyEditorCheckbox> {
|
||||
late bool isChecked;
|
||||
|
||||
@override
|
||||
@ -51,7 +54,9 @@ class _FlowyEditorCheckboxState extends State<FlowyEditorCheckbox> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final icon = isChecked ? svgWidget('editor/editor_check') : svgWidget('editor/editor_uncheck');
|
||||
final icon = isChecked
|
||||
? svgWidget('editor/editor_check')
|
||||
: svgWidget('editor/editor_uncheck');
|
||||
return Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: FlowyIconButton(
|
||||
|
@ -28,10 +28,10 @@ class FlowyCheckListButton extends StatefulWidget {
|
||||
final String tooltipText;
|
||||
|
||||
@override
|
||||
_FlowyCheckListButtonState createState() => _FlowyCheckListButtonState();
|
||||
FlowyCheckListButtonState createState() => FlowyCheckListButtonState();
|
||||
}
|
||||
|
||||
class _FlowyCheckListButtonState extends State<FlowyCheckListButton> {
|
||||
class FlowyCheckListButtonState extends State<FlowyCheckListButton> {
|
||||
bool? _isToggled;
|
||||
|
||||
Style get _selectionStyle => widget.controller.getSelectionStyle();
|
||||
|
@ -24,10 +24,10 @@ class FlowyColorButton extends StatefulWidget {
|
||||
final QuillIconTheme? iconTheme;
|
||||
|
||||
@override
|
||||
_FlowyColorButtonState createState() => _FlowyColorButtonState();
|
||||
FlowyColorButtonState createState() => FlowyColorButtonState();
|
||||
}
|
||||
|
||||
class _FlowyColorButtonState extends State<FlowyColorButton> {
|
||||
class FlowyColorButtonState extends State<FlowyColorButton> {
|
||||
late bool _isToggledColor;
|
||||
late bool _isToggledBackground;
|
||||
late bool _isWhite;
|
||||
@ -37,10 +37,14 @@ class _FlowyColorButtonState extends State<FlowyColorButton> {
|
||||
|
||||
void _didChangeEditingValue() {
|
||||
setState(() {
|
||||
_isToggledColor = _getIsToggledColor(widget.controller.getSelectionStyle().attributes);
|
||||
_isToggledBackground = _getIsToggledBackground(widget.controller.getSelectionStyle().attributes);
|
||||
_isWhite = _isToggledColor && _selectionStyle.attributes['color']!.value == '#ffffff';
|
||||
_isWhitebackground = _isToggledBackground && _selectionStyle.attributes['background']!.value == '#ffffff';
|
||||
_isToggledColor =
|
||||
_getIsToggledColor(widget.controller.getSelectionStyle().attributes);
|
||||
_isToggledBackground = _getIsToggledBackground(
|
||||
widget.controller.getSelectionStyle().attributes);
|
||||
_isWhite = _isToggledColor &&
|
||||
_selectionStyle.attributes['color']!.value == '#ffffff';
|
||||
_isWhitebackground = _isToggledBackground &&
|
||||
_selectionStyle.attributes['background']!.value == '#ffffff';
|
||||
});
|
||||
}
|
||||
|
||||
@ -49,8 +53,10 @@ class _FlowyColorButtonState extends State<FlowyColorButton> {
|
||||
super.initState();
|
||||
_isToggledColor = _getIsToggledColor(_selectionStyle.attributes);
|
||||
_isToggledBackground = _getIsToggledBackground(_selectionStyle.attributes);
|
||||
_isWhite = _isToggledColor && _selectionStyle.attributes['color']!.value == '#ffffff';
|
||||
_isWhitebackground = _isToggledBackground && _selectionStyle.attributes['background']!.value == '#ffffff';
|
||||
_isWhite = _isToggledColor &&
|
||||
_selectionStyle.attributes['color']!.value == '#ffffff';
|
||||
_isWhitebackground = _isToggledBackground &&
|
||||
_selectionStyle.attributes['background']!.value == '#ffffff';
|
||||
widget.controller.addListener(_didChangeEditingValue);
|
||||
}
|
||||
|
||||
@ -69,9 +75,12 @@ class _FlowyColorButtonState extends State<FlowyColorButton> {
|
||||
oldWidget.controller.removeListener(_didChangeEditingValue);
|
||||
widget.controller.addListener(_didChangeEditingValue);
|
||||
_isToggledColor = _getIsToggledColor(_selectionStyle.attributes);
|
||||
_isToggledBackground = _getIsToggledBackground(_selectionStyle.attributes);
|
||||
_isWhite = _isToggledColor && _selectionStyle.attributes['color']!.value == '#ffffff';
|
||||
_isWhitebackground = _isToggledBackground && _selectionStyle.attributes['background']!.value == '#ffffff';
|
||||
_isToggledBackground =
|
||||
_getIsToggledBackground(_selectionStyle.attributes);
|
||||
_isWhite = _isToggledColor &&
|
||||
_selectionStyle.attributes['color']!.value == '#ffffff';
|
||||
_isWhitebackground = _isToggledBackground &&
|
||||
_selectionStyle.attributes['background']!.value == '#ffffff';
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,9 +97,10 @@ class _FlowyColorButtonState extends State<FlowyColorButton> {
|
||||
final fillColor = _isToggledColor && !widget.background && _isWhite
|
||||
? stringToColor('#ffffff')
|
||||
: (widget.iconTheme?.iconUnselectedFillColor ?? theme.canvasColor);
|
||||
final fillColorBackground = _isToggledBackground && widget.background && _isWhitebackground
|
||||
? stringToColor('#ffffff')
|
||||
: (widget.iconTheme?.iconUnselectedFillColor ?? theme.canvasColor);
|
||||
final fillColorBackground =
|
||||
_isToggledBackground && widget.background && _isWhitebackground
|
||||
? stringToColor('#ffffff')
|
||||
: (widget.iconTheme?.iconUnselectedFillColor ?? theme.canvasColor);
|
||||
|
||||
return Tooltip(
|
||||
message: LocaleKeys.toolbar_highlight.tr(),
|
||||
@ -99,7 +109,8 @@ class _FlowyColorButtonState extends State<FlowyColorButton> {
|
||||
highlightElevation: 0,
|
||||
hoverElevation: 0,
|
||||
size: widget.iconSize * kIconButtonFactor,
|
||||
icon: Icon(widget.icon, size: widget.iconSize, color: theme.iconTheme.color),
|
||||
icon: Icon(widget.icon,
|
||||
size: widget.iconSize, color: theme.iconTheme.color),
|
||||
fillColor: widget.background ? fillColorBackground : fillColor,
|
||||
onPressed: _showColorPicker,
|
||||
),
|
||||
@ -112,13 +123,16 @@ class _FlowyColorButtonState extends State<FlowyColorButton> {
|
||||
hex = hex.substring(2);
|
||||
}
|
||||
hex = '#$hex';
|
||||
widget.controller.formatSelection(widget.background ? BackgroundAttribute(hex) : ColorAttribute(hex));
|
||||
widget.controller.formatSelection(
|
||||
widget.background ? BackgroundAttribute(hex) : ColorAttribute(hex));
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
|
||||
void _showColorPicker() {
|
||||
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 initialColor = 0;
|
||||
if (values.isNotEmpty) {
|
||||
assert(values.length == 1);
|
||||
@ -160,7 +174,9 @@ class FlowyColorPicker extends StatefulWidget {
|
||||
];
|
||||
final Function(Color?) onColorChanged;
|
||||
final int initialColor;
|
||||
FlowyColorPicker({Key? key, required this.onColorChanged, this.initialColor = 0}) : super(key: key);
|
||||
FlowyColorPicker(
|
||||
{Key? key, required this.onColorChanged, this.initialColor = 0})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
State<FlowyColorPicker> createState() => _FlowyColorPickerState();
|
||||
@ -178,8 +194,10 @@ class _FlowyColorPickerState extends State<FlowyColorPicker> {
|
||||
const double crossAxisSpacing = 10;
|
||||
final numberOfRows = (widget.colors.length / crossAxisCount).ceil();
|
||||
|
||||
const perRowHeight = ((width - ((crossAxisCount - 1) * mainAxisSpacing)) / crossAxisCount);
|
||||
final totalHeight = numberOfRows * perRowHeight + numberOfRows * crossAxisSpacing;
|
||||
const perRowHeight =
|
||||
((width - ((crossAxisCount - 1) * mainAxisSpacing)) / crossAxisCount);
|
||||
final totalHeight =
|
||||
numberOfRows * perRowHeight + numberOfRows * crossAxisSpacing;
|
||||
|
||||
return Container(
|
||||
constraints: BoxConstraints.tightFor(width: width, height: totalHeight),
|
||||
@ -198,7 +216,8 @@ class _FlowyColorPickerState extends State<FlowyColorPicker> {
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(BuildContext context, int index) {
|
||||
if (widget.colors.length > index) {
|
||||
final isSelected = widget.colors[index] == widget.initialColor;
|
||||
final isSelected =
|
||||
widget.colors[index] == widget.initialColor;
|
||||
return ColorItem(
|
||||
color: Color(widget.colors[index]),
|
||||
onPressed: widget.onColorChanged,
|
||||
@ -242,7 +261,8 @@ class ColorItem extends StatelessWidget {
|
||||
);
|
||||
} else {
|
||||
return RawMaterialButton(
|
||||
shape: const CircleBorder(side: BorderSide(color: Colors.white, width: 8)) +
|
||||
shape: const CircleBorder(
|
||||
side: BorderSide(color: Colors.white, width: 8)) +
|
||||
CircleBorder(side: BorderSide(color: color, width: 4)),
|
||||
onPressed: () {
|
||||
if (isSelected) {
|
||||
|
@ -16,10 +16,10 @@ class FlowyHeaderStyleButton extends StatefulWidget {
|
||||
final double iconSize;
|
||||
|
||||
@override
|
||||
_FlowyHeaderStyleButtonState createState() => _FlowyHeaderStyleButtonState();
|
||||
FlowyHeaderStyleButtonState createState() => FlowyHeaderStyleButtonState();
|
||||
}
|
||||
|
||||
class _FlowyHeaderStyleButtonState extends State<FlowyHeaderStyleButton> {
|
||||
class FlowyHeaderStyleButtonState extends State<FlowyHeaderStyleButton> {
|
||||
Attribute? _value;
|
||||
|
||||
Style get _selectionStyle => widget.controller.getSelectionStyle();
|
||||
@ -28,22 +28,27 @@ class _FlowyHeaderStyleButtonState extends State<FlowyHeaderStyleButton> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
setState(() {
|
||||
_value = _selectionStyle.attributes[Attribute.header.key] ?? Attribute.header;
|
||||
_value =
|
||||
_selectionStyle.attributes[Attribute.header.key] ?? Attribute.header;
|
||||
});
|
||||
widget.controller.addListener(_didChangeEditingValue);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final _valueToText = <Attribute, String>{
|
||||
final valueToText = <Attribute, String>{
|
||||
Attribute.h1: 'H1',
|
||||
Attribute.h2: 'H2',
|
||||
Attribute.h3: 'H3',
|
||||
};
|
||||
|
||||
final _valueAttribute = <Attribute>[Attribute.h1, Attribute.h2, Attribute.h3];
|
||||
final _valueString = <String>['H1', 'H2', 'H3'];
|
||||
final _attributeImageName = <String>['editor/H1', 'editor/H2', 'editor/H3'];
|
||||
final valueAttribute = <Attribute>[
|
||||
Attribute.h1,
|
||||
Attribute.h2,
|
||||
Attribute.h3
|
||||
];
|
||||
final valueString = <String>['H1', 'H2', 'H3'];
|
||||
final attributeImageName = <String>['editor/H1', 'editor/H2', 'editor/H3'];
|
||||
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@ -52,18 +57,18 @@ class _FlowyHeaderStyleButtonState extends State<FlowyHeaderStyleButton> {
|
||||
// _valueToText[_value] == _valueString[index] ? svg('editor/H1', color: Colors.white) : svg('editor/H1');
|
||||
|
||||
final headerTitle = "${LocaleKeys.toolbar_header.tr()} ${index + 1}";
|
||||
final _isToggled = _valueToText[_value] == _valueString[index];
|
||||
final isToggled = valueToText[_value] == valueString[index];
|
||||
return ToolbarIconButton(
|
||||
onPressed: () {
|
||||
if (_isToggled) {
|
||||
if (isToggled) {
|
||||
widget.controller.formatSelection(Attribute.header);
|
||||
} else {
|
||||
widget.controller.formatSelection(_valueAttribute[index]);
|
||||
widget.controller.formatSelection(valueAttribute[index]);
|
||||
}
|
||||
},
|
||||
width: widget.iconSize * kIconButtonFactor,
|
||||
iconName: _attributeImageName[index],
|
||||
isToggled: _isToggled,
|
||||
iconName: attributeImageName[index],
|
||||
isToggled: isToggled,
|
||||
tooltipText: headerTitle,
|
||||
);
|
||||
}),
|
||||
@ -72,7 +77,8 @@ class _FlowyHeaderStyleButtonState extends State<FlowyHeaderStyleButton> {
|
||||
|
||||
void _didChangeEditingValue() {
|
||||
setState(() {
|
||||
_value = _selectionStyle.attributes[Attribute.header.key] ?? Attribute.header;
|
||||
_value =
|
||||
_selectionStyle.attributes[Attribute.header.key] ?? Attribute.header;
|
||||
});
|
||||
}
|
||||
|
||||
@ -82,7 +88,8 @@ class _FlowyHeaderStyleButtonState extends State<FlowyHeaderStyleButton> {
|
||||
if (oldWidget.controller != widget.controller) {
|
||||
oldWidget.controller.removeListener(_didChangeEditingValue);
|
||||
widget.controller.addListener(_didChangeEditingValue);
|
||||
_value = _selectionStyle.attributes[Attribute.header.key] ?? Attribute.header;
|
||||
_value =
|
||||
_selectionStyle.attributes[Attribute.header.key] ?? Attribute.header;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,10 @@ class FlowyLinkStyleButton extends StatefulWidget {
|
||||
final double iconSize;
|
||||
|
||||
@override
|
||||
_FlowyLinkStyleButtonState createState() => _FlowyLinkStyleButtonState();
|
||||
FlowyLinkStyleButtonState createState() => FlowyLinkStyleButtonState();
|
||||
}
|
||||
|
||||
class _FlowyLinkStyleButtonState extends State<FlowyLinkStyleButton> {
|
||||
class FlowyLinkStyleButtonState extends State<FlowyLinkStyleButton> {
|
||||
void _didChangeSelection() {
|
||||
setState(() {});
|
||||
}
|
||||
@ -75,7 +75,9 @@ class _FlowyLinkStyleButtonState extends State<FlowyLinkStyleButton> {
|
||||
|
||||
void _openLinkDialog(BuildContext context) {
|
||||
final style = widget.controller.getSelectionStyle();
|
||||
final values = style.values.where((v) => v.key == Attribute.link.key).map((v) => v.value);
|
||||
final values = style.values
|
||||
.where((v) => v.key == Attribute.link.key)
|
||||
.map((v) => v.value);
|
||||
String value = "";
|
||||
if (values.isNotEmpty) {
|
||||
assert(values.length == 1);
|
||||
|
@ -21,10 +21,10 @@ class FlowyToggleStyleButton extends StatefulWidget {
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_ToggleStyleButtonState createState() => _ToggleStyleButtonState();
|
||||
ToggleStyleButtonState createState() => ToggleStyleButtonState();
|
||||
}
|
||||
|
||||
class _ToggleStyleButtonState extends State<FlowyToggleStyleButton> {
|
||||
class ToggleStyleButtonState extends State<FlowyToggleStyleButton> {
|
||||
bool? _isToggled;
|
||||
Style get _selectionStyle => widget.controller.getSelectionStyle();
|
||||
@override
|
||||
@ -77,6 +77,8 @@ class _ToggleStyleButtonState extends State<FlowyToggleStyleButton> {
|
||||
}
|
||||
|
||||
void _toggleAttribute() {
|
||||
widget.controller.formatSelection(_isToggled! ? Attribute.clone(widget.attribute, null) : widget.attribute);
|
||||
widget.controller.formatSelection(_isToggled!
|
||||
? Attribute.clone(widget.attribute, null)
|
||||
: widget.attribute);
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,8 @@ class EditorToolbar extends StatelessWidget implements PreferredSizeWidget {
|
||||
return Container(
|
||||
color: Theme.of(context).canvasColor,
|
||||
constraints: BoxConstraints.tightFor(height: preferredSize.height),
|
||||
child: ToolbarButtonList(buttons: children).padding(horizontal: 4, vertical: 4),
|
||||
child: ToolbarButtonList(buttons: children)
|
||||
.padding(horizontal: 4, vertical: 4),
|
||||
);
|
||||
}
|
||||
|
||||
@ -168,10 +169,11 @@ class ToolbarButtonList extends StatefulWidget {
|
||||
final List<Widget> buttons;
|
||||
|
||||
@override
|
||||
_ToolbarButtonListState createState() => _ToolbarButtonListState();
|
||||
ToolbarButtonListState createState() => ToolbarButtonListState();
|
||||
}
|
||||
|
||||
class _ToolbarButtonListState extends State<ToolbarButtonList> with WidgetsBindingObserver {
|
||||
class ToolbarButtonListState extends State<ToolbarButtonList>
|
||||
with WidgetsBindingObserver {
|
||||
final ScrollController _controller = ScrollController();
|
||||
bool _showLeftArrow = false;
|
||||
bool _showRightArrow = false;
|
||||
@ -196,7 +198,8 @@ class _ToolbarButtonListState extends State<ToolbarButtonList> with WidgetsBindi
|
||||
return LayoutBuilder(
|
||||
builder: (BuildContext context, BoxConstraints constraints) {
|
||||
List<Widget> children = [];
|
||||
double width = (widget.buttons.length + 2) * defaultIconSize * kIconButtonFactor;
|
||||
double width =
|
||||
(widget.buttons.length + 2) * defaultIconSize * kIconButtonFactor;
|
||||
final isFit = constraints.maxWidth > width;
|
||||
if (!isFit) {
|
||||
children.add(_buildLeftArrow());
|
||||
@ -233,8 +236,10 @@ class _ToolbarButtonListState extends State<ToolbarButtonList> with WidgetsBindi
|
||||
void _handleScroll() {
|
||||
if (!mounted) return;
|
||||
setState(() {
|
||||
_showLeftArrow = _controller.position.minScrollExtent != _controller.position.pixels;
|
||||
_showRightArrow = _controller.position.maxScrollExtent != _controller.position.pixels;
|
||||
_showLeftArrow =
|
||||
_controller.position.minScrollExtent != _controller.position.pixels;
|
||||
_showRightArrow =
|
||||
_controller.position.maxScrollExtent != _controller.position.pixels;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -71,6 +71,6 @@ class GridCellIdentifier with _$GridCellIdentifier {
|
||||
FieldType get fieldType => field.fieldType;
|
||||
|
||||
ValueKey key() {
|
||||
return ValueKey(rowId + fieldId + "${field.fieldType}");
|
||||
return ValueKey("$rowId$fieldId${field.fieldType}");
|
||||
}
|
||||
}
|
||||
|
@ -119,13 +119,13 @@ class DateCalBloc extends Bloc<DateCalEvent, DateCalState> {
|
||||
}
|
||||
|
||||
String timeFormatPrompt(FlowyError error) {
|
||||
String msg = LocaleKeys.grid_field_invalidTimeFormat.tr() + ". ";
|
||||
String msg = "${LocaleKeys.grid_field_invalidTimeFormat.tr()}. ";
|
||||
switch (state.dateTypeOptionPB.timeFormat) {
|
||||
case TimeFormat.TwelveHour:
|
||||
msg = msg + "e.g. 01: 00 AM";
|
||||
msg = "${msg}e.g. 01: 00 AM";
|
||||
break;
|
||||
case TimeFormat.TwentyFourHour:
|
||||
msg = msg + "e.g. 13: 00";
|
||||
msg = "${msg}e.g. 13: 00";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -79,7 +79,7 @@ class DateCellState with _$DateCellState {
|
||||
String _dateStrFromCellData(DateCellDataPB? cellData) {
|
||||
String dateStr = "";
|
||||
if (cellData != null) {
|
||||
dateStr = cellData.date + " " + cellData.time;
|
||||
dateStr = "${cellData.date} ${cellData.time}";
|
||||
}
|
||||
return dateStr;
|
||||
}
|
||||
|
@ -1,12 +1,14 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:app_flowy/plugins/grid/application/cell/cell_service/cell_service.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:dartz/dartz.dart';
|
||||
import 'package:flowy_sdk/log.dart';
|
||||
import 'package:flowy_sdk/protobuf/flowy-grid/select_option.pb.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import 'package:app_flowy/plugins/grid/application/cell/cell_service/cell_service.dart';
|
||||
|
||||
import 'select_option_service.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
|
||||
part 'select_option_editor_bloc.freezed.dart';
|
||||
|
||||
|
@ -46,7 +46,8 @@ class GridDataController {
|
||||
|
||||
GridDataController({required ViewPB view})
|
||||
: gridId = view.id,
|
||||
_blocks = LinkedHashMap.new(),
|
||||
// ignore: prefer_collection_literals
|
||||
_blocks = LinkedHashMap(),
|
||||
_gridFFIService = GridFFIService(gridId: view.id),
|
||||
fieldCache = GridFieldCache(gridId: view.id);
|
||||
|
||||
|
@ -210,7 +210,8 @@ class GridRowCache {
|
||||
}
|
||||
|
||||
GridCellMap _makeGridCells(String rowId, RowPB? row) {
|
||||
var cellDataMap = GridCellMap.new();
|
||||
// ignore: prefer_collection_literals
|
||||
var cellDataMap = GridCellMap();
|
||||
for (final field in _fieldNotifier.fields) {
|
||||
if (field.visibility) {
|
||||
cellDataMap[field.id] = GridCellIdentifier(
|
||||
|
@ -190,12 +190,12 @@ class CellAccessoryContainer extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
return GestureDetector(
|
||||
child: hover,
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => accessory.onTap(),
|
||||
child: hover,
|
||||
);
|
||||
}).toList();
|
||||
|
||||
return Wrap(children: children, spacing: 6);
|
||||
return Wrap(spacing: 6, children: children);
|
||||
}
|
||||
}
|
||||
|
@ -44,8 +44,8 @@ class CellContainer extends StatelessWidget {
|
||||
|
||||
if (accessories.isNotEmpty) {
|
||||
container = _GridCellEnterRegion(
|
||||
child: container,
|
||||
accessories: accessories,
|
||||
child: container,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -48,8 +48,8 @@ class DateCellEditor with FlowyOverlayDelegate {
|
||||
|
||||
FlowyOverlay.of(context).insertWithAnchor(
|
||||
widget: OverlayContainer(
|
||||
child: calendar,
|
||||
constraints: BoxConstraints.loose(const Size(320, 500)),
|
||||
child: calendar,
|
||||
),
|
||||
identifier: DateCellEditor.identifier(),
|
||||
anchorContext: context,
|
||||
@ -304,9 +304,7 @@ class _DateTypeOptionButton extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = context.watch<AppTheme>();
|
||||
final title = LocaleKeys.grid_field_dateFormat.tr() +
|
||||
" &" +
|
||||
LocaleKeys.grid_field_timeFormat.tr();
|
||||
final title = "${LocaleKeys.grid_field_dateFormat.tr()} &${LocaleKeys.grid_field_timeFormat.tr()}";
|
||||
return BlocSelector<DateCalBloc, DateCalState, DateTypeOptionPB>(
|
||||
selector: (state) => state.dateTypeOptionPB,
|
||||
builder: (context, dateTypeOptionPB) {
|
||||
@ -349,8 +347,8 @@ class _CalDateTimeSetting extends StatefulWidget {
|
||||
hide(context);
|
||||
FlowyOverlay.of(context).insertWithAnchor(
|
||||
widget: OverlayContainer(
|
||||
child: this,
|
||||
constraints: BoxConstraints.loose(const Size(140, 100)),
|
||||
child: this,
|
||||
),
|
||||
identifier: _CalDateTimeSetting.identifier(),
|
||||
anchorContext: context,
|
||||
@ -415,8 +413,8 @@ class _CalDateTimeSettingState extends State<_CalDateTimeSetting> {
|
||||
overlayIdentifier = child.toString();
|
||||
FlowyOverlay.of(context).insertWithAnchor(
|
||||
widget: OverlayContainer(
|
||||
child: child,
|
||||
constraints: BoxConstraints.loose(const Size(460, 440)),
|
||||
child: child,
|
||||
),
|
||||
identifier: overlayIdentifier!,
|
||||
anchorContext: context,
|
||||
|
@ -163,14 +163,14 @@ class SelectOptionWrap extends StatelessWidget {
|
||||
child = Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Wrap(
|
||||
spacing: 4,
|
||||
runSpacing: 2,
|
||||
children: selectOptions
|
||||
.map((option) => SelectOptionTag.fromOption(
|
||||
context: context,
|
||||
option: option,
|
||||
))
|
||||
.toList(),
|
||||
spacing: 4,
|
||||
runSpacing: 2,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -72,8 +72,8 @@ class SelectOptionCellEditor extends StatelessWidget with FlowyOverlayDelegate {
|
||||
//
|
||||
FlowyOverlay.of(context).insertWithAnchor(
|
||||
widget: OverlayContainer(
|
||||
child: SizedBox(width: _editorPannelWidth, child: editor),
|
||||
constraints: BoxConstraints.loose(const Size(_editorPannelWidth, 300)),
|
||||
child: SizedBox(width: _editorPannelWidth, child: editor),
|
||||
),
|
||||
identifier: SelectOptionCellEditor.identifier(),
|
||||
anchorContext: context,
|
||||
@ -289,8 +289,8 @@ class _SelectOptionCell extends StatelessWidget {
|
||||
FlowyOverlay.of(context).remove(overlayIdentifier);
|
||||
FlowyOverlay.of(context).insertWithAnchor(
|
||||
widget: OverlayContainer(
|
||||
child: pannel,
|
||||
constraints: BoxConstraints.loose(const Size(200, 300)),
|
||||
child: pannel,
|
||||
),
|
||||
identifier: overlayIdentifier,
|
||||
anchorContext: context,
|
||||
|
@ -108,7 +108,7 @@ class SelectOptionTextField extends StatelessWidget {
|
||||
child: SingleChildScrollView(
|
||||
controller: sc,
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Wrap(children: children, spacing: 4),
|
||||
child: Wrap(spacing: 4, children: children),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -30,11 +30,11 @@ class URLCellEditor extends StatefulWidget with FlowyOverlayDelegate {
|
||||
//
|
||||
FlowyOverlay.of(context).insertWithAnchor(
|
||||
widget: OverlayContainer(
|
||||
constraints: BoxConstraints.loose(const Size(300, 160)),
|
||||
child: SizedBox(
|
||||
width: 200,
|
||||
child: Padding(padding: const EdgeInsets.all(6), child: editor),
|
||||
),
|
||||
constraints: BoxConstraints.loose(const Size(300, 160)),
|
||||
),
|
||||
identifier: URLCellEditor.identifier(),
|
||||
anchorContext: context,
|
||||
|
@ -24,8 +24,8 @@ class GridFieldCellActionSheet extends StatelessWidget
|
||||
void show(BuildContext overlayContext) {
|
||||
FlowyOverlay.of(overlayContext).insertWithAnchor(
|
||||
widget: OverlayContainer(
|
||||
child: this,
|
||||
constraints: BoxConstraints.loose(const Size(240, 200)),
|
||||
child: this,
|
||||
),
|
||||
identifier: GridFieldCellActionSheet.identifier(),
|
||||
anchorContext: overlayContext,
|
||||
|
@ -56,8 +56,8 @@ class FieldEditor extends StatelessWidget with FlowyOverlayDelegate {
|
||||
FlowyOverlay.of(context).remove(identifier());
|
||||
FlowyOverlay.of(context).insertWithAnchor(
|
||||
widget: OverlayContainer(
|
||||
child: this,
|
||||
constraints: BoxConstraints.loose(const Size(280, 400)),
|
||||
child: this,
|
||||
),
|
||||
identifier: identifier(),
|
||||
anchorContext: context,
|
||||
|
@ -110,8 +110,8 @@ class _FieldTypeOptionEditorState extends State<FieldTypeOptionEditor> {
|
||||
currentOverlayIdentifier = identifier;
|
||||
FlowyOverlay.of(context).insertWithAnchor(
|
||||
widget: OverlayContainer(
|
||||
child: child,
|
||||
constraints: BoxConstraints.loose(const Size(460, 440)),
|
||||
child: child,
|
||||
),
|
||||
identifier: identifier,
|
||||
anchorContext: context,
|
||||
|
@ -90,10 +90,10 @@ class NumberTypeOptionWidget extends TypeOptionWidget {
|
||||
}
|
||||
}
|
||||
|
||||
typedef _SelectNumberFormatCallback = Function(NumberFormat format);
|
||||
typedef SelectNumberFormatCallback = Function(NumberFormat format);
|
||||
|
||||
class NumberFormatList extends StatelessWidget {
|
||||
final _SelectNumberFormatCallback onSelected;
|
||||
final SelectNumberFormatCallback onSelected;
|
||||
final NumberFormat selectedFormat;
|
||||
const NumberFormatList(
|
||||
{required this.selectedFormat, required this.onSelected, Key? key})
|
||||
|
@ -190,7 +190,6 @@ class RowContent extends StatelessWidget {
|
||||
|
||||
return CellContainer(
|
||||
width: cellId.field.width.toDouble(),
|
||||
child: child,
|
||||
rowStateNotifier:
|
||||
Provider.of<RegionStateNotifier>(context, listen: false),
|
||||
accessoryBuilder: (buildContext) {
|
||||
@ -208,6 +207,7 @@ class RowContent extends StatelessWidget {
|
||||
}
|
||||
return accessories;
|
||||
},
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
).toList();
|
||||
|
@ -59,8 +59,8 @@ class GridRowActionSheet extends StatelessWidget {
|
||||
}) {
|
||||
FlowyOverlay.of(overlayContext).insertWithAnchor(
|
||||
widget: OverlayContainer(
|
||||
child: this,
|
||||
constraints: BoxConstraints.loose(const Size(140, 200)),
|
||||
child: this,
|
||||
),
|
||||
identifier: GridRowActionSheet.identifier(),
|
||||
anchorContext: overlayContext,
|
||||
|
@ -38,8 +38,8 @@ class RowDetailPage extends StatefulWidget with FlowyOverlayDelegate {
|
||||
final size = windowSize * 0.5;
|
||||
FlowyOverlay.of(context).insertWithRect(
|
||||
widget: OverlayContainer(
|
||||
child: this,
|
||||
constraints: BoxConstraints.tight(size),
|
||||
child: this,
|
||||
),
|
||||
identifier: RowDetailPage.identifier(),
|
||||
anchorPosition: Offset(-size.width / 2.0, -size.height / 2.0),
|
||||
@ -156,9 +156,9 @@ class _RowDetailCell extends StatelessWidget {
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: () => cell.beginFocus.notify(),
|
||||
child: AccessoryHover(
|
||||
child: cell,
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 10, vertical: 12),
|
||||
child: cell,
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -30,8 +30,8 @@ class GridPropertyList extends StatelessWidget with FlowyOverlayDelegate {
|
||||
void show(BuildContext context) {
|
||||
FlowyOverlay.of(context).insertWithAnchor(
|
||||
widget: OverlayContainer(
|
||||
child: this,
|
||||
constraints: BoxConstraints.loose(const Size(260, 400)),
|
||||
child: this,
|
||||
),
|
||||
identifier: identifier(),
|
||||
anchorContext: context,
|
||||
|
@ -53,8 +53,8 @@ class GridSettingList extends StatelessWidget {
|
||||
|
||||
FlowyOverlay.of(context).insertWithAnchor(
|
||||
widget: OverlayContainer(
|
||||
child: list,
|
||||
constraints: BoxConstraints.loose(const Size(140, 400)),
|
||||
child: list,
|
||||
),
|
||||
identifier: list.identifier(),
|
||||
anchorContext: context,
|
||||
|
@ -91,12 +91,12 @@ class _TrashPageState extends State<TrashPage> {
|
||||
builder: (context, state) {
|
||||
return SizedBox.expand(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
_renderTopBar(context, theme, state),
|
||||
const VSpace(32),
|
||||
_renderTrashList(context, state),
|
||||
],
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
).padding(horizontal: horizontalPadding, vertical: 48),
|
||||
);
|
||||
},
|
||||
|
@ -20,39 +20,35 @@ class InitAppWidgetTask extends LaunchTask {
|
||||
final setting = await UserSettingsService().getAppearanceSettings();
|
||||
final settingModel = AppearanceSettingModel(setting);
|
||||
final app = ApplicationWidget(
|
||||
child: widget,
|
||||
settingModel: settingModel,
|
||||
child: widget,
|
||||
);
|
||||
BlocOverrides.runZoned(
|
||||
() {
|
||||
runApp(
|
||||
EasyLocalization(
|
||||
supportedLocales: const [
|
||||
// In alphabetical order
|
||||
Locale('ca', 'ES'),
|
||||
Locale('de', 'DE'),
|
||||
Locale('en'),
|
||||
Locale('es', 'VE'),
|
||||
Locale('fr', 'FR'),
|
||||
Locale('fr', 'CA'),
|
||||
Locale('hu', 'HU'),
|
||||
Locale('id', 'ID'),
|
||||
Locale('it', 'IT'),
|
||||
Locale('ja', 'JP'),
|
||||
Locale('pl', 'PL'),
|
||||
Locale('pt', 'BR'),
|
||||
Locale('ru', 'RU'),
|
||||
Locale('tr', 'TR'),
|
||||
Locale('zh', 'CN'),
|
||||
],
|
||||
path: 'assets/translations',
|
||||
fallbackLocale: const Locale('en'),
|
||||
saveLocale: false,
|
||||
child: app,
|
||||
),
|
||||
);
|
||||
},
|
||||
blocObserver: ApplicationBlocObserver(),
|
||||
Bloc.observer = ApplicationBlocObserver();
|
||||
runApp(
|
||||
EasyLocalization(
|
||||
supportedLocales: const [
|
||||
// In alphabetical order
|
||||
Locale('ca', 'ES'),
|
||||
Locale('de', 'DE'),
|
||||
Locale('en'),
|
||||
Locale('es', 'VE'),
|
||||
Locale('fr', 'FR'),
|
||||
Locale('fr', 'CA'),
|
||||
Locale('hu', 'HU'),
|
||||
Locale('id', 'ID'),
|
||||
Locale('it', 'IT'),
|
||||
Locale('ja', 'JP'),
|
||||
Locale('pl', 'PL'),
|
||||
Locale('pt', 'BR'),
|
||||
Locale('ru', 'RU'),
|
||||
Locale('tr', 'TR'),
|
||||
Locale('zh', 'CN'),
|
||||
],
|
||||
path: 'assets/translations',
|
||||
fallbackLocale: const Locale('en'),
|
||||
saveLocale: false,
|
||||
child: app,
|
||||
),
|
||||
);
|
||||
|
||||
return Future(() => {});
|
||||
|
@ -28,16 +28,19 @@ class AuthRouter {
|
||||
);
|
||||
}
|
||||
|
||||
void pushHomeScreen(BuildContext context, UserProfilePB profile, CurrentWorkspaceSettingPB workspaceSetting) {
|
||||
void pushHomeScreen(BuildContext context, UserProfilePB profile,
|
||||
CurrentWorkspaceSettingPB workspaceSetting) {
|
||||
Navigator.push(
|
||||
context,
|
||||
PageRoutes.fade(() => HomeScreen(profile, workspaceSetting), RouteDurations.slow.inMilliseconds * .001),
|
||||
PageRoutes.fade(() => HomeScreen(profile, workspaceSetting),
|
||||
RouteDurations.slow.inMilliseconds * .001),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class SplashRoute {
|
||||
Future<void> pushWelcomeScreen(BuildContext context, UserProfilePB userProfile) async {
|
||||
Future<void> pushWelcomeScreen(
|
||||
BuildContext context, UserProfilePB userProfile) async {
|
||||
final screen = WelcomeScreen(userProfile: userProfile);
|
||||
final workspaceId = await Navigator.of(context).push(
|
||||
PageRoutes.fade(
|
||||
@ -46,20 +49,24 @@ class SplashRoute {
|
||||
),
|
||||
);
|
||||
|
||||
// ignore: use_build_context_synchronously
|
||||
pushHomeScreen(context, userProfile, workspaceId);
|
||||
}
|
||||
|
||||
void pushHomeScreen(BuildContext context, UserProfilePB userProfile, CurrentWorkspaceSettingPB workspaceSetting) {
|
||||
void pushHomeScreen(BuildContext context, UserProfilePB userProfile,
|
||||
CurrentWorkspaceSettingPB workspaceSetting) {
|
||||
Navigator.push(
|
||||
context,
|
||||
PageRoutes.fade(() => HomeScreen(userProfile, workspaceSetting), RouteDurations.slow.inMilliseconds * .001),
|
||||
PageRoutes.fade(() => HomeScreen(userProfile, workspaceSetting),
|
||||
RouteDurations.slow.inMilliseconds * .001),
|
||||
);
|
||||
}
|
||||
|
||||
void pushSignInScreen(BuildContext context) {
|
||||
Navigator.push(
|
||||
context,
|
||||
PageRoutes.fade(() => SignInScreen(router: getIt<AuthRouter>()), RouteDurations.slow.inMilliseconds * .001),
|
||||
PageRoutes.fade(() => SignInScreen(router: getIt<AuthRouter>()),
|
||||
RouteDurations.slow.inMilliseconds * .001),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -94,6 +94,7 @@ class SignUpPrompt extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final theme = context.watch<AppTheme>();
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(LocaleKeys.signIn_dontHaveAnAccount.tr(), style: TextStyle(color: theme.shader3, fontSize: 12)),
|
||||
TextButton(
|
||||
@ -107,7 +108,6 @@ class SignUpPrompt extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
],
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -86,6 +86,7 @@ class SignUpPrompt extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final theme = context.watch<AppTheme>();
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
LocaleKeys.signUp_alreadyHaveAnAccount.tr(),
|
||||
@ -97,7 +98,6 @@ class SignUpPrompt extends StatelessWidget {
|
||||
child: Text(LocaleKeys.signIn_buttonText.tr(), style: TextStyle(color: theme.main1)),
|
||||
),
|
||||
],
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -399,8 +399,8 @@ class AutolinkExtensionSyntax extends InlineSyntax {
|
||||
}
|
||||
}
|
||||
|
||||
class _DelimiterRun {
|
||||
_DelimiterRun._(
|
||||
class DelimiterRun {
|
||||
DelimiterRun._(
|
||||
{this.char,
|
||||
this.length,
|
||||
this.isLeftFlanking,
|
||||
@ -420,8 +420,7 @@ class _DelimiterRun {
|
||||
final bool? isFollowedByPunctuation;
|
||||
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static _DelimiterRun? tryParse(
|
||||
InlineParser parser, int runStart, int runEnd) {
|
||||
static DelimiterRun? tryParse(InlineParser parser, int runStart, int runEnd) {
|
||||
bool leftFlanking,
|
||||
rightFlanking,
|
||||
precededByPunctuation,
|
||||
@ -466,7 +465,7 @@ class _DelimiterRun {
|
||||
return null;
|
||||
}
|
||||
|
||||
return _DelimiterRun._(
|
||||
return DelimiterRun._(
|
||||
char: parser.charAt(runStart),
|
||||
length: runEnd - runStart + 1,
|
||||
isLeftFlanking: leftFlanking,
|
||||
@ -516,7 +515,7 @@ class TagSyntax extends InlineSyntax {
|
||||
return true;
|
||||
}
|
||||
|
||||
final delimiterRun = _DelimiterRun.tryParse(parser, matchStart, matchEnd);
|
||||
final delimiterRun = DelimiterRun.tryParse(parser, matchStart, matchEnd);
|
||||
if (delimiterRun != null && delimiterRun.canOpen) {
|
||||
parser.openTag(TagState(parser.pos, matchEnd + 1, this, delimiterRun));
|
||||
return true;
|
||||
@ -531,7 +530,7 @@ class TagSyntax extends InlineSyntax {
|
||||
final matchStart = parser.pos;
|
||||
final matchEnd = parser.pos + runLength - 1;
|
||||
final openingRunLength = state.endPos - state.startPos;
|
||||
final delimiterRun = _DelimiterRun.tryParse(parser, matchStart, matchEnd);
|
||||
final delimiterRun = DelimiterRun.tryParse(parser, matchStart, matchEnd);
|
||||
|
||||
if (openingRunLength == 1 && runLength == 1) {
|
||||
parser.addNode(Element('em', state.children));
|
||||
@ -579,7 +578,7 @@ class StrikethroughSyntax extends TagSyntax {
|
||||
final runLength = match.group(0)!.length;
|
||||
final matchStart = parser.pos;
|
||||
final matchEnd = parser.pos + runLength - 1;
|
||||
final delimiterRun = _DelimiterRun.tryParse(parser, matchStart, matchEnd)!;
|
||||
final delimiterRun = DelimiterRun.tryParse(parser, matchStart, matchEnd)!;
|
||||
if (!delimiterRun.isRightFlanking!) {
|
||||
return false;
|
||||
}
|
||||
@ -1170,7 +1169,7 @@ class TagState {
|
||||
/// The children of this node. Will be `null` for text nodes.
|
||||
final List<Node> children;
|
||||
|
||||
final _DelimiterRun? openingDelimiterRun;
|
||||
final DelimiterRun? openingDelimiterRun;
|
||||
|
||||
/// Attempts to close this tag by matching the current text against its end
|
||||
/// pattern.
|
||||
@ -1193,7 +1192,7 @@ class TagState {
|
||||
final closingMatchStart = parser.pos;
|
||||
final closingMatchEnd = parser.pos + runLength - 1;
|
||||
final closingDelimiterRun =
|
||||
_DelimiterRun.tryParse(parser, closingMatchStart, closingMatchEnd);
|
||||
DelimiterRun.tryParse(parser, closingMatchStart, closingMatchEnd);
|
||||
if (closingDelimiterRun != null && closingDelimiterRun.canClose) {
|
||||
// Emphasis rules #9 and #10:
|
||||
final oneRunOpensAndCloses =
|
||||
|
@ -58,10 +58,10 @@ class FadingIndexedStack extends StatefulWidget {
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_FadingIndexedStackState createState() => _FadingIndexedStackState();
|
||||
FadingIndexedStackState createState() => FadingIndexedStackState();
|
||||
}
|
||||
|
||||
class _FadingIndexedStackState extends State<FadingIndexedStack> {
|
||||
class FadingIndexedStackState extends State<FadingIndexedStack> {
|
||||
double _targetOpacity = 1;
|
||||
|
||||
@override
|
||||
|
@ -13,14 +13,14 @@ class HomeHotKeys extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
HotKey _hotKey = HotKey(
|
||||
HotKey hotKey = HotKey(
|
||||
KeyCode.backslash,
|
||||
modifiers: [Platform.isMacOS ? KeyModifier.meta : KeyModifier.control],
|
||||
// Set hotkey scope (default is HotKeyScope.system)
|
||||
scope: HotKeyScope.inapp, // Set as inapp-wide hotkey.
|
||||
);
|
||||
hotKeyManager.register(
|
||||
_hotKey,
|
||||
hotKey,
|
||||
keyDownHandler: (hotKey) {
|
||||
context.read<HomeBloc>().add(const HomeEvent.collapseMenu());
|
||||
getIt<HomeStackManager>().collapsedNotifier.value =
|
||||
|
@ -222,7 +222,7 @@ class MenuTopBar extends StatelessWidget {
|
||||
Tooltip(
|
||||
richMessage: TextSpan(children: [
|
||||
TextSpan(
|
||||
text: LocaleKeys.sideBar_closeSidebar.tr() + "\n"),
|
||||
text: "${LocaleKeys.sideBar_closeSidebar.tr()}\n"),
|
||||
TextSpan(
|
||||
text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
|
||||
style: const TextStyle(color: Colors.white60),
|
||||
|
@ -24,6 +24,7 @@ class MenuUser extends StatelessWidget {
|
||||
getIt<MenuUserBloc>(param1: user)..add(const MenuUserEvent.initial()),
|
||||
child: BlocBuilder<MenuUserBloc, MenuUserState>(
|
||||
builder: (context, state) => Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
_renderAvatar(context),
|
||||
const HSpace(10),
|
||||
@ -34,7 +35,6 @@ class MenuUser extends StatelessWidget {
|
||||
//we get the below block back
|
||||
//_renderDropButton(context),
|
||||
],
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -101,7 +101,7 @@ class FlowyNavigation extends StatelessWidget {
|
||||
turns: const AlwaysStoppedAnimation(180 / 360),
|
||||
child: Tooltip(
|
||||
richMessage: TextSpan(children: [
|
||||
TextSpan(text: LocaleKeys.sideBar_openSidebar.tr() + "\n"),
|
||||
TextSpan(text: "${LocaleKeys.sideBar_openSidebar.tr()}\n"),
|
||||
TextSpan(
|
||||
text: Platform.isMacOS ? "⌘+\\" : "Ctrl+\\",
|
||||
style: const TextStyle(color: Colors.white60),
|
||||
|
@ -10,14 +10,14 @@ class FlowyMessageToast extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
child: FlowyText.medium(message, color: Colors.white),
|
||||
),
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(4)),
|
||||
color: Colors.black,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
child: FlowyText.medium(message, color: Colors.white),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -84,8 +84,8 @@ class _LanguageSelectorDropdownState extends State<LanguageSelectorDropdown> {
|
||||
});
|
||||
},
|
||||
icon: const Visibility(
|
||||
child: (Icon(Icons.arrow_downward)),
|
||||
visible: false,
|
||||
child: (Icon(Icons.arrow_downward)),
|
||||
),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
items: EasyLocalization.of(context)!.supportedLocales.map((locale) {
|
||||
|
@ -19,10 +19,10 @@ class AnimatedPanel extends StatefulWidget {
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_AnimatedPanelState createState() => _AnimatedPanelState();
|
||||
AnimatedPanelState createState() => AnimatedPanelState();
|
||||
}
|
||||
|
||||
class _AnimatedPanelState extends State<AnimatedPanel> {
|
||||
class AnimatedPanelState extends State<AnimatedPanel> {
|
||||
bool _isHidden = true;
|
||||
|
||||
@override
|
||||
@ -79,9 +79,9 @@ extension AnimatedPanelExtensions on Widget {
|
||||
return AnimatedPanel(
|
||||
closedX: closePos.dx,
|
||||
closedY: closePos.dy,
|
||||
child: this,
|
||||
isClosed: isClosed ?? false,
|
||||
duration: duration ?? .35,
|
||||
curve: curve);
|
||||
curve: curve,
|
||||
child: this);
|
||||
}
|
||||
}
|
||||
|
@ -10,28 +10,34 @@ import 'emoji_picker_builder.dart';
|
||||
import 'emoji_view_state.dart';
|
||||
|
||||
class DefaultEmojiPickerView extends EmojiPickerBuilder {
|
||||
const DefaultEmojiPickerView(Config config, EmojiViewState state, {Key? key}) : super(config, state, key: key);
|
||||
const DefaultEmojiPickerView(Config config, EmojiViewState state, {Key? key})
|
||||
: super(config, state, key: key);
|
||||
|
||||
@override
|
||||
_DefaultEmojiPickerViewState createState() => _DefaultEmojiPickerViewState();
|
||||
DefaultEmojiPickerViewState createState() => DefaultEmojiPickerViewState();
|
||||
}
|
||||
|
||||
class _DefaultEmojiPickerViewState extends State<DefaultEmojiPickerView> with TickerProviderStateMixin {
|
||||
class DefaultEmojiPickerViewState extends State<DefaultEmojiPickerView>
|
||||
with TickerProviderStateMixin {
|
||||
PageController? _pageController;
|
||||
TabController? _tabController;
|
||||
final TextEditingController _emojiController = TextEditingController();
|
||||
final FocusNode _emojiFocusNode = FocusNode();
|
||||
final CategoryEmoji _categoryEmoji = CategoryEmoji(Category.SEARCH, List.empty(growable: true));
|
||||
final CategoryEmoji _categoryEmoji =
|
||||
CategoryEmoji(Category.SEARCH, List.empty(growable: true));
|
||||
CategoryEmoji searchEmojiList = CategoryEmoji(Category.SEARCH, <Emoji>[]);
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
var initCategory =
|
||||
widget.state.categoryEmoji.indexWhere((element) => element.category == widget.config.initCategory);
|
||||
var initCategory = widget.state.categoryEmoji.indexWhere(
|
||||
(element) => element.category == widget.config.initCategory);
|
||||
if (initCategory == -1) {
|
||||
initCategory = 0;
|
||||
}
|
||||
_tabController = TabController(initialIndex: initCategory, length: widget.state.categoryEmoji.length, vsync: this);
|
||||
_tabController = TabController(
|
||||
initialIndex: initCategory,
|
||||
length: widget.state.categoryEmoji.length,
|
||||
vsync: this);
|
||||
_pageController = PageController(initialPage: initCategory);
|
||||
_emojiFocusNode.requestFocus();
|
||||
|
||||
@ -83,7 +89,8 @@ class _DefaultEmojiPickerViewState extends State<DefaultEmojiPickerView> with Ti
|
||||
}
|
||||
|
||||
bool isEmojiSearching() {
|
||||
bool result = searchEmojiList.emoji.isNotEmpty || _emojiController.text.isNotEmpty;
|
||||
bool result =
|
||||
searchEmojiList.emoji.isNotEmpty || _emojiController.text.isNotEmpty;
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -133,7 +140,9 @@ class _DefaultEmojiPickerViewState extends State<DefaultEmojiPickerView> with Ti
|
||||
child: TabBar(
|
||||
labelColor: widget.config.iconColorSelected,
|
||||
unselectedLabelColor: widget.config.iconColor,
|
||||
controller: isEmojiSearching() ? TabController(length: 1, vsync: this) : _tabController,
|
||||
controller: isEmojiSearching()
|
||||
? TabController(length: 1, vsync: this)
|
||||
: _tabController,
|
||||
labelPadding: EdgeInsets.zero,
|
||||
indicatorColor: widget.config.indicatorColor,
|
||||
padding: const EdgeInsets.symmetric(vertical: 5.0),
|
||||
@ -154,7 +163,8 @@ class _DefaultEmojiPickerViewState extends State<DefaultEmojiPickerView> with Ti
|
||||
: widget.state.categoryEmoji
|
||||
.asMap()
|
||||
.entries
|
||||
.map<Widget>((item) => _buildCategory(item.value.category, emojiSize))
|
||||
.map<Widget>((item) => _buildCategory(
|
||||
item.value.category, emojiSize))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
@ -163,7 +173,9 @@ class _DefaultEmojiPickerViewState extends State<DefaultEmojiPickerView> with Ti
|
||||
),
|
||||
Flexible(
|
||||
child: PageView.builder(
|
||||
itemCount: searchEmojiList.emoji.isNotEmpty ? 1 : widget.state.categoryEmoji.length,
|
||||
itemCount: searchEmojiList.emoji.isNotEmpty
|
||||
? 1
|
||||
: widget.state.categoryEmoji.length,
|
||||
controller: _pageController,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
// onPageChanged: (index) {
|
||||
@ -173,7 +185,9 @@ class _DefaultEmojiPickerViewState extends State<DefaultEmojiPickerView> with Ti
|
||||
// );
|
||||
// },
|
||||
itemBuilder: (context, index) {
|
||||
CategoryEmoji catEmoji = isEmojiSearching() ? searchEmojiList : widget.state.categoryEmoji[index];
|
||||
CategoryEmoji catEmoji = isEmojiSearching()
|
||||
? searchEmojiList
|
||||
: widget.state.categoryEmoji[index];
|
||||
return _buildPage(emojiSize, catEmoji);
|
||||
},
|
||||
),
|
||||
@ -195,24 +209,28 @@ class _DefaultEmojiPickerViewState extends State<DefaultEmojiPickerView> with Ti
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildButtonWidget({required VoidCallback onPressed, required Widget child}) {
|
||||
Widget _buildButtonWidget(
|
||||
{required VoidCallback onPressed, required Widget child}) {
|
||||
if (widget.config.buttonMode == ButtonMode.MATERIAL) {
|
||||
return TextButton(
|
||||
onPressed: onPressed,
|
||||
child: child,
|
||||
style: ButtonStyle(padding: MaterialStateProperty.all(EdgeInsets.zero)),
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
return CupertinoButton(padding: EdgeInsets.zero, onPressed: onPressed, child: child);
|
||||
return CupertinoButton(
|
||||
padding: EdgeInsets.zero, onPressed: onPressed, child: child);
|
||||
}
|
||||
|
||||
Widget _buildPage(double emojiSize, CategoryEmoji categoryEmoji) {
|
||||
// Display notice if recent has no entries yet
|
||||
final scrollController = ScrollController();
|
||||
|
||||
if (categoryEmoji.category == Category.RECENT && categoryEmoji.emoji.isEmpty) {
|
||||
if (categoryEmoji.category == Category.RECENT &&
|
||||
categoryEmoji.emoji.isEmpty) {
|
||||
return _buildNoRecent();
|
||||
} else if (categoryEmoji.category == Category.SEARCH && categoryEmoji.emoji.isEmpty) {
|
||||
} else if (categoryEmoji.category == Category.SEARCH &&
|
||||
categoryEmoji.emoji.isEmpty) {
|
||||
return const Center(child: Text("No Emoji Found"));
|
||||
}
|
||||
// Build page normally
|
||||
@ -236,8 +254,13 @@ class _DefaultEmojiPickerViewState extends State<DefaultEmojiPickerView> with Ti
|
||||
mainAxisSpacing: widget.config.verticalSpacing,
|
||||
crossAxisSpacing: widget.config.horizontalSpacing,
|
||||
children: _categoryEmoji.emoji.isNotEmpty
|
||||
? _categoryEmoji.emoji.map<Widget>((e) => _buildEmoji(emojiSize, categoryEmoji, e)).toList()
|
||||
: categoryEmoji.emoji.map<Widget>((item) => _buildEmoji(emojiSize, categoryEmoji, item)).toList(),
|
||||
? _categoryEmoji.emoji
|
||||
.map<Widget>((e) => _buildEmoji(emojiSize, categoryEmoji, e))
|
||||
.toList()
|
||||
: categoryEmoji.emoji
|
||||
.map<Widget>(
|
||||
(item) => _buildEmoji(emojiSize, categoryEmoji, item))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@ -20,10 +20,10 @@ class FlowyEmojiStyleButton extends StatefulWidget {
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_EmojiStyleButtonState createState() => _EmojiStyleButtonState();
|
||||
EmojiStyleButtonState createState() => EmojiStyleButtonState();
|
||||
}
|
||||
|
||||
class _EmojiStyleButtonState extends State<FlowyEmojiStyleButton> {
|
||||
class EmojiStyleButtonState extends State<FlowyEmojiStyleButton> {
|
||||
bool _isToggled = false;
|
||||
// Style get _selectionStyle => widget.controller.getSelectionStyle();
|
||||
final GlobalKey emojiButtonKey = GlobalKey();
|
||||
|
@ -101,10 +101,10 @@ class EmojiPicker extends StatefulWidget {
|
||||
final Config config;
|
||||
|
||||
@override
|
||||
_EmojiPickerState createState() => _EmojiPickerState();
|
||||
EmojiPickerState createState() => EmojiPickerState();
|
||||
}
|
||||
|
||||
class _EmojiPickerState extends State<EmojiPicker> {
|
||||
class EmojiPickerState extends State<EmojiPicker> {
|
||||
static const platform = MethodChannel('emoji_picker_flutter');
|
||||
|
||||
List<CategoryEmoji> categoryEmoji = List.empty(growable: true);
|
||||
@ -147,7 +147,8 @@ class _EmojiPickerState extends State<EmojiPicker> {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
if (widget.config.showRecentsTab) {
|
||||
categoryEmoji[0].emoji = recentEmoji.map((e) => e.emoji).toList().cast<Emoji>();
|
||||
categoryEmoji[0].emoji =
|
||||
recentEmoji.map((e) => e.emoji).toList().cast<Emoji>();
|
||||
}
|
||||
|
||||
var state = EmojiViewState(
|
||||
@ -184,23 +185,35 @@ class _EmojiPickerState extends State<EmojiPicker> {
|
||||
categoryEmoji.clear();
|
||||
if (widget.config.showRecentsTab) {
|
||||
recentEmoji = await _getRecentEmojis();
|
||||
final List<Emoji> recentEmojiMap = recentEmoji.map((e) => e.emoji).toList().cast<Emoji>();
|
||||
final List<Emoji> recentEmojiMap =
|
||||
recentEmoji.map((e) => e.emoji).toList().cast<Emoji>();
|
||||
categoryEmoji.add(CategoryEmoji(Category.RECENT, recentEmojiMap));
|
||||
}
|
||||
categoryEmoji.addAll([
|
||||
CategoryEmoji(Category.SMILEYS, await _getAvailableEmojis(emoji_list.smileys, title: 'smileys')),
|
||||
CategoryEmoji(Category.ANIMALS, await _getAvailableEmojis(emoji_list.animals, title: 'animals')),
|
||||
CategoryEmoji(Category.FOODS, await _getAvailableEmojis(emoji_list.foods, title: 'foods')),
|
||||
CategoryEmoji(Category.ACTIVITIES, await _getAvailableEmojis(emoji_list.activities, title: 'activities')),
|
||||
CategoryEmoji(Category.TRAVEL, await _getAvailableEmojis(emoji_list.travel, title: 'travel')),
|
||||
CategoryEmoji(Category.OBJECTS, await _getAvailableEmojis(emoji_list.objects, title: 'objects')),
|
||||
CategoryEmoji(Category.SYMBOLS, await _getAvailableEmojis(emoji_list.symbols, title: 'symbols')),
|
||||
CategoryEmoji(Category.FLAGS, await _getAvailableEmojis(emoji_list.flags, title: 'flags'))
|
||||
CategoryEmoji(Category.SMILEYS,
|
||||
await _getAvailableEmojis(emoji_list.smileys, title: 'smileys')),
|
||||
CategoryEmoji(Category.ANIMALS,
|
||||
await _getAvailableEmojis(emoji_list.animals, title: 'animals')),
|
||||
CategoryEmoji(Category.FOODS,
|
||||
await _getAvailableEmojis(emoji_list.foods, title: 'foods')),
|
||||
CategoryEmoji(
|
||||
Category.ACTIVITIES,
|
||||
await _getAvailableEmojis(emoji_list.activities,
|
||||
title: 'activities')),
|
||||
CategoryEmoji(Category.TRAVEL,
|
||||
await _getAvailableEmojis(emoji_list.travel, title: 'travel')),
|
||||
CategoryEmoji(Category.OBJECTS,
|
||||
await _getAvailableEmojis(emoji_list.objects, title: 'objects')),
|
||||
CategoryEmoji(Category.SYMBOLS,
|
||||
await _getAvailableEmojis(emoji_list.symbols, title: 'symbols')),
|
||||
CategoryEmoji(Category.FLAGS,
|
||||
await _getAvailableEmojis(emoji_list.flags, title: 'flags'))
|
||||
]);
|
||||
}
|
||||
|
||||
// Get available emoji for given category title
|
||||
Future<List<Emoji>> _getAvailableEmojis(Map<String, String> map, {required String title}) async {
|
||||
Future<List<Emoji>> _getAvailableEmojis(Map<String, String> map,
|
||||
{required String title}) async {
|
||||
Map<String, String>? newMap;
|
||||
|
||||
// Get Emojis cached locally if available
|
||||
@ -216,19 +229,22 @@ class _EmojiPickerState extends State<EmojiPicker> {
|
||||
}
|
||||
|
||||
// Map to Emoji Object
|
||||
return newMap!.entries.map<Emoji>((entry) => Emoji(entry.key, entry.value)).toList();
|
||||
return newMap!.entries
|
||||
.map<Emoji>((entry) => Emoji(entry.key, entry.value))
|
||||
.toList();
|
||||
}
|
||||
|
||||
// Check if emoji is available on current platform
|
||||
Future<Map<String, String>?> _getPlatformAvailableEmoji(Map<String, String> emoji) async {
|
||||
Future<Map<String, String>?> _getPlatformAvailableEmoji(
|
||||
Map<String, String> emoji) async {
|
||||
if (Platform.isAndroid) {
|
||||
Map<String, String>? filtered = {};
|
||||
var delimiter = '|';
|
||||
try {
|
||||
var entries = emoji.values.join(delimiter);
|
||||
var keys = emoji.keys.join(delimiter);
|
||||
var result = (await platform
|
||||
.invokeMethod<String>('checkAvailability', {'emojiKeys': keys, 'emojiEntries': entries})) as String;
|
||||
var result = (await platform.invokeMethod<String>('checkAvailability',
|
||||
{'emojiKeys': keys, 'emojiEntries': entries})) as String;
|
||||
var resultKeys = result.split(delimiter);
|
||||
for (var i = 0; i < resultKeys.length; i++) {
|
||||
filtered[resultKeys[i]] = emoji[resultKeys[i]]!;
|
||||
@ -249,12 +265,14 @@ class _EmojiPickerState extends State<EmojiPicker> {
|
||||
if (emojiJson == null) {
|
||||
return null;
|
||||
}
|
||||
var emojis = Map<String, String>.from(jsonDecode(emojiJson) as Map<String, dynamic>);
|
||||
var emojis =
|
||||
Map<String, String>.from(jsonDecode(emojiJson) as Map<String, dynamic>);
|
||||
return emojis;
|
||||
}
|
||||
|
||||
// Stores filtered emoji locally for faster access next time
|
||||
Future<void> _cacheFilteredEmojis(String title, Map<String, String> emojis) async {
|
||||
Future<void> _cacheFilteredEmojis(
|
||||
String title, Map<String, String> emojis) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
var emojiJson = jsonEncode(emojis);
|
||||
prefs.setString(title, emojiJson);
|
||||
@ -274,7 +292,8 @@ class _EmojiPickerState extends State<EmojiPicker> {
|
||||
// Add an emoji to recently used list or increase its counter
|
||||
Future<void> _addEmojiToRecentlyUsed(Emoji emoji) async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
var recentEmojiIndex = recentEmoji.indexWhere((element) => element.emoji.emoji == emoji.emoji);
|
||||
var recentEmojiIndex =
|
||||
recentEmoji.indexWhere((element) => element.emoji.emoji == emoji.emoji);
|
||||
if (recentEmojiIndex != -1) {
|
||||
// Already exist in recent list
|
||||
// Just update counter
|
||||
@ -285,7 +304,8 @@ class _EmojiPickerState extends State<EmojiPicker> {
|
||||
// Sort by counter desc
|
||||
recentEmoji.sort((a, b) => b.counter - a.counter);
|
||||
// Limit entries to recentsLimit
|
||||
recentEmoji = recentEmoji.sublist(0, min(widget.config.recentsLimit, recentEmoji.length));
|
||||
recentEmoji = recentEmoji.sublist(
|
||||
0, min(widget.config.recentsLimit, recentEmoji.length));
|
||||
// save locally
|
||||
prefs.setString('recent', jsonEncode(recentEmoji));
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ class _DebugToast {
|
||||
return deviceInfo.then((info) {
|
||||
var debugText = "";
|
||||
info.toMap().forEach((key, value) {
|
||||
debugText = debugText + "$key: $value\n";
|
||||
debugText = "$debugText$key: $value\n";
|
||||
});
|
||||
return debugText;
|
||||
});
|
||||
|
@ -10,8 +10,8 @@ class FlowyPoppuWindow extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
child: child,
|
||||
type: MaterialType.transparency,
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ class FlowyPoppuWindow extends StatelessWidget {
|
||||
required Size size,
|
||||
}) async {
|
||||
final window = await getWindowInfo();
|
||||
// ignore: use_build_context_synchronously
|
||||
FlowyOverlay.of(context).insertWithRect(
|
||||
widget: FlowyPoppuWindow(child: child),
|
||||
identifier: 'FlowyPoppuWindow',
|
||||
@ -49,7 +50,10 @@ class PopupTextField extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
static void show({required BuildContext context, required Size size, required void Function(String) textDidChange}) {
|
||||
static void show(
|
||||
{required BuildContext context,
|
||||
required Size size,
|
||||
required void Function(String) textDidChange}) {
|
||||
FlowyPoppuWindow.show(
|
||||
context,
|
||||
size: size,
|
||||
|
@ -46,7 +46,7 @@ dev_dependencies:
|
||||
# activated in the `analysis_options.yaml` file located at the root of your
|
||||
# package. See that file for information about deactivating specific lint
|
||||
# rules and activating additional ones.
|
||||
flutter_lints: ^2.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
@ -17,7 +17,7 @@ dependencies:
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^2.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
@ -51,7 +51,7 @@ dev_dependencies:
|
||||
# activated in the `analysis_options.yaml` file located at the root of your
|
||||
# package. See that file for information about deactivating specific lint
|
||||
# rules and activating additional ones.
|
||||
flutter_lints: ^2.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
@ -21,7 +21,7 @@ dependencies:
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^2.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
network_image_mock: ^2.1.1
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
|
@ -37,13 +37,13 @@ class PublishNotifier<T> extends ChangeNotifier {
|
||||
() {
|
||||
if (_value == null) {
|
||||
return;
|
||||
}
|
||||
} else {}
|
||||
|
||||
if (listenWhen != null && listenWhen() == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
callback(_value!);
|
||||
callback(_value as T);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -68,14 +68,14 @@ packages:
|
||||
name: flutter_lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "2.0.1"
|
||||
flutter_svg:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_svg
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.22.0"
|
||||
version: "1.1.4"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@ -87,7 +87,7 @@ packages:
|
||||
name: lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
version: "2.0.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -122,21 +122,21 @@ packages:
|
||||
name: path_drawing
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.5.1"
|
||||
version: "1.0.1"
|
||||
path_parsing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_parsing
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.1"
|
||||
version: "1.0.1"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.2.0"
|
||||
version: "5.0.0"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
@ -225,7 +225,7 @@ packages:
|
||||
name: xml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.2.0"
|
||||
version: "6.1.0"
|
||||
sdks:
|
||||
dart: ">=2.17.0-0 <3.0.0"
|
||||
flutter: ">=1.24.0-7.0"
|
||||
dart: ">=2.17.0 <3.0.0"
|
||||
flutter: ">=2.11.0-0.1.pre"
|
||||
|
@ -18,7 +18,7 @@ dependencies:
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^1.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
@ -22,12 +22,13 @@ class KeyboardScreen extends StatefulWidget {
|
||||
const KeyboardScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_KeyboardScreenState createState() => _KeyboardScreenState();
|
||||
State<KeyboardScreen> createState() => _KeyboardScreenState();
|
||||
}
|
||||
|
||||
class _KeyboardScreenState extends State<KeyboardScreen> {
|
||||
bool _isKeyboardVisible = false;
|
||||
final TextEditingController _controller = TextEditingController(text: 'Hello Flowy');
|
||||
final TextEditingController _controller =
|
||||
TextEditingController(text: 'Hello Flowy');
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -124,14 +124,14 @@ packages:
|
||||
name: flutter_lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "2.0.1"
|
||||
flutter_svg:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_svg
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.22.0"
|
||||
version: "1.1.4"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@ -162,7 +162,7 @@ packages:
|
||||
name: lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
version: "2.0.0"
|
||||
loading_indicator:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -211,21 +211,21 @@ packages:
|
||||
name: path_drawing
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.5.1+1"
|
||||
version: "1.0.1"
|
||||
path_parsing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_parsing
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.1"
|
||||
version: "1.0.1"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.4.0"
|
||||
version: "5.0.0"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -335,7 +335,7 @@ packages:
|
||||
name: xml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.3.1"
|
||||
version: "6.1.0"
|
||||
sdks:
|
||||
dart: ">=2.17.0-0 <3.0.0"
|
||||
flutter: ">=2.0.0"
|
||||
dart: ">=2.17.0 <3.0.0"
|
||||
flutter: ">=2.11.0-0.1.pre"
|
||||
|
@ -14,12 +14,13 @@ dependencies:
|
||||
path: ../
|
||||
|
||||
cupertino_icons: ^1.0.2
|
||||
provider:
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
flutter_lints: ^1.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
|
@ -16,6 +16,6 @@ dependencies:
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^1.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
flutter:
|
@ -18,7 +18,7 @@ dependencies:
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^1.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
flutter:
|
||||
plugin:
|
||||
|
@ -398,8 +398,8 @@ class FlowyOverlayState extends State<FlowyOverlay> {
|
||||
|
||||
if (style.blur) {
|
||||
child = BackdropFilter(
|
||||
child: child,
|
||||
filter: ImageFilter.blur(sigmaX: 4, sigmaY: 4),
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -14,10 +14,12 @@ class KeyboardVisibilityDetector extends StatefulWidget {
|
||||
final void Function(bool)? onKeyboardVisibilityChange;
|
||||
|
||||
@override
|
||||
_KeyboardVisibilityDetectorState createState() => _KeyboardVisibilityDetectorState();
|
||||
State<KeyboardVisibilityDetector> createState() =>
|
||||
_KeyboardVisibilityDetectorState();
|
||||
}
|
||||
|
||||
class _KeyboardVisibilityDetectorState extends State<KeyboardVisibilityDetector> {
|
||||
class _KeyboardVisibilityDetectorState
|
||||
extends State<KeyboardVisibilityDetector> {
|
||||
FlowyInfraUIPlatform get _platform => FlowyInfraUIPlatform.instance;
|
||||
|
||||
bool isObserving = false;
|
||||
@ -27,7 +29,8 @@ class _KeyboardVisibilityDetectorState extends State<KeyboardVisibilityDetector>
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_keyboardSubscription = _platform.onKeyboardVisibilityChange.listen((newValue) {
|
||||
_keyboardSubscription =
|
||||
_platform.onKeyboardVisibilityChange.listen((newValue) {
|
||||
setState(() {
|
||||
isKeyboardVisible = newValue;
|
||||
if (widget.onKeyboardVisibilityChange != null) {
|
||||
@ -62,7 +65,8 @@ class _KeyboardVisibilityDetectorInheritedWidget extends InheritedWidget {
|
||||
final bool isKeyboardVisible;
|
||||
|
||||
@override
|
||||
bool updateShouldNotify(_KeyboardVisibilityDetectorInheritedWidget oldWidget) {
|
||||
bool updateShouldNotify(
|
||||
_KeyboardVisibilityDetectorInheritedWidget oldWidget) {
|
||||
return isKeyboardVisible != oldWidget.isKeyboardVisible;
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,6 @@ class FlowyContainer extends StatelessWidget {
|
||||
return AnimatedContainer(
|
||||
width: width,
|
||||
height: height,
|
||||
child: child,
|
||||
margin: margin,
|
||||
alignment: align,
|
||||
duration: duration ?? Durations.medium,
|
||||
@ -39,6 +38,7 @@ class FlowyContainer extends StatelessWidget {
|
||||
color: color,
|
||||
borderRadius: borderRadius,
|
||||
boxShadow: shadows,
|
||||
border: border));
|
||||
border: border),
|
||||
child: child);
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ class _FlowyHoverState extends State<FlowyHover> {
|
||||
child: child,
|
||||
);
|
||||
} else {
|
||||
return Container(child: child, color: widget.style.backgroundColor);
|
||||
return Container(color: widget.style.backgroundColor, child: child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ class FlowyIconButton extends StatelessWidget {
|
||||
onPressed: onPressed,
|
||||
child: Padding(
|
||||
padding: iconPadding,
|
||||
child: SizedBox.fromSize(child: child, size: childSize),
|
||||
child: SizedBox.fromSize(size: childSize, child: child),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -27,10 +27,12 @@ class StyledSingleChildScrollView extends StatefulWidget {
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_StyledSingleChildScrollViewState createState() => _StyledSingleChildScrollViewState();
|
||||
State<StyledSingleChildScrollView> createState() =>
|
||||
StyledSingleChildScrollViewState();
|
||||
}
|
||||
|
||||
class _StyledSingleChildScrollViewState extends State<StyledSingleChildScrollView> {
|
||||
class StyledSingleChildScrollViewState
|
||||
extends State<StyledSingleChildScrollView> {
|
||||
late ScrollController scrollController;
|
||||
|
||||
@override
|
||||
@ -92,10 +94,10 @@ class StyledCustomScrollView extends StatefulWidget {
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_StyledCustomScrollViewState createState() => _StyledCustomScrollViewState();
|
||||
StyledCustomScrollViewState createState() => StyledCustomScrollViewState();
|
||||
}
|
||||
|
||||
class _StyledCustomScrollViewState extends State<StyledCustomScrollView> {
|
||||
class StyledCustomScrollViewState extends State<StyledCustomScrollView> {
|
||||
late ScrollController controller;
|
||||
|
||||
@override
|
||||
|
@ -45,10 +45,10 @@ class BaseStyledButton extends StatefulWidget {
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_BaseStyledBtnState createState() => _BaseStyledBtnState();
|
||||
State<BaseStyledButton> createState() => BaseStyledBtnState();
|
||||
}
|
||||
|
||||
class _BaseStyledBtnState extends State<BaseStyledButton> {
|
||||
class BaseStyledBtnState extends State<BaseStyledButton> {
|
||||
late FocusNode _focusNode;
|
||||
bool _isFocused = false;
|
||||
|
||||
@ -79,9 +79,16 @@ class _BaseStyledBtnState extends State<BaseStyledButton> {
|
||||
borderRadius: widget.borderRadius ?? Corners.s10Border,
|
||||
boxShadow: _isFocused
|
||||
? [
|
||||
BoxShadow(color: theme.shader6, offset: Offset.zero, blurRadius: 8.0, spreadRadius: 0.0),
|
||||
BoxShadow(
|
||||
color: widget.bgColor ?? theme.surface, offset: Offset.zero, blurRadius: 8.0, spreadRadius: -4.0),
|
||||
color: theme.shader6,
|
||||
offset: Offset.zero,
|
||||
blurRadius: 8.0,
|
||||
spreadRadius: 0.0),
|
||||
BoxShadow(
|
||||
color: widget.bgColor ?? theme.surface,
|
||||
offset: Offset.zero,
|
||||
blurRadius: 8.0,
|
||||
spreadRadius: -4.0),
|
||||
]
|
||||
: [],
|
||||
),
|
||||
@ -112,20 +119,21 @@ class _BaseStyledBtnState extends State<BaseStyledButton> {
|
||||
hoverColor: widget.hoverColor ?? theme.hover,
|
||||
highlightColor: widget.downColor ?? theme.main1,
|
||||
focusColor: widget.focusColor ?? Colors.grey.withOpacity(0.35),
|
||||
child: Opacity(
|
||||
child: Padding(
|
||||
padding: widget.contentPadding ?? EdgeInsets.all(Insets.m),
|
||||
child: widget.child,
|
||||
),
|
||||
opacity: widget.onPressed != null ? 1 : .7,
|
||||
),
|
||||
constraints: BoxConstraints(minHeight: widget.minHeight ?? 0, minWidth: widget.minWidth ?? 0),
|
||||
constraints: BoxConstraints(
|
||||
minHeight: widget.minHeight ?? 0, minWidth: widget.minWidth ?? 0),
|
||||
onPressed: widget.onPressed,
|
||||
shape: widget.shape ??
|
||||
RoundedRectangleBorder(
|
||||
side: BorderSide(color: widget.outlineColor, width: 1.5),
|
||||
borderRadius: widget.borderRadius ?? Corners.s10Border,
|
||||
),
|
||||
child: Opacity(
|
||||
opacity: widget.onPressed != null ? 1 : .7,
|
||||
child: Padding(
|
||||
padding: widget.contentPadding ?? EdgeInsets.all(Insets.m),
|
||||
child: widget.child,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -38,8 +38,8 @@ class PrimaryButton extends StatelessWidget {
|
||||
hoverColor: theme.main1,
|
||||
downColor: theme.main1,
|
||||
borderRadius: bigMode ? Corners.s12Border : Corners.s8Border,
|
||||
child: child,
|
||||
onPressed: onPressed,
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -41,8 +41,8 @@ class SecondaryButton extends StatelessWidget {
|
||||
downColor: theme.main1,
|
||||
outlineColor: theme.main1,
|
||||
borderRadius: bigMode ? Corners.s12Border : Corners.s8Border,
|
||||
child: child,
|
||||
onPressed: onPressed,
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -151,9 +151,9 @@ class StyledDialogRoute<T> extends PopupRoute<T> {
|
||||
Widget buildPage(BuildContext context, Animation<double> animation,
|
||||
Animation<double> secondaryAnimation) {
|
||||
return Semantics(
|
||||
child: _pageBuilder(context, animation, secondaryAnimation),
|
||||
scopesRoute: true,
|
||||
explicitChildNodes: true,
|
||||
child: _pageBuilder(context, animation, secondaryAnimation),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,14 @@ typedef HoverBuilder = Widget Function(BuildContext context, bool onHover);
|
||||
class MouseHoverBuilder extends StatefulWidget {
|
||||
final bool isClickable;
|
||||
|
||||
const MouseHoverBuilder({Key? key, required this.builder, this.isClickable = false}) : super(key: key);
|
||||
const MouseHoverBuilder(
|
||||
{Key? key, required this.builder, this.isClickable = false})
|
||||
: super(key: key);
|
||||
|
||||
final HoverBuilder builder;
|
||||
|
||||
@override
|
||||
_MouseHoverBuilderState createState() => _MouseHoverBuilderState();
|
||||
State<MouseHoverBuilder> createState() => _MouseHoverBuilderState();
|
||||
}
|
||||
|
||||
class _MouseHoverBuilderState extends State<MouseHoverBuilder> {
|
||||
@ -19,7 +21,9 @@ class _MouseHoverBuilderState extends State<MouseHoverBuilder> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MouseRegion(
|
||||
cursor: widget.isClickable ? SystemMouseCursors.click : SystemMouseCursors.basic,
|
||||
cursor: widget.isClickable
|
||||
? SystemMouseCursors.click
|
||||
: SystemMouseCursors.basic,
|
||||
onEnter: (p) => setOnHover(true),
|
||||
onExit: (p) => setOnHover(false),
|
||||
child: widget.builder(context, _onHover),
|
||||
|
@ -42,11 +42,11 @@ class RoundedTextButton extends StatelessWidget {
|
||||
),
|
||||
child: SizedBox.expand(
|
||||
child: TextButton(
|
||||
onPressed: onPressed,
|
||||
child: Text(
|
||||
title ?? '',
|
||||
style: TextStyle(color: textColor, fontSize: fontSize),
|
||||
),
|
||||
onPressed: onPressed,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@ -52,10 +52,10 @@ class PageRoutes {
|
||||
pageBuilder: (context, animation, secondaryAnimation) => pageBuilder(),
|
||||
transitionsBuilder: (context, animation, secondaryAnimation, child) {
|
||||
return SharedAxisTransition(
|
||||
child: child,
|
||||
animation: animation,
|
||||
secondaryAnimation: secondaryAnimation,
|
||||
transitionType: type,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
@ -31,13 +31,13 @@ class SeparatedColumn extends StatelessWidget {
|
||||
if (i > 0 && separatorBuilder != null) c.insert(i, separatorBuilder!());
|
||||
}
|
||||
return Column(
|
||||
children: c,
|
||||
mainAxisAlignment: mainAxisAlignment,
|
||||
crossAxisAlignment: crossAxisAlignment,
|
||||
mainAxisSize: mainAxisSize,
|
||||
textBaseline: textBaseline,
|
||||
textDirection: textDirection,
|
||||
verticalDirection: verticalDirection,
|
||||
children: c,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -110,14 +110,14 @@ packages:
|
||||
name: flutter_lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "2.0.1"
|
||||
flutter_svg:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_svg
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.22.0"
|
||||
version: "1.1.4"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@ -148,7 +148,7 @@ packages:
|
||||
name: lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
version: "2.0.0"
|
||||
loading_indicator:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -197,21 +197,21 @@ packages:
|
||||
name: path_drawing
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.5.1+1"
|
||||
version: "1.0.1"
|
||||
path_parsing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_parsing
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.1"
|
||||
version: "1.0.1"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.4.0"
|
||||
version: "5.0.0"
|
||||
plugin_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -321,7 +321,7 @@ packages:
|
||||
name: xml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.3.1"
|
||||
version: "6.1.0"
|
||||
sdks:
|
||||
dart: ">=2.17.0-0 <3.0.0"
|
||||
flutter: ">=2.0.0"
|
||||
dart: ">=2.17.0 <3.0.0"
|
||||
flutter: ">=2.11.0-0.1.pre"
|
||||
|
@ -2,7 +2,7 @@ name: flowy_infra_ui
|
||||
description: A new flutter plugin project.
|
||||
version: 0.0.1
|
||||
homepage:
|
||||
publish_to: 'none'
|
||||
publish_to: "none"
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0 <3.0.0"
|
||||
@ -13,13 +13,14 @@ dependencies:
|
||||
sdk: flutter
|
||||
|
||||
# Thirdparty packages
|
||||
textstyle_extensions: '2.0.0-nullsafety'
|
||||
dartz: '0.10.0-nullsafety.2'
|
||||
textstyle_extensions: "2.0.0-nullsafety"
|
||||
dartz:
|
||||
provider: ^6.0.1
|
||||
styled_widget: '^0.3.1'
|
||||
equatable: '^2.0.3'
|
||||
styled_widget: "^0.3.1"
|
||||
equatable: "^2.0.3"
|
||||
animations: ^2.0.0
|
||||
loading_indicator: ^3.0.1
|
||||
async:
|
||||
|
||||
# Federated Platform Interface
|
||||
flowy_infra_ui_platform_interface:
|
||||
@ -34,7 +35,7 @@ dependencies:
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^1.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
flutter:
|
||||
plugin:
|
||||
@ -52,4 +53,4 @@ flutter:
|
||||
linux:
|
||||
pluginClass: FlowyInfraUIPlugin
|
||||
web:
|
||||
default_package: flowy_infra_ui_web
|
||||
default_package: flowy_infra_ui_web
|
||||
|
@ -29,7 +29,7 @@ dev_dependencies:
|
||||
sdk: flutter
|
||||
integration_test:
|
||||
sdk: flutter
|
||||
flutter_lints: ^1.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
@ -14,7 +14,7 @@ dependencies:
|
||||
ffi: ^1.0.0
|
||||
isolates: ^3.0.3+8
|
||||
protobuf: "2.0.0"
|
||||
dartz: "0.10.0-nullsafety.2"
|
||||
dartz: ^0.10.1
|
||||
freezed_annotation:
|
||||
logger: ^1.0.0
|
||||
|
||||
@ -23,7 +23,7 @@ dev_dependencies:
|
||||
sdk: flutter
|
||||
build_runner:
|
||||
freezed:
|
||||
flutter_lints: ^1.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
@ -7,14 +7,14 @@ packages:
|
||||
name: _fe_analyzer_shared
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "44.0.0"
|
||||
version: "46.0.0"
|
||||
analyzer:
|
||||
dependency: "direct overridden"
|
||||
description:
|
||||
name: analyzer
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.4.0"
|
||||
version: "4.6.0"
|
||||
animations:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -51,12 +51,12 @@ packages:
|
||||
source: hosted
|
||||
version: "2.8.2"
|
||||
bloc:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: bloc
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "8.0.3"
|
||||
version: "8.1.0"
|
||||
bloc_test:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
@ -84,7 +84,7 @@ packages:
|
||||
name: build_config
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
version: "1.1.0"
|
||||
build_daemon:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -105,7 +105,7 @@ packages:
|
||||
name: build_runner
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.11"
|
||||
version: "2.2.0"
|
||||
build_runner_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -135,7 +135,7 @@ packages:
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.dartlang.org"
|
||||
@ -170,7 +170,7 @@ packages:
|
||||
source: hosted
|
||||
version: "4.1.0"
|
||||
collection:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.dartlang.org"
|
||||
@ -182,7 +182,7 @@ packages:
|
||||
name: connectivity_plus
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
version: "2.3.6+1"
|
||||
connectivity_plus_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -196,7 +196,7 @@ packages:
|
||||
name: connectivity_plus_macos
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
version: "1.2.4"
|
||||
connectivity_plus_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -210,14 +210,14 @@ packages:
|
||||
name: connectivity_plus_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.2.3"
|
||||
connectivity_plus_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: connectivity_plus_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.2.2"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -268,12 +268,12 @@ packages:
|
||||
source: hosted
|
||||
version: "2.2.3"
|
||||
dartz:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: dartz
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.10.0-nullsafety.2"
|
||||
version: "0.10.1"
|
||||
dbus:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -380,7 +380,7 @@ packages:
|
||||
source: hosted
|
||||
version: "6.1.2"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: fixnum
|
||||
url: "https://pub.dartlang.org"
|
||||
@ -474,7 +474,7 @@ packages:
|
||||
name: flutter_lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "2.0.1"
|
||||
flutter_localizations:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
@ -526,14 +526,14 @@ packages:
|
||||
name: freezed
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.3+1"
|
||||
version: "2.1.0+1"
|
||||
freezed_annotation:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: freezed_annotation
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.3"
|
||||
version: "2.1.0"
|
||||
frontend_server_client:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -701,7 +701,7 @@ packages:
|
||||
name: lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
version: "2.0.0"
|
||||
loading_indicator:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -948,7 +948,7 @@ packages:
|
||||
source: hosted
|
||||
version: "4.2.4"
|
||||
protobuf:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: protobuf
|
||||
url: "https://pub.dartlang.org"
|
||||
@ -1046,7 +1046,7 @@ packages:
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
shared_preferences:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: shared_preferences
|
||||
url: "https://pub.dartlang.org"
|
||||
@ -1268,7 +1268,7 @@ packages:
|
||||
source: hosted
|
||||
version: "2.0.0+1"
|
||||
textstyle_extensions:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: textstyle_extensions
|
||||
url: "https://pub.dartlang.org"
|
||||
@ -1289,7 +1289,7 @@ packages:
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
tuple:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: tuple
|
||||
url: "https://pub.dartlang.org"
|
||||
|
@ -50,9 +50,10 @@ dependencies:
|
||||
intl: ^0.17.0
|
||||
time: "^2.0.0"
|
||||
equatable: "^2.0.3"
|
||||
freezed_annotation:
|
||||
freezed_annotation: ^2.1.0
|
||||
get_it: "^7.1.3"
|
||||
flutter_bloc: "^8.0.1"
|
||||
dartz: ^0.10.1
|
||||
provider: ^6.0.1
|
||||
path_provider: ^2.0.1
|
||||
window_size:
|
||||
@ -68,7 +69,7 @@ dependencies:
|
||||
url_launcher: ^6.0.2
|
||||
# file_picker: ^4.2.1
|
||||
clipboard: ^0.1.3
|
||||
connectivity_plus: 2.2.0
|
||||
connectivity_plus: ^2.3.6+1
|
||||
easy_localization: ^3.0.0
|
||||
textfield_tags: ^2.0.0
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
@ -80,13 +81,22 @@ dependencies:
|
||||
reorderables: ^0.5.0
|
||||
linked_scroll_controller: ^0.2.0
|
||||
hotkey_manager: ^0.1.7
|
||||
fixnum: ^1.0.1
|
||||
tuple: ^2.0.0
|
||||
protobuf: "2.0.0"
|
||||
charcode: ^1.3.1
|
||||
collection: ^1.16.0
|
||||
bloc: ^8.1.0
|
||||
textstyle_extensions: "2.0.0-nullsafety"
|
||||
shared_preferences: ^2.0.15
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^1.0.0
|
||||
flutter_lints: ^2.0.1
|
||||
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
build_runner:
|
||||
freezed:
|
||||
build_runner: ^2.2.0
|
||||
freezed: ^2.1.0+1
|
||||
bloc_test: ^9.0.2
|
||||
|
||||
dependency_overrides:
|
||||
|
Loading…
Reference in New Issue
Block a user