TF-1042:remove widget unnecessary
This commit is contained in:
@@ -1,8 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="mask0_6922_18397" style="mask-type:alpha" x="1" y="1" width="22" height="22">
|
||||
<path d="M14.896 1.71429C15.4643 1.71429 16.0093 1.94006 16.4112 2.34192L21.658 7.58877C22.0599 7.99063 22.2857 8.53568 22.2857 9.104V14.896C22.2857 15.4643 22.0599 16.0094 21.658 16.4112L16.4112 21.6581C16.0093 22.06 15.4643 22.2857 14.896 22.2857H9.10394C8.53562 22.2857 7.99057 22.06 7.58871 21.6581L2.34186 16.4112C1.94 16.0094 1.71423 15.4643 1.71423 14.896V9.104C1.71423 8.53568 1.94 7.99063 2.34186 7.58877L7.58871 2.34192C7.99057 1.94006 8.53562 1.71429 9.10394 1.71429H14.896ZM14.896 3.42858H9.10394C8.99027 3.42858 8.88126 3.47373 8.80089 3.55411L3.55404 8.80095C3.47367 8.88133 3.42852 8.99033 3.42852 9.104V14.896C3.42852 15.0097 3.47367 15.1187 3.55404 15.1991L8.80089 20.4459C8.88126 20.5263 8.99027 20.5714 9.10394 20.5714H14.896C15.0096 20.5714 15.1186 20.5263 15.199 20.4459L20.4459 15.1991C20.5262 15.1187 20.5714 15.0097 20.5714 14.896V9.104C20.5714 8.99033 20.5262 8.88133 20.4459 8.80095L15.199 3.55411C15.1186 3.47373 15.0096 3.42858 14.896 3.42858ZM11.9999 14.4001L12.1052 14.4054C12.6238 14.4581 13.0285 14.8961 13.0285 15.4286C13.0285 15.9966 12.5681 16.4571 12 16.4571L11.8948 16.4518C11.3762 16.3991 10.9715 15.9611 10.9715 15.4286C10.9715 14.8606 11.4319 14.4001 11.9999 14.4001ZM11.9999 6.85715C12.4733 6.85715 12.8571 7.24091 12.8571 7.71429V12C12.8571 12.4734 12.4733 12.8572 11.9999 12.8572C11.5266 12.8572 11.1428 12.4734 11.1428 12V7.71429C11.1428 7.24091 11.5266 6.85715 11.9999 6.85715Z" fill="#007AFF"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_6922_18397)">
|
||||
<rect width="24" height="24" fill="white"/>
|
||||
</g>
|
||||
<path d="M14.896 1.71429C15.4643 1.71429 16.0093 1.94006 16.4112 2.34192L21.658 7.58877C22.0599 7.99063 22.2857 8.53568 22.2857 9.104V14.896C22.2857 15.4643 22.0599 16.0094 21.658 16.4112L16.4112 21.6581C16.0093 22.06 15.4643 22.2857 14.896 22.2857H9.10394C8.53562 22.2857 7.99057 22.06 7.58871 21.6581L2.34186 16.4112C1.94 16.0094 1.71423 15.4643 1.71423 14.896V9.104C1.71423 8.53568 1.94 7.99063 2.34186 7.58877L7.58871 2.34192C7.99057 1.94006 8.53562 1.71429 9.10394 1.71429H14.896ZM14.896 3.42858H9.10394C8.99027 3.42858 8.88126 3.47373 8.80089 3.55411L3.55404 8.80095C3.47367 8.88133 3.42852 8.99033 3.42852 9.104V14.896C3.42852 15.0097 3.47367 15.1187 3.55404 15.1991L8.80089 20.4459C8.88126 20.5263 8.99027 20.5714 9.10394 20.5714H14.896C15.0096 20.5714 15.1186 20.5263 15.199 20.4459L20.4459 15.1991C20.5262 15.1187 20.5714 15.0097 20.5714 14.896V9.104C20.5714 8.99033 20.5262 8.88133 20.4459 8.80095L15.199 3.55411C15.1186 3.47373 15.0096 3.42858 14.896 3.42858ZM11.9999 14.4001L12.1052 14.4054C12.6238 14.4581 13.0285 14.8961 13.0285 15.4286C13.0285 15.9966 12.5681 16.4571 12 16.4571L11.8948 16.4518C11.3762 16.3991 10.9715 15.9611 10.9715 15.4286C10.9715 14.8606 11.4319 14.4001 11.9999 14.4001ZM11.9999 6.85715C12.4733 6.85715 12.8571 7.24091 12.8571 7.71429V12C12.8571 12.4734 12.4733 12.8572 11.9999 12.8572C11.5266 12.8572 11.1428 12.4734 11.1428 12V7.71429C11.1428 7.24091 11.5266 6.85715 11.9999 6.85715Z" fill="white"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -109,15 +109,18 @@ class ToastView {
|
||||
),
|
||||
);
|
||||
|
||||
final Widget toastChild = ToastCard(
|
||||
child,
|
||||
Duration(seconds: toastDuration ?? 2),
|
||||
fadeDuration: 500,
|
||||
);
|
||||
|
||||
_overlayEntry = OverlayEntry(
|
||||
builder: (BuildContext context) =>
|
||||
_showWidgetBasedOnPosition(toastDuration != null ? toastChild : child, toastPosition));
|
||||
_showWidgetBasedOnPosition(
|
||||
toastDuration != null ?
|
||||
ToastCard(
|
||||
child,
|
||||
Duration(seconds: toastDuration),
|
||||
fadeDuration: 500,
|
||||
)
|
||||
: child, toastPosition,
|
||||
));
|
||||
|
||||
_isVisible = true;
|
||||
overlayState!.insert(_overlayEntry!);
|
||||
|
||||
@@ -16,16 +16,17 @@ class NetworkConnectionController extends BaseController {
|
||||
final AppToast _appToast = Get.find<AppToast>();
|
||||
final ResponsiveUtils _responsiveUtils = Get.find<ResponsiveUtils>();
|
||||
|
||||
bool _isEnableShowToastDisConnection = true;
|
||||
bool _isEnableShowToastDisconnection = true;
|
||||
|
||||
late StreamSubscription<ConnectivityResult> subscription;
|
||||
|
||||
NetworkConnectionController(this._connectivity);
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
subscription = _connectivity.onConnectivityChanged.listen((ConnectivityResult result) {
|
||||
connectivityResult.value = result;
|
||||
if (_isEnableShowToastDisConnection && result == ConnectivityResult.none) {
|
||||
if (_isEnableShowToastDisconnection && result == ConnectivityResult.none) {
|
||||
_showToastLostConnection();
|
||||
}
|
||||
}) ;
|
||||
@@ -37,6 +38,7 @@ class NetworkConnectionController extends BaseController {
|
||||
subscription.cancel();
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
@override
|
||||
void onDone() {}
|
||||
|
||||
@@ -58,7 +60,7 @@ class NetworkConnectionController extends BaseController {
|
||||
AppLocalizations.of(currentContext!).no_internet_connection,
|
||||
actionName: AppLocalizations.of(currentContext!).skip,
|
||||
onActionClick: () {
|
||||
_isEnableShowToastDisConnection = false;
|
||||
_isEnableShowToastDisconnection = false;
|
||||
ToastView.dismiss();
|
||||
},
|
||||
leadingIcon: SvgPicture.asset(
|
||||
@@ -66,7 +68,7 @@ class NetworkConnectionController extends BaseController {
|
||||
width: 24,
|
||||
height: 24,
|
||||
fit: BoxFit.fill),
|
||||
backgroundColor: Colors.redAccent,
|
||||
backgroundColor: AppColor.textFieldErrorBorderColor,
|
||||
textColor: Colors.white,
|
||||
textActionColor: Colors.white,
|
||||
maxWidth: _responsiveUtils.getMaxWidthToast(currentContext!),
|
||||
|
||||
Reference in New Issue
Block a user