[Android][Disable work manager] Update sending state in view: pending and running
(cherry picked from commit a6ebf50c005ccf0355bc64e7af73f801da458a33)
This commit is contained in:
committed by
Dat H. Pham
parent
cb50c183cf
commit
c22b181f42
@@ -16,7 +16,7 @@ enum SendingState {
|
|||||||
case SendingState.waiting:
|
case SendingState.waiting:
|
||||||
case SendingState.running:
|
case SendingState.running:
|
||||||
case SendingState.success:
|
case SendingState.success:
|
||||||
return AppLocalizations.of(context).delivering;
|
return AppLocalizations.of(context).pending;
|
||||||
case SendingState.canceled:
|
case SendingState.canceled:
|
||||||
return AppLocalizations.of(context).canceled;
|
return AppLocalizations.of(context).canceled;
|
||||||
case SendingState.error:
|
case SendingState.error:
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'package:core/presentation/resources/image_paths.dart';
|
import 'package:core/presentation/resources/image_paths.dart';
|
||||||
import 'package:core/presentation/utils/style_utils.dart';
|
import 'package:core/presentation/utils/style_utils.dart';
|
||||||
import 'package:core/presentation/views/loading/cupertino_loading_widget.dart';
|
import 'package:core/presentation/views/loading/cupertino_loading_widget.dart';
|
||||||
import 'package:core/utils/platform_info.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@@ -34,16 +33,8 @@ class SendingStateWidget extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
if (PlatformInfo.isIOS)
|
if (sendingState == SendingState.running)
|
||||||
if (sendingState == SendingState.running)
|
const CupertinoLoadingWidget(size: SendingStateWidgetStyle.iconSize)
|
||||||
const CupertinoLoadingWidget(size: SendingStateWidgetStyle.iconSize)
|
|
||||||
else
|
|
||||||
SvgPicture.asset(
|
|
||||||
sendingState.getIcon(_imagePath),
|
|
||||||
fit: BoxFit.fill,
|
|
||||||
width: SendingStateWidgetStyle.iconSize,
|
|
||||||
height: SendingStateWidgetStyle.iconSize
|
|
||||||
)
|
|
||||||
else
|
else
|
||||||
SvgPicture.asset(
|
SvgPicture.asset(
|
||||||
sendingState.getIcon(_imagePath),
|
sendingState.getIcon(_imagePath),
|
||||||
|
|||||||
Reference in New Issue
Block a user