Chore: Move spellchecker service to extensions (#2120)
* Removed dependency from pubspec.yaml * Chore: moved simple_spell_checker_service to extensions * Chore: dart fixes and formatting * Fix: imports --------- Co-authored-by: CatHood0 <santiagowmar@gmail.com>pull/2095/head v10.3.1
parent
b62f413bf7
commit
da4f0efeaf
9 changed files with 97 additions and 29 deletions
@ -1,20 +1,31 @@ |
|||||||
import 'package:flutter/gestures.dart' show LongPressGestureRecognizer; |
import 'package:flutter/gestures.dart' show LongPressGestureRecognizer; |
||||||
import 'package:flutter/material.dart' show TextSpan; |
import 'package:flutter/material.dart' show TextSpan; |
||||||
import 'spellchecker_service.dart' show SpellcheckerService; |
import 'spellchecker_service.dart' show SpellCheckerService; |
||||||
|
|
||||||
/// A default implementation of the [SpellcheckerService] |
/// A default implementation of the [SpellcheckerService] |
||||||
/// that always will return null since Spell checking |
/// that always will return null since Spell checking |
||||||
/// is not a standard feature |
/// is not a standard feature |
||||||
class DefaultSpellcheckerService extends SpellcheckerService { |
class DefaultSpellCheckerService extends SpellCheckerService<Object?> { |
||||||
DefaultSpellcheckerService() : super(language: 'en'); |
DefaultSpellCheckerService() : super(language: 'en'); |
||||||
|
|
||||||
@override |
@override |
||||||
void dispose({bool onlyPartial = false}) {} |
void dispose({bool onlyPartial = false}) {} |
||||||
|
|
||||||
@override |
@override |
||||||
List<TextSpan>? fetchSpellchecker(String text, |
List<TextSpan>? checkSpelling( |
||||||
{LongPressGestureRecognizer Function(String p1)? |
String text, { |
||||||
customLongPressRecognizerOnWrongSpan}) { |
LongPressGestureRecognizer Function(String p1)? |
||||||
|
customLongPressRecognizerOnWrongSpan, |
||||||
|
}) { |
||||||
return null; |
return null; |
||||||
} |
} |
||||||
|
|
||||||
|
@override |
||||||
|
void addCustomLanguage({languageIdentifier}) {} |
||||||
|
|
||||||
|
@override |
||||||
|
void setNewLanguageState({required String language}) {} |
||||||
|
|
||||||
|
@override |
||||||
|
void updateCustomLanguageIfExist({languageIdentifier}) {} |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue