forked from superlistapp/super_editor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SuperEditor][web] Fix text input after a deletion (Resolves superlis…
- Loading branch information
1 parent
f94aa58
commit 0e8feee
Showing
10 changed files
with
476 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,37 @@ | ||
import 'package:flutter/foundation.dart'; | ||
|
||
/// The mode of user text input. | ||
enum TextInputSource { | ||
keyboard, | ||
ime, | ||
} | ||
|
||
/// Whether or not we are running on web. | ||
/// | ||
/// By default this is the same as [kIsWeb]. | ||
/// | ||
/// [debugIsWebOverride] may be used to override the natural value of [isWeb]. | ||
bool get isWeb => debugIsWebOverride == null // | ||
? kIsWeb | ||
: debugIsWebOverride == WebPlatformOverride.web; | ||
|
||
/// Overrides the value of [isWeb]. | ||
/// | ||
/// This is intended to be used in tests. | ||
/// | ||
/// Set it to `null` to use the default value of [isWeb]. | ||
/// | ||
/// Set it to [WebPlatformOverride.web] to configure to run as if we are on web. | ||
/// | ||
/// Set it to [WebPlatformOverride.native] to configure to run as if we are NOT on web. | ||
@visibleForTesting | ||
WebPlatformOverride? debugIsWebOverride; | ||
|
||
@visibleForTesting | ||
enum WebPlatformOverride { | ||
/// Configuration to run the app as if we are a native app. | ||
native, | ||
|
||
/// Configuration to run the app as if we are on web. | ||
web, | ||
} |
Oops, something went wrong.