From bb047a39a5f50e337224b846a9949069e3b5de16 Mon Sep 17 00:00:00 2001 From: piyush-shukla03_infosys Date: Tue, 27 Jun 2023 18:12:07 +0530 Subject: [PATCH] Added review changes --- .gitignore | 4 + .../registration_client/HostApiModule.java | 9 +-- .../registration_client/MainActivity.java | 14 +--- .../api_services/AuthenticationApi.java | 75 +++++-------------- ...mmonApiImpl.java => CommonDetailsApi.java} | 14 ++-- ios/Runner/pigeon.h | 17 +++-- ios/Runner/pigeon.m | 58 ++++++++++---- lib/main.dart | 20 ++--- lib/provider/global_provider.dart | 6 +- .../widgets/custom_preferred_lang_button.dart | 1 - pigeon.sh | 2 +- .../{common_api.dart => common_details.dart} | 2 +- 12 files changed, 102 insertions(+), 120 deletions(-) rename android/app/src/main/java/io/mosip/registration_client/api_services/{CommonApiImpl.java => CommonDetailsApi.java} (74%) rename pigeon/{common_api.dart => common_details.dart} (92%) diff --git a/.gitignore b/.gitignore index 76238f7aa..cc0966fc8 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,7 @@ app.*.map.json # Android Pigeon generated files /android/app/src/main/java/io/mosip/registration_client/model +# IOS Pigeon generated files +/ios/pigeon.h +/ios/pigeon.m + diff --git a/android/app/src/main/java/io/mosip/registration_client/HostApiModule.java b/android/app/src/main/java/io/mosip/registration_client/HostApiModule.java index 4c1d249c6..1cf2fe87e 100644 --- a/android/app/src/main/java/io/mosip/registration_client/HostApiModule.java +++ b/android/app/src/main/java/io/mosip/registration_client/HostApiModule.java @@ -4,7 +4,6 @@ import android.app.Application; import android.content.Context; - import androidx.annotation.NonNull; import javax.inject.Singleton; @@ -15,15 +14,13 @@ import io.mosip.registration.clientmanager.repository.IdentitySchemaRepository; import io.mosip.registration.clientmanager.repository.RegistrationCenterRepository; import io.mosip.registration.clientmanager.service.LoginService; - import io.mosip.registration.clientmanager.spi.AuditManagerService; import io.mosip.registration.clientmanager.spi.MasterDataService; import io.mosip.registration.clientmanager.spi.SyncRestService; import io.mosip.registration.clientmanager.util.SyncRestUtil; import io.mosip.registration.keymanager.spi.ClientCryptoManagerService; import io.mosip.registration_client.api_services.AuthenticationApi; - -import io.mosip.registration_client.api_services.CommonApiImpl; +import io.mosip.registration_client.api_services.CommonDetailsApi; import io.mosip.registration_client.api_services.MachineDetailsApi; import io.mosip.registration_client.api_services.ProcessSpecDetailsApi; import io.mosip.registration_client.api_services.UserDetailsApi; @@ -78,8 +75,8 @@ AuthenticationApi getAuthenticationApi(SyncRestService syncRestService, @Provides @Singleton - CommonApiImpl getCommonApiImpl(MasterDataService masterDataService){ - return new CommonApiImpl(masterDataService); + CommonDetailsApi getCommonApiImpl(MasterDataService masterDataService){ + return new CommonDetailsApi(masterDataService); } @Provides diff --git a/android/app/src/main/java/io/mosip/registration_client/MainActivity.java b/android/app/src/main/java/io/mosip/registration_client/MainActivity.java index fdc2de524..82a9bd0b2 100644 --- a/android/app/src/main/java/io/mosip/registration_client/MainActivity.java +++ b/android/app/src/main/java/io/mosip/registration_client/MainActivity.java @@ -36,19 +36,13 @@ import io.mosip.registration.clientmanager.spi.SyncRestService; import io.mosip.registration.clientmanager.util.SyncRestUtil; import io.mosip.registration.keymanager.spi.ClientCryptoManagerService; - -import io.mosip.registration_client.api_services.CommonApiImpl; - import io.mosip.registration_client.api_services.AuthenticationApi; - +import io.mosip.registration_client.api_services.CommonDetailsApi; import io.mosip.registration_client.api_services.MachineDetailsApi; import io.mosip.registration_client.api_services.ProcessSpecDetailsApi; import io.mosip.registration_client.api_services.UserDetailsApi; - -import io.mosip.registration_client.model.CommonApiPigeon; - import io.mosip.registration_client.model.AuthResponsePigeon; - +import io.mosip.registration_client.model.CommonDetailsPigeon; import io.mosip.registration_client.model.MachinePigeon; import io.mosip.registration_client.model.ProcessSpecPigeon; import io.mosip.registration_client.model.UserPigeon; @@ -94,7 +88,7 @@ public class MainActivity extends FlutterActivity { UserDetailsApi userDetailsApi; @Inject - CommonApiImpl commonApiImpl; + CommonDetailsApi commonDetailsApi; @Inject AuthenticationApi authenticationApi; @@ -127,7 +121,7 @@ public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) { initializeAppComponent(); MachinePigeon.MachineApi.setup(flutterEngine.getDartExecutor().getBinaryMessenger(), machineDetailsApi); UserPigeon.UserApi.setup(flutterEngine.getDartExecutor().getBinaryMessenger(), userDetailsApi); - CommonApiPigeon.CommonApi.setup(flutterEngine.getDartExecutor().getBinaryMessenger(),commonApiImpl); + CommonDetailsPigeon.CommonDetailsApi.setup(flutterEngine.getDartExecutor().getBinaryMessenger(),commonDetailsApi); AuthResponsePigeon.AuthResponseApi.setup(flutterEngine.getDartExecutor().getBinaryMessenger(), authenticationApi); ProcessSpecPigeon.ProcessSpecApi.setup(flutterEngine.getDartExecutor().getBinaryMessenger(), processSpecDetailsApi); diff --git a/android/app/src/main/java/io/mosip/registration_client/api_services/AuthenticationApi.java b/android/app/src/main/java/io/mosip/registration_client/api_services/AuthenticationApi.java index 3d56e2295..a93f77c23 100644 --- a/android/app/src/main/java/io/mosip/registration_client/api_services/AuthenticationApi.java +++ b/android/app/src/main/java/io/mosip/registration_client/api_services/AuthenticationApi.java @@ -52,6 +52,19 @@ public AuthenticationApi(Context context, SyncRestService syncRestService, SyncR Context.MODE_PRIVATE); } + private AuthResponsePigeon.AuthResponse getAuthErrorResponse(String errorCode) { + AuthResponsePigeon.AuthResponse authResponse = new AuthResponsePigeon.AuthResponse.Builder() + .setResponse("") + .setUsername("") + .setIsDefault(false) + .setIsOfficer(false) + .setIsSupervisor(false) + .setErrorCode(errorCode) + .build(); + + return authResponse; + } + private void doLogin(final String username, final String password, AuthResponsePigeon.Result result) { Call> call = syncRestService.login(syncRestFactory.getAuthRequest(username, password)); call.enqueue(new Callback>() { @@ -92,39 +105,18 @@ public void onResponse(Call call, Response response) { } else { errorCode = error.getMessage(); } - AuthResponsePigeon.AuthResponse authResponse = new AuthResponsePigeon.AuthResponse.Builder() - .setResponse("") - .setUsername("") - .setIsDefault(false) - .setIsOfficer(false) - .setIsSupervisor(false) - .setErrorCode(errorCode) - .build(); + AuthResponsePigeon.AuthResponse authResponse = getAuthErrorResponse(errorCode); result.success(authResponse); return; } - AuthResponsePigeon.AuthResponse authResponse = new AuthResponsePigeon.AuthResponse.Builder() - .setResponse("") - .setUsername("") - .setIsDefault(false) - .setIsOfficer(false) - .setIsSupervisor(false) - .setErrorCode("REG_TRY_AGAIN") - .build(); + AuthResponsePigeon.AuthResponse authResponse = getAuthErrorResponse("REG_TRY_AGAIN"); result.success(authResponse); } @Override public void onFailure(Call call, Throwable t) { Log.e(getClass().getSimpleName(), "Login Failure! "); - AuthResponsePigeon.AuthResponse authResponse = new AuthResponsePigeon.AuthResponse.Builder() - .setResponse("") - .setUsername("") - .setIsDefault(false) - .setIsOfficer(false) - .setIsSupervisor(false) - .setErrorCode("REG_NETWORK_ERROR") - .build(); + AuthResponsePigeon.AuthResponse authResponse = getAuthErrorResponse("REG_NETWORK_ERROR"); result.success(authResponse); } }); @@ -132,27 +124,13 @@ public void onFailure(Call call, Throwable t) { private void offlineLogin(final String username, final String password, AuthResponsePigeon.Result result) { if(!loginService.isPasswordPresent(username)) { - AuthResponsePigeon.AuthResponse authResponse = new AuthResponsePigeon.AuthResponse.Builder() - .setResponse("") - .setUsername("") - .setIsDefault(false) - .setIsOfficer(false) - .setIsSupervisor(false) - .setErrorCode("REG_CRED_EXPIRED") - .build(); + AuthResponsePigeon.AuthResponse authResponse = getAuthErrorResponse("REG_CRED_EXPIRED"); result.success(authResponse); return; } if(!loginService.validatePassword(username, password)) { - AuthResponsePigeon.AuthResponse authResponse = new AuthResponsePigeon.AuthResponse.Builder() - .setResponse("") - .setUsername("") - .setIsDefault(false) - .setIsOfficer(false) - .setIsSupervisor(false) - .setErrorCode("REG_INVALID_REQUEST") - .build(); + AuthResponsePigeon.AuthResponse authResponse = getAuthErrorResponse("REG_INVALID_REQUEST"); result.success(authResponse); return; } @@ -169,26 +147,11 @@ private void offlineLogin(final String username, final String password, AuthResp .build(); result.success(authResponse); } else { - AuthResponsePigeon.AuthResponse authResponse = new AuthResponsePigeon.AuthResponse.Builder() - .setResponse("") - .setUsername("") - .setIsDefault(false) - .setIsOfficer(false) - .setIsSupervisor(false) - .setErrorCode("REG_CRED_EXPIRED") - .build(); + AuthResponsePigeon.AuthResponse authResponse = getAuthErrorResponse("REG_CRED_EXPIRED"); result.success(authResponse); } } catch (Exception ex) { Log.e(getClass().getSimpleName(), "Some error occurred!"); - AuthResponsePigeon.AuthResponse authResponse = new AuthResponsePigeon.AuthResponse.Builder() - .setResponse("") - .setUsername("") - .setIsDefault(false) - .setIsOfficer(false) - .setIsSupervisor(false) - .setErrorCode("REG_CRED_EXPIRED") - .build(); result.error(ex); } diff --git a/android/app/src/main/java/io/mosip/registration_client/api_services/CommonApiImpl.java b/android/app/src/main/java/io/mosip/registration_client/api_services/CommonDetailsApi.java similarity index 74% rename from android/app/src/main/java/io/mosip/registration_client/api_services/CommonApiImpl.java rename to android/app/src/main/java/io/mosip/registration_client/api_services/CommonDetailsApi.java index 9998d96d5..7adf7fa15 100644 --- a/android/app/src/main/java/io/mosip/registration_client/api_services/CommonApiImpl.java +++ b/android/app/src/main/java/io/mosip/registration_client/api_services/CommonDetailsApi.java @@ -10,38 +10,38 @@ import io.mosip.registration.clientmanager.dto.registration.GenericValueDto; import io.mosip.registration.clientmanager.spi.MasterDataService; -import io.mosip.registration_client.model.CommonApiPigeon; +import io.mosip.registration_client.model.CommonDetailsPigeon; @Singleton -public class CommonApiImpl implements CommonApiPigeon.CommonApi { +public class CommonDetailsApi implements CommonDetailsPigeon.CommonDetailsApi { MasterDataService masterDataService; @Inject - public CommonApiImpl(MasterDataService masterDataService){ + public CommonDetailsApi(MasterDataService masterDataService){ this.masterDataService=masterDataService; } @Override - public void getTemplateContent(@NonNull String templateName, @NonNull String langCode, @NonNull CommonApiPigeon.Result result) { + public void getTemplateContent(@NonNull String templateName, @NonNull String langCode, @NonNull CommonDetailsPigeon.Result result) { String response=masterDataService.getTemplateContent(templateName,langCode); result.success(response); } @Override - public void getPreviewTemplateContent(@NonNull String templateTypeCode, @NonNull String langCode, @NonNull CommonApiPigeon.Result result) { + public void getPreviewTemplateContent(@NonNull String templateTypeCode, @NonNull String langCode, @NonNull CommonDetailsPigeon.Result result) { String response=masterDataService.getPreviewTemplateContent(templateTypeCode,langCode); result.success(response); } @Override - public void getDocumentTypes(@NonNull String categoryCode, @NonNull String applicantType, @NonNull String langCode, @NonNull CommonApiPigeon.Result> result) { + public void getDocumentTypes(@NonNull String categoryCode, @NonNull String applicantType, @NonNull String langCode, @NonNull CommonDetailsPigeon.Result> result) { List response=masterDataService.getDocumentTypes(categoryCode,applicantType,langCode); result.success(response); } @Override - public void getFieldValues(@NonNull String fieldName, @NonNull String langCode, @NonNull CommonApiPigeon.Result> result) { + public void getFieldValues(@NonNull String fieldName, @NonNull String langCode, @NonNull CommonDetailsPigeon.Result> result) { List output=masterDataService.getFieldValues(fieldName,langCode); List response=new ArrayList<>(); output.forEach((value)->{response.add(value.toString());}); diff --git a/ios/Runner/pigeon.h b/ios/Runner/pigeon.h index f514cbe3d..67e6cd936 100644 --- a/ios/Runner/pigeon.h +++ b/ios/Runner/pigeon.h @@ -11,15 +11,16 @@ NS_ASSUME_NONNULL_BEGIN -/// The codec used by ProcessSpecApi. -NSObject *ProcessSpecApiGetCodec(void); - -@protocol ProcessSpecApi -- (void)getUISchemaWithCompletion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; -- (void)getStringValueGlobalParamKey:(NSString *)key completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; -- (void)getNewProcessSpecWithCompletion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +/// The codec used by CommonDetailsApi. +NSObject *CommonDetailsApiGetCodec(void); + +@protocol CommonDetailsApi +- (void)getTemplateContentTemplateName:(NSString *)templateName langCode:(NSString *)langCode completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)getPreviewTemplateContentTemplateTypeCode:(NSString *)templateTypeCode langCode:(NSString *)langCode completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)getDocumentTypesCategoryCode:(NSString *)categoryCode applicantType:(NSString *)applicantType langCode:(NSString *)langCode completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)getFieldValuesFieldName:(NSString *)fieldName langCode:(NSString *)langCode completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; @end -extern void ProcessSpecApiSetup(id binaryMessenger, NSObject *_Nullable api); +extern void CommonDetailsApiSetup(id binaryMessenger, NSObject *_Nullable api); NS_ASSUME_NONNULL_END diff --git a/ios/Runner/pigeon.m b/ios/Runner/pigeon.m index 0845ca3e4..d595dc3b8 100644 --- a/ios/Runner/pigeon.m +++ b/ios/Runner/pigeon.m @@ -21,23 +21,46 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { return (result == [NSNull null]) ? nil : result; } -NSObject *ProcessSpecApiGetCodec(void) { +NSObject *CommonDetailsApiGetCodec(void) { static FlutterStandardMessageCodec *sSharedObject = nil; sSharedObject = [FlutterStandardMessageCodec sharedInstance]; return sSharedObject; } -void ProcessSpecApiSetup(id binaryMessenger, NSObject *api) { +void CommonDetailsApiSetup(id binaryMessenger, NSObject *api) { { FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.ProcessSpecApi.getUISchema" + initWithName:@"dev.flutter.pigeon.CommonDetailsApi.getTemplateContent" binaryMessenger:binaryMessenger - codec:ProcessSpecApiGetCodec()]; + codec:CommonDetailsApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(getUISchemaWithCompletion:)], @"ProcessSpecApi api (%@) doesn't respond to @selector(getUISchemaWithCompletion:)", api); + NSCAssert([api respondsToSelector:@selector(getTemplateContentTemplateName:langCode:completion:)], @"CommonDetailsApi api (%@) doesn't respond to @selector(getTemplateContentTemplateName:langCode:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { - [api getUISchemaWithCompletion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + NSArray *args = message; + NSString *arg_templateName = GetNullableObjectAtIndex(args, 0); + NSString *arg_langCode = GetNullableObjectAtIndex(args, 1); + [api getTemplateContentTemplateName:arg_templateName langCode:arg_langCode completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; + }]; + } else { + [channel setMessageHandler:nil]; + } + } + { + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.CommonDetailsApi.getPreviewTemplateContent" + binaryMessenger:binaryMessenger + codec:CommonDetailsApiGetCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(getPreviewTemplateContentTemplateTypeCode:langCode:completion:)], @"CommonDetailsApi api (%@) doesn't respond to @selector(getPreviewTemplateContentTemplateTypeCode:langCode:completion:)", api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSString *arg_templateTypeCode = GetNullableObjectAtIndex(args, 0); + NSString *arg_langCode = GetNullableObjectAtIndex(args, 1); + [api getPreviewTemplateContentTemplateTypeCode:arg_templateTypeCode langCode:arg_langCode completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { callback(wrapResult(output, error)); }]; }]; @@ -48,15 +71,17 @@ void ProcessSpecApiSetup(id binaryMessenger, NSObject *_Nullable output, FlutterError *_Nullable error) { callback(wrapResult(output, error)); }]; }]; @@ -67,13 +92,16 @@ void ProcessSpecApiSetup(id binaryMessenger, NSObject *_Nullable output, FlutterError *_Nullable error) { + NSArray *args = message; + NSString *arg_fieldName = GetNullableObjectAtIndex(args, 0); + NSString *arg_langCode = GetNullableObjectAtIndex(args, 1); + [api getFieldValuesFieldName:arg_fieldName langCode:arg_langCode completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { callback(wrapResult(output, error)); }]; }]; diff --git a/lib/main.dart b/lib/main.dart index 1a0f6dfc3..ddc4dc084 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -25,16 +25,12 @@ void main() async { final AppLanguageProvider appLanguage = AppLanguageProvider(); await appLanguage.fetchLocale(); runApp( - const MyApp(), + const RegistrationClientApp(), ); } -class MyApp extends StatelessWidget { - const MyApp({super.key}); - - // This widget is the root of your application. - static const platform = - MethodChannel('com.flutter.dev/io.mosip.get-package-instance'); +class RegistrationClientApp extends StatelessWidget { + const RegistrationClientApp({super.key}); @override Widget build(BuildContext context) { @@ -87,19 +83,19 @@ class BuildApp extends StatelessWidget { ), elevatedButtonTheme: const ElevatedButtonThemeData(style: ButtonStyle())), - home: const MyHomePage(), + home: const RegistrationClientSplashPage(), ); } } -class MyHomePage extends StatefulWidget { - const MyHomePage({super.key}); +class RegistrationClientSplashPage extends StatefulWidget { + const RegistrationClientSplashPage({super.key}); @override - State createState() => _MyHomePageState(); + State createState() => _RegistrationClientSplashPageState(); } -class _MyHomePageState extends State { +class _RegistrationClientSplashPageState extends State { @override Widget build(BuildContext context) { MediaQueryData mediaQueryData = MediaQuery.of(context); diff --git a/lib/provider/global_provider.dart b/lib/provider/global_provider.dart index 48fd15f89..61470e7d8 100644 --- a/lib/provider/global_provider.dart +++ b/lib/provider/global_provider.dart @@ -3,7 +3,7 @@ import 'dart:io'; import 'package:flutter/widgets.dart'; import 'package:registration_client/model/process.dart'; -import 'package:registration_client/pigeon/common_api_pigeon.dart'; +import 'package:registration_client/pigeon/common_details_pigeon.dart'; import 'package:registration_client/platform_android/machine_key_impl.dart'; import 'package:registration_client/platform_spi/machine_key.dart'; import 'package:registration_client/ui/process_ui/new_process.dart'; @@ -188,13 +188,13 @@ class GlobalProvider with ChangeNotifier { screen!.fields!.forEach((field) async { if (field!.fieldType == "dynamic") { fieldDisplayValues[field.id!] = - await CommonApi().getFieldValues(field.id!, "eng"); + await CommonDetailsApi().getFieldValues(field.id!, "eng"); } if (field.templateName != null) { List values = List.empty(growable: true); chosenLang.forEach((lang) async { values.add( - await CommonApi().getTemplateContent( + await CommonDetailsApi().getTemplateContent( field.templateName!, langToCode(lang), ), diff --git a/lib/ui/process_ui/widgets/custom_preferred_lang_button.dart b/lib/ui/process_ui/widgets/custom_preferred_lang_button.dart index 6fe36bb4e..8ec2eafd7 100644 --- a/lib/ui/process_ui/widgets/custom_preferred_lang_button.dart +++ b/lib/ui/process_ui/widgets/custom_preferred_lang_button.dart @@ -3,7 +3,6 @@ import 'package:flutter/src/widgets/framework.dart'; import 'package:flutter/src/widgets/placeholder.dart'; import 'package:provider/provider.dart'; import 'package:registration_client/model/field.dart'; -import 'package:registration_client/pigeon/common_api_pigeon.dart'; import 'package:registration_client/provider/global_provider.dart'; import 'package:registration_client/utils/app_config.dart'; diff --git a/pigeon.sh b/pigeon.sh index 3c5981191..08e4467ef 100644 --- a/pigeon.sh +++ b/pigeon.sh @@ -13,7 +13,7 @@ flutter pub run pigeon --input pigeon/auth_response.dart --dart_out lib/pigeon/a # Generate common_api pigeon files -flutter pub run pigeon --input pigeon/common_api.dart --dart_out lib/pigeon/common_api_pigeon.dart --objc_header_out ios/Runner/pigeon.h --objc_source_out ios/Runner/pigeon.m --java_out ./android/app/src/main/java/io/mosip/registration_client/model/CommonApiPigeon.java --java_package "io.mosip.registration_client.model" +flutter pub run pigeon --input pigeon/common_details.dart --dart_out lib/pigeon/common_details_pigeon.dart --objc_header_out ios/Runner/pigeon.h --objc_source_out ios/Runner/pigeon.m --java_out ./android/app/src/main/java/io/mosip/registration_client/model/CommonDetailsPigeon.java --java_package "io.mosip.registration_client.model" # Generate process_spec pigeon files flutter pub run pigeon --input pigeon/process_spec.dart --dart_out lib/pigeon/process_spec_pigeon.dart --objc_header_out ios/Runner/pigeon.h --objc_source_out ios/Runner/pigeon.m --java_out ./android/app/src/main/java/io/mosip/registration_client/model/ProcessSpecPigeon.java --java_package "io.mosip.registration_client.model" diff --git a/pigeon/common_api.dart b/pigeon/common_details.dart similarity index 92% rename from pigeon/common_api.dart rename to pigeon/common_details.dart index 520bbd03f..a51e53280 100644 --- a/pigeon/common_api.dart +++ b/pigeon/common_details.dart @@ -1,7 +1,7 @@ import 'package:pigeon/pigeon.dart'; @HostApi() -abstract class CommonApi { +abstract class CommonDetailsApi { @async String getTemplateContent(String templateName, String langCode); @async