import { Framework } from './base' ; import { LanguageId } from '~/utils' ; class FlutterFramework extends Framework { id = 'flutter' ; display = 'Flutter' ; detection = { pubspecYAML : [ 'flutter_i18n' , ] , } ; languageIds : LanguageId [ ] = [ 'dart' , ] ; usageMatchRegex = [ '[^\\w\\d]FlutterI18n\\.(?:plural|translate)\\(\\s*[\\w\\d]+,\\s*[\'"`]({key})[\'"`]' , '[^\\w\\d]I18n(?:Plural|Text)\\(\\s*[\'"`]({key})[\'"`]' , ] ; refactorTemplates ( keypath ) { return [ `FlutterI18n.translate(buildContext, "${ keypath }")` , keypath , ] ; } } export default FlutterFramework ;