chore: merge flutter 3_27_4 into main branch (#1228)

* chore: merge flutter/3_27_4 to main branch

* chore: code format

* fix: unit tests
This commit is contained in:
Lucas 2026-07-27 15:37:27 +08:00 • committed by GitHub
commit 41335c54ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,50 @@
import 'dart:convert';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:example/pages/editor.dart';
import 'package:flutter/material.dart';
class TenThousandLinksShowcase extends StatefulWidget {
const TenThousandLinksShowcase({super.key});
@override
State<TenThousandLinksShowcase> createState() =>
_TenThousandLinksShowcaseState();
}
class _TenThousandLinksShowcaseState extends State<TenThousandLinksShowcase> {
late final Future<String> _jsonString = _buildLinksDocument();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('10,000 Links Showcase')),
body: Editor(
jsonString: _jsonString,
onEditorStateChange: (_) {},
),
);
}
Future<String> _buildLinksDocument() {
final document = Document(
root: pageNode(
children: List.generate(
10000,
(index) => paragraphNode(
delta: Delta()
..insert(
'Link ${index + 1}',
attributes: {
AppFlowyRichTextKeys.href:
'https://example.com/links/${index + 1}',
},
),
),
),
),
);
return Future.value(jsonEncode(document.toJson()));
}
}