mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 07:45:30 +00:00
14 lines
281 B
Dart
14 lines
281 B
Dart
import 'package:flutter/widgets.dart';
|
|
|
|
class LocaleController extends ChangeNotifier {
|
|
Locale _locale = const Locale('en');
|
|
|
|
Locale get locale => _locale;
|
|
|
|
void setLocale(Locale locale) {
|
|
if (_locale == locale) return;
|
|
_locale = locale;
|
|
notifyListeners();
|
|
}
|
|
}
|