Add re-export of l10n
This commit is contained in:
parent
22b76b0b2b
commit
28013a8a45
|
@ -0,0 +1 @@
|
|||
export 'package:flutter_gen/gen_l10n/l10n.dart';
|
|
@ -2,11 +2,11 @@ import 'dart:async';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'hooks/stores.dart';
|
||||
import 'l10n/l10n.dart';
|
||||
import 'pages/communities_tab.dart';
|
||||
import 'pages/create_post.dart';
|
||||
import 'pages/home_tab.dart';
|
||||
|
|
|
@ -31,6 +31,15 @@ class ConfigStore extends ChangeNotifier {
|
|||
save();
|
||||
}
|
||||
|
||||
Locale _locale;
|
||||
@JsonKey(defaultValue: Locale('en'))
|
||||
Locale get locale => _locale;
|
||||
set locale(Locale locale) {
|
||||
_locale = locale;
|
||||
notifyListeners();
|
||||
save();
|
||||
}
|
||||
|
||||
static Future<ConfigStore> load() async {
|
||||
final prefs = await _prefs;
|
||||
|
||||
|
|
Loading…
Reference in New Issue