Limit Loading Change #1
This commit is contained in:
@@ -18,11 +18,13 @@ class _DailyLimitScreenState extends State<DailyLimitScreen> {
|
|||||||
final _limitController = TextEditingController();
|
final _limitController = TextEditingController();
|
||||||
var service = getIt<LimitService>();
|
var service = getIt<LimitService>();
|
||||||
Limit? limit;
|
Limit? limit;
|
||||||
|
bool _isLoading = true;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_loadlimits();
|
_loadlimits();
|
||||||
|
_isLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _loadlimits() async {
|
Future<void> _loadlimits() async {
|
||||||
@@ -104,6 +106,17 @@ class _DailyLimitScreenState extends State<DailyLimitScreen> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
if (_isLoading) {
|
||||||
|
final localizations = AppLocalizations.of(context);
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text(localizations.dailylimit),
|
||||||
|
),
|
||||||
|
body: const Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
_currentLimit = limit?.dailyLimit;
|
_currentLimit = limit?.dailyLimit;
|
||||||
_spentAmount = limit?.usedLimit;
|
_spentAmount = limit?.usedLimit;
|
||||||
final localizations = AppLocalizations.of(context);
|
final localizations = AppLocalizations.of(context);
|
||||||
|
|||||||
Reference in New Issue
Block a user