how to use OpenContainer class with Get.toNamed?

Viewed 15

i used openContainer class from animations package with a card and a details page(from card to details page) but i want to go to details page with Get.tonamed from getx package because of my project structure. here is my widget:

OpenContainer(
            openColor: CustomTaavTheme.primaryColor,
            transitionDuration: Duration(seconds: 1),
            transitionType: ContainerTransitionType.fadeThrough,
            openBuilder: (context, action) => const ResidentReportDetailsPage(),
            closedBuilder: (context, action) => ResidentFinancialListItem(
              onChargeButtonTap: () => _onChargeButtonTap(
                context: context,
                unitId: item.unitId,
                userId: item.userId ?? '-',
              ),
              onBillButtonTap: () => item.userId.isNot_null
                  ? ServiceChargeModuleRouteNames.residentReportDetailsPage
                      .toName(
                      parameters: {
                        'periodId': item.periodId.toString(),
                        'unitId': item.unitId.toString(),
                        'userId': item.userId!,
                      },
                    )
                  : null,
              item: item,
              onSmsButtonTap: () => item.mobile.isNot_null
                  ? controller.launchSmsUrl(
                      phone: item.mobile!.mobileNumber,
                      callingCode: item.mobile!.countryCallingCode,
                    )
                  : null,
              onCallButtonTap: () => item.mobile.isNot_null
                  ? controller.launchCallUrl(
                      phone: item.mobile!.mobileNumber,
                      callingCode: item.mobile!.countryCallingCode,
                    )
                  : null,
            ),
          ),
0 Answers
Related