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/material.dart' show TextSpan; |
||||
import 'spellchecker_service.dart' show SpellcheckerService; |
||||
import 'spellchecker_service.dart' show SpellCheckerService; |
||||
|
||||
/// A default implementation of the [SpellcheckerService] |
||||
/// that always will return null since Spell checking |
||||
/// is not a standard feature |
||||
class DefaultSpellcheckerService extends SpellcheckerService { |
||||
DefaultSpellcheckerService() : super(language: 'en'); |
||||
class DefaultSpellCheckerService extends SpellCheckerService<Object?> { |
||||
DefaultSpellCheckerService() : super(language: 'en'); |
||||
|
||||
@override |
||||
void dispose({bool onlyPartial = false}) {} |
||||
|
||||
@override |
||||
List<TextSpan>? fetchSpellchecker(String text, |
||||
{LongPressGestureRecognizer Function(String p1)? |
||||
customLongPressRecognizerOnWrongSpan}) { |
||||
List<TextSpan>? checkSpelling( |
||||
String text, { |
||||
LongPressGestureRecognizer Function(String p1)? |
||||
customLongPressRecognizerOnWrongSpan, |
||||
}) { |
||||
return null; |
||||
} |
||||
|
||||
@override |
||||
void addCustomLanguage({languageIdentifier}) {} |
||||
|
||||
@override |
||||
void setNewLanguageState({required String language}) {} |
||||
|
||||
@override |
||||
void updateCustomLanguageIfExist({languageIdentifier}) {} |
||||
} |
||||
|
Loading…
Reference in new issue