@ -1,4 +1,5 @@
import ' dart:async ' ;
import ' dart:developer ' ;
import ' package:flutter/material.dart ' ;
import ' package:mc_common_app/classes/app_state.dart ' ;
@ -58,7 +59,7 @@ class _UpgradePackageSheetState extends State<UpgradePackageSheet> {
padding: const EdgeInsets . only ( left: 21 , right: 21 , bottom: 21 , top: 4 ) ,
child: Consumer < SubscriptionsVM > ( builder: ( context , model , _ ) {
if ( model . state = = ViewState . busy ) {
print ( model . newPrice ) ;
log ( model . newPrice ) ;
return SizedBox (
width: double . infinity ,
height: MediaQuery . of ( context ) . size . height / 2 ,
@ -79,7 +80,7 @@ class _UpgradePackageSheetState extends State<UpgradePackageSheet> {
12. height ,
packageItem (
LocaleKeys . nowVar . tr ( ) ,
( " ${ LocaleKeys . yourSubscriptionUpgradeAffectingFrom . tr ( ) } ${ DateHelper . formatAsLongDate ( widget . subscription . dateEnd ? ? DateTime . now ( ) ) } " ) ,
( " ${ LocaleKeys . yourSubscriptionUpgradeAffectingFrom . tr ( ) } ${ widget . subscription . dateEnd = = null ? DateHelper . formatAsDayMonthYear ( DateTime . now ( ) ) : DateHelper . formatAsDayMonthYear ( DateHelper . parseStringToDate ( DateHelper . formatDateT ( widget . subscription . dateEnd ! ) ) ) } " ) ,
double . parse ( model . newPrice ) . toStringAsFixed ( 2 ) ,
isNowSelected ,
) . onPress ( ( ) {
@ -92,7 +93,7 @@ class _UpgradePackageSheetState extends State<UpgradePackageSheet> {
if ( AppState ( ) . getproviderSubscription . isNotEmpty & & ! AppState ( ) . getproviderSubscription . first . isExpired ! )
packageItem (
LocaleKeys . upgradeAfterCurrentExpiry . tr ( ) ,
( " ${ LocaleKeys . yourSubscriptionUpgradeCurrentSubscriptionAffectingFrom . tr ( ) } ${ DateHelper. formatAsLongDate ( widget . subscription . dateEnd ? ? DateTime . now ( ) ) } " ) ,
( " ${ LocaleKeys . yourSubscriptionUpgradeCurrentSubscriptionAffectingFrom . tr ( ) } ${ AppState( ) . getproviderSubscription . first . dateEnd = = null ? " " : AppState ( ) . getproviderSubscription . first . dateEnd = = null ? DateHelper . formatAsDayMonthYear ( DateTime . now ( ) ) : DateHelper . formatAsDayMonthYear ( DateHelper . parseStringToDate ( DateHelper . formatDateT ( AppState ( ) . getproviderSubscription . first . dateEnd ! ) ) ) } " ) ,
widget . subscription . price . toString ( ) ,
isNowSelected ? false : true ,
) . onPress ( ( ) {
@ -174,11 +175,11 @@ class _UpgradePackageSheetState extends State<UpgradePackageSheet> {
fontWeight: FontWeight . bold ,
) ,
4. height ,
if ( widget . subscription . dateEnd ! = null )
description . toText (
fontSize: 12 ,
color: MyColors . lightTextColor ,
) ,
/ / if ( widget . subscription . dateEnd ! = null )
description . toText (
fontSize: 12 ,
color: MyColors . lightTextColor ,
) ,
10. height ,
Row (
crossAxisAlignment: CrossAxisAlignment . end ,