[Simplistic_Editor] Fix delta history color switch on web release build (#1264)

pull/1266/head
Renzo Olivares 3 years ago committed by GitHub
parent 4e19545963
commit 7397bfdaaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,8 +63,7 @@ class _MyHomePageState extends State<MyHomePage> {
if (delta is TextEditingDeltaInsertion) { if (delta is TextEditingDeltaInsertion) {
deltaView = TextEditingDeltaView( deltaView = TextEditingDeltaView(
deltaType: deltaType: 'Insertion',
delta.runtimeType.toString().replaceAll('TextEditingDelta', ''),
deltaText: delta.textInserted, deltaText: delta.textInserted,
deltaRange: TextRange.collapsed(delta.insertionOffset), deltaRange: TextRange.collapsed(delta.insertionOffset),
newSelection: delta.selection, newSelection: delta.selection,
@ -72,8 +71,7 @@ class _MyHomePageState extends State<MyHomePage> {
); );
} else if (delta is TextEditingDeltaDeletion) { } else if (delta is TextEditingDeltaDeletion) {
deltaView = TextEditingDeltaView( deltaView = TextEditingDeltaView(
deltaType: deltaType: 'Deletion',
delta.runtimeType.toString().replaceAll('TextEditingDelta', ''),
deltaText: delta.textDeleted, deltaText: delta.textDeleted,
deltaRange: delta.deletedRange, deltaRange: delta.deletedRange,
newSelection: delta.selection, newSelection: delta.selection,
@ -81,8 +79,7 @@ class _MyHomePageState extends State<MyHomePage> {
); );
} else if (delta is TextEditingDeltaReplacement) { } else if (delta is TextEditingDeltaReplacement) {
deltaView = TextEditingDeltaView( deltaView = TextEditingDeltaView(
deltaType: deltaType: 'Replacement',
delta.runtimeType.toString().replaceAll('TextEditingDelta', ''),
deltaText: delta.replacementText, deltaText: delta.replacementText,
deltaRange: delta.replacedRange, deltaRange: delta.replacedRange,
newSelection: delta.selection, newSelection: delta.selection,
@ -90,8 +87,7 @@ class _MyHomePageState extends State<MyHomePage> {
); );
} else if (delta is TextEditingDeltaNonTextUpdate) { } else if (delta is TextEditingDeltaNonTextUpdate) {
deltaView = TextEditingDeltaView( deltaView = TextEditingDeltaView(
deltaType: deltaType: 'NonTextUpdate',
delta.runtimeType.toString().replaceAll('TextEditingDelta', ''),
deltaText: '', deltaText: '',
deltaRange: TextRange.empty, deltaRange: TextRange.empty,
newSelection: delta.selection, newSelection: delta.selection,

@ -7,7 +7,7 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.8.2" version: "2.9.0"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
@ -21,7 +21,7 @@ packages:
name: characters name: characters
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.1"
charcode: charcode:
dependency: transitive dependency: transitive
description: description:
@ -120,7 +120,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.2" version: "1.9.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:

Loading…
Cancel
Save