Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/fleather.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.38.0"
flutter-version: "3.44.0"
cache: true
# Manually Update this `key`
cache-key: "3.38.0"
cache-key: "3.44.0"
- run: dart pub global activate coverage

#
Expand Down
1 change: 1 addition & 0 deletions packages/fleather/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class _HomePageState extends State<HomePage> {
final data = node.value.data;
// Icons.rocket_launch_outlined
return Icon(
// ignore: non_const_argument_for_const_parameter
IconData(int.parse(data['codePoint']), fontFamily: data['fontFamily']),
color: Color(int.parse(data['color'])),
size: 18,
Expand Down
10 changes: 5 additions & 5 deletions packages/fleather/lib/l10n/fleather_localizations.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ mixin RawEditorStateTextInputClientMixin on EditorState
return;
}

_textInputConnection?.setStyle(
_textInputConnection?.updateStyle(TextInputStyle(
fontFamily: style.textStyle.fontFamily,
fontSize: style.textStyle.fontSize,
fontWeight: style.textStyle.fontWeight,
textDirection: style.textDirection,
textAlign: style.textAlign);
textAlign: style.textAlign));
});
}

Expand Down Expand Up @@ -200,6 +200,9 @@ mixin RawEditorStateTextInputClientMixin on EditorState
// no-op
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flutter's EditableTextState implements this method with

@override
bool onFocusReceived() {
  if (mounted && !_hasFocus && widget.focusNode.canRequestFocus) {
    widget.focusNode.requestFocus();
    return true;
  }
  return false;
}

Should we implement something similar?

@override
bool onFocusReceived() => false;

@override
void performAction(TextInputAction action) {
// no-op
Expand Down
3 changes: 3 additions & 0 deletions packages/fleather/test/rendering/rendering_tools.dart
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@ class FakeTickerProvider implements TickerProvider {
}

class FakeTicker implements Ticker {
@override
bool forceFrames = false;

@override
bool muted = false;

Expand Down
6 changes: 4 additions & 2 deletions packages/fleather/test/widgets/editor_intents_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ void main() {
baseOffset: 13, extentOffset: 0, affinity: TextAffinity.upstream));
});

testWidgets('$ExtendSelectionByPageIntent selection to end', (tester) async {
testWidgets('$ExtendSelectionVerticallyToAdjacentPageIntent selection to end',
(tester) async {
final editor = EditorSandBox(
tester: tester,
document: ParchmentDocument.fromJson([
Expand All @@ -253,7 +254,8 @@ void main() {
baseOffset: 3, extentOffset: 19, affinity: TextAffinity.upstream));
});

testWidgets('$ExtendSelectionByPageIntent selection to end', (tester) async {
testWidgets('$ExtendSelectionVerticallyToAdjacentPageIntent selection to end',
(tester) async {
final editor = EditorSandBox(
tester: tester,
document: ParchmentDocument.fromJson([
Expand Down
4 changes: 4 additions & 0 deletions packages/fleather/test/widgets/editor_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,9 @@ void main() {
if (node.value.type == 'icon') {
final data = node.value.data;
return Icon(
// ignore: non_const_argument_for_const_parameter
IconData(int.parse(data['codePoint']),
// ignore: non_const_argument_for_const_parameter
fontFamily: data['fontFamily']),
color: Color(int.parse(data['color'])),
size: 100,
Expand Down Expand Up @@ -1420,7 +1422,9 @@ void main() {
if (node.value.type == 'icon') {
final data = node.value.data;
return Icon(
// ignore: non_const_argument_for_const_parameter
IconData(int.parse(data['codePoint']),
// ignore: non_const_argument_for_const_parameter
fontFamily: data['fontFamily']),
color: Color(int.parse(data['color'])),
size: 100,
Expand Down
Loading