import 'package:flutter/widgets.dart';
import '../sf_delegate.dart';

extension LocalizationContextExtension on BuildContext {
  Locale get locale => translator.locale;

  String translate(String key, {Map<String, dynamic>? args}) =>
      translator.tr(key, args);

  SFLocalizations get translator => SFLocalizations.of(this);
}
