This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AddCardUseCase designed to be injected into any view-layer presenter, | |
// regardless of whether it is an activity or fragemnt. In our case, we are | |
// injecting this AddCardUseCase into two fragments, possibly contained in the same Activity | |
class AddCardUseCase( | |
private val accountRepo: accountRepository, | |
private val setupIntentRelay: SetupIntentRelay, | |
private val stripeManager: StripeManager, | |
private val containingActivity: Activity // <- injected here just for demonstration | |
) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WhiteLabelConfig.java for Green Monkeys product flavor | |
package com.whitelabeldemo; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.bridge.ReactContextBaseJavaModule; | |
import com.facebook.react.bridge.ReactMethod; | |
import javax.annotation.Nonnull; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WhiteLabelConfig.java for Purple Parrots product flavor | |
package com.whitelabeldemo; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.bridge.ReactContextBaseJavaModule; | |
import com.facebook.react.bridge.ReactMethod; | |
import javax.annotation.Nonnull; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WhiteLabelConfigPackage.java | |
package com.whitelabeldemo; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.react.bridge.NativeModule; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.uimanager.ViewManager; | |
import javax.annotation.Nonnull; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WhiteLabelConfig.java | |
package com.whitelabeldemo; | |
import com.facebook.react.bridge.ReactApplicationContext; | |
import com.facebook.react.bridge.ReactContextBaseJavaModule; | |
import com.facebook.react.bridge.ReactMethod; | |
import javax.annotation.Nonnull; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WhiteLabelConfig.m for green monkeys | |
#import "WhiteLabelConfig.h" | |
@implementation WhiteLabelConfig | |
RCT_EXPORT_MODULE(WhiteLabelConfig); | |
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getAppName) { | |
return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WhiteLabelConfig.m for purple parrots | |
#import "WhiteLabelConfig.h" | |
@implementation WhiteLabelConfig | |
RCT_EXPORT_MODULE(WhiteLabelConfig); | |
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getAppName) { | |
return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WhiteLabelConfig.tsx | |
import { NativeModules } from 'react-native'; | |
export default class WhiteLabelConfig { | |
public static readonly APP_NAME: string = NativeModules.WhiteLabelConfig.getAppName(); | |
public static readonly PRIMARY_COLOR: string = NativeModules.WhiteLabelConfig.getPrimaryColor(); | |
public static readonly PRIMARY_TEXT_COLOR: string = NativeModules.WhiteLabelConfig.getPrimaryTextColor(); | |
public static readonly GREETING_TEXT: string = NativeModules.WhiteLabelConfig.getGreetingText(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WhiteLabelConfig.m | |
@implementation WhiteLabelConfig | |
RCT_EXPORT_MODULE(WhiteLabelConfig); | |
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(getAppName) { | |
return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WhiteLabelConfig.h | |
#import <Foundation/Foundation.h> | |
#import <React/RCTBridgeModule.h> | |
@interface WhiteLabelConfig : NSObject<RCTBridgeModule> | |
@end |
NewerOlder