Skip to content

Commit

Permalink
# 10.0.0
Browse files Browse the repository at this point in the history
* Migrate to 3.7.0
  • Loading branch information
zmtzawqlp committed Jan 31, 2023
1 parent 0dd72ac commit 5714918
Show file tree
Hide file tree
Showing 16 changed files with 107 additions and 58 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 10.0.0

* Migrate to 3.7.0

# 9.1.2

* Add TextOverflowWidget.clearType
Expand Down
4 changes: 3 additions & 1 deletion example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -200,6 +200,7 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -231,6 +232,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
8 changes: 4 additions & 4 deletions example/lib/pages/background_text_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ class BackgroundTextDemo extends StatelessWidget {
),
recognizer: TapGestureRecognizer()
..onTap = () {
launch(
'https://github.com/flutter/flutter/issues/24335');
launchUrl(Uri.parse(
'https://github.com/flutter/flutter/issues/24335'));
}),
const TextSpan(text: '/'),
TextSpan(
text: '24337',
style: const TextStyle(color: Colors.blue),
recognizer: TapGestureRecognizer()
..onTap = () {
launch(
'https://github.com/flutter/flutter/issues/24337');
launchUrl(Uri.parse(
'https://github.com/flutter/flutter/issues/24337'));
}),
])),
const Text(
Expand Down
10 changes: 5 additions & 5 deletions example/lib/pages/custom_text_overflow_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ class _CustomTextOverflowDemoState extends State<CustomTextOverflowDemo> {
'more',
),
onTap: () {
launch(
'https://github.com/fluttercandies/extended_text');
launchUrl(Uri.parse(
'https://github.com/fluttercandies/extended_text'));
},
)
],
Expand All @@ -125,12 +125,12 @@ class _CustomTextOverflowDemoState extends State<CustomTextOverflowDemo> {
void onSpecialTextTap(dynamic parameter) {
if (parameter.toString().startsWith('\$')) {
if (parameter.toString().contains('issue')) {
launch('https://github.com/flutter/flutter/issues/26748');
launchUrl(Uri.parse('https://github.com/flutter/flutter/issues/26748'));
} else {
launch('https://github.com/fluttercandies');
launchUrl(Uri.parse('https://github.com/fluttercandies'));
}
} else if (parameter.toString().startsWith('@')) {
launch('mailto:[email protected]');
launchUrl(Uri.parse('mailto:[email protected]'));
}
}
}
6 changes: 3 additions & 3 deletions example/lib/pages/join_zero_width_space.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ class JoinZeroWidthSpaceDemo extends StatelessWidget {
void onSpecialTextTap(dynamic parameter) {
if (parameter.toString().startsWith('\$')) {
if (parameter.toString().contains('issue')) {
launch('https://github.com/flutter/flutter/issues/26748');
launchUrl(Uri.parse('https://github.com/flutter/flutter/issues/26748'));
} else {
launch('https://github.com/fluttercandies');
launchUrl(Uri.parse('https://github.com/fluttercandies'));
}
} else if (parameter.toString().startsWith('@')) {
launch('mailto:[email protected]');
launchUrl(Uri.parse('mailto:[email protected]'));
}
}
}
5 changes: 3 additions & 2 deletions example/lib/pages/main_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class MainPage extends StatelessWidget {
),
),
onPressed: () {
launch('https://github.com/fluttercandies/extended_text');
launchUrl(Uri.parse(
'https://github.com/fluttercandies/extended_text'));
},
),
),
Expand All @@ -54,7 +55,7 @@ class MainPage extends StatelessWidget {
child: Image.network(
'https://pub.idqqimg.com/wpa/images/group.png'),
onPressed: () {
launch('https://jq.qq.com/?_wv=1027&k=5bcc0gy');
launchUrl(Uri.parse('https://jq.qq.com/?_wv=1027&k=5bcc0gy'));
},
),
)
Expand Down
6 changes: 3 additions & 3 deletions example/lib/pages/regexp_text_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class RegExpTextDemo extends StatelessWidget {
'\n\nif you meet any problem, please let me know @zmtzawqlp and send an mailto:[email protected] to me .[sun_glasses] ',
onSpecialTextTap: (dynamic parameter) {
if (parameter.toString().startsWith('\$')) {
launch('https://github.com/fluttercandies');
launchUrl(Uri.parse('https://github.com/fluttercandies'));
} else if (parameter.toString().startsWith('@')) {
launch('mailto:[email protected]');
launchUrl(Uri.parse('mailto:[email protected]'));
} else if (parameter.toString().startsWith('mailto:')) {
launch(parameter.toString());
launchUrl(Uri.parse(parameter.toString()));
}
},
specialTextSpanBuilder: MyRegExpSpecialTextSpanBuilder(),
Expand Down
4 changes: 2 additions & 2 deletions example/lib/pages/text_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class TextDemo extends StatelessWidget {
'\n\nif you meet any problem, please let me know @zmtzawqlp .[sun_glasses]',
onSpecialTextTap: (dynamic parameter) {
if (parameter.toString().startsWith('\$')) {
launch('https://github.com/fluttercandies');
launchUrl(Uri.parse('https://github.com/fluttercandies'));
} else if (parameter.toString().startsWith('@')) {
launch('mailto:[email protected]');
launchUrl(Uri.parse('mailto:[email protected]'));
}
},
specialTextSpanBuilder: MySpecialTextSpanBuilder(),
Expand Down
9 changes: 5 additions & 4 deletions example/lib/pages/text_selection_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ class _TextSelectionDemoState extends State<TextSelectionDemo> {
_attachContent,
onSpecialTextTap: (dynamic parameter) {
if (parameter.toString().startsWith('\$')) {
launch('https://github.com/fluttercandies');
launchUrl(
Uri.parse('https://github.com/fluttercandies'));
} else if (parameter.toString().startsWith('@')) {
launch('mailto:[email protected]');
launchUrl(Uri.parse('mailto:[email protected]'));
}
},
specialTextSpanBuilder: MySpecialTextSpanBuilder(),
Expand All @@ -67,8 +68,8 @@ class _TextSelectionDemoState extends State<TextSelectionDemo> {
InkWell(
child: const Text('more'),
onTap: () {
launch(
'https://github.com/fluttercandies/extended_text');
launchUrl(Uri.parse(
'https://github.com/fluttercandies/extended_text'));
},
)
],
Expand Down
5 changes: 2 additions & 3 deletions example/lib/text/my_extended_text_selection_controls.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:math' as math;
import 'package:extended_text_library/extended_text_library.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:url_launcher/url_launcher.dart';

Expand Down Expand Up @@ -75,8 +74,8 @@ class MyTextSelectionControls extends TextSelectionControls {
handleSelectAll:
canSelectAll(delegate) ? () => handleSelectAll(delegate) : null,
handleLike: () {
launch(
'mailto:[email protected]?subject=extended_text_share&body=${delegate.textEditingValue.text}');
launchUrl(Uri.parse(
'mailto:[email protected]?subject=extended_text_share&body=${delegate.textEditingValue.text}'));
delegate.hideToolbar();
delegate.userUpdateTextEditingValue(
delegate.textEditingValue
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ description: A new Flutter application.
version: 1.0.0+1

environment:
sdk: '>=2.17.0-0 <3.0.0'
flutter: ">=2.10.0"
sdk: '>=2.17.0 <3.0.0'
flutter: ">=3.7.0"
dependencies:
cupertino_icons: ^1.0.2
ff_annotation_route_library: ^3.0.0
Expand Down
21 changes: 21 additions & 0 deletions lib/src/selection/extended_text_selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,27 @@ class ExtendedTextSelectionState extends State<ExtendedTextSelection>

@override
void removeTextPlaceholder() {}

@override
void didChangeInputControl(
TextInputControl? oldControl, TextInputControl? newControl) {
if (_hasFocus && _hasInputConnection) {
oldControl?.hide();
newControl?.show();
}
}

@override
void performSelector(String selectorName) {
final Intent? intent = intentForMacOSSelector(selectorName);

if (intent != null) {
final BuildContext? primaryContext = primaryFocus?.context;
if (primaryContext != null) {
Actions.invoke(primaryContext, intent);
}
}
}
}

class _CopySelectionAction extends ContextAction<CopySelectionTextIntent> {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/text_overflow_render_mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ class _TextRange {
);

@override
int get hashCode => hashValues(start, end);
int get hashCode => Object.hash(start, end);

@override
bool operator ==(Object other) {
Expand Down
Loading

0 comments on commit 5714918

Please sign in to comment.