@@ -8,6 +8,7 @@ import 'package:loftify/Resources/theme.dart';
88import 'package:loftify/Screens/Post/grain_detail_screen.dart' ;
99import 'package:loftify/Utils/hive_util.dart' ;
1010import 'package:waterfall_flow/waterfall_flow.dart' ;
11+ import '../../generated/l10n.dart' ;
1112
1213import '../../Utils/enums.dart' ;
1314import '../../Utils/ilogger.dart' ;
@@ -68,7 +69,7 @@ class _GrainScreenState extends State<GrainScreen>
6869 WidgetsBinding .instance.addPostFrameCallback ((_) {
6970 Future .delayed (const Duration (milliseconds: 300 ), () => _onRefresh ());
7071 });
71- }else {
72+ } else {
7273 _initPhase = InitPhase .successful;
7374 setState (() {});
7475 }
@@ -114,7 +115,7 @@ class _GrainScreenState extends State<GrainScreen>
114115 } catch (e, t) {
115116 _initPhase = InitPhase .failed;
116117 ILogger .error ("Failed to load grain list" , e, t);
117- if (mounted) IToast .showTop ("加载失败" );
118+ if (mounted) IToast .showTop (S .current.loadFailed );
118119 return IndicatorResult .fail;
119120 } finally {
120121 if (mounted) setState (() {});
@@ -165,7 +166,7 @@ class _GrainScreenState extends State<GrainScreen>
165166 return _grainList.isNotEmpty
166167 ? _buildMainBody (physics)
167168 : ItemBuilder .buildEmptyPlaceholder (
168- context: context, text: "暂无粮单" ,physics: physics);
169+ context: context, text: "暂无粮单" , physics: physics);
169170 },
170171 );
171172 default :
0 commit comments