|
|
|
@ -1,11 +1,15 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/config/size_config.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/locator.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
@ -21,6 +25,7 @@ class InsuranceCard extends StatefulWidget {
|
|
|
|
|
}
|
|
|
|
|
//TODO fix it
|
|
|
|
|
class _InsuranceCardState extends State<InsuranceCard> {
|
|
|
|
|
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return BaseView<InsuranceViewModel>(
|
|
|
|
@ -140,6 +145,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.transparent,
|
|
|
|
|
child: SecondaryButton(
|
|
|
|
|
onTap: getDetails(),
|
|
|
|
|
label: TranslationBase.of(context).seeDetails,
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
),
|
|
|
|
@ -179,4 +185,11 @@ class _InsuranceCardState extends State<InsuranceCard> {
|
|
|
|
|
|
|
|
|
|
return newDate.toString();
|
|
|
|
|
}
|
|
|
|
|
getDetails(){
|
|
|
|
|
_insuranceCardService.getInsuranceDetails().then((value) => {
|
|
|
|
|
Navigator.push(context,
|
|
|
|
|
FadePage(page: InsuranceCardDetails(data:value)))
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|