The below link have enough information about embedding a LWC in Lightning flow but nothing about passing a variable value to LWC.
https://unofficialsf.com/adding-lightning-web-components-to-flow-screens/
For example:- I have a variable in Lightning Flow called 'NewRecord'. The below LWC .js not fetching the value from Flow.
import { LightningElement, api } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
export default class TakeMeToClonedOrder extends NavigationMixin(LightningElement) {
@api NewRecord;
@api Message;
navigateToOrder() {
this[NavigationMixin.Navigate]({
type: 'standard__recordPage',
attributes: {
recordId: this.NewRecord,
objectApiName: 'Order',
actionName: 'view'
}
});
}
}