android – Flutter Navigator “tipo de argumento ‘Context’ não pode ser atribuído ao tipo de parâmetro ‘BuildContext’”

Estou tentando navegar para uma outra pagina no flutter, sendo assim eu inseir a linha:

Navigator.push(context, MaterialPageRoute(builder: (context) => LoginPage()));

porem o context da esse erro:

The argument type ‘JsObject’ can’t be assigned to the parameter type ‘BuildContext’.

alguem ai poderia ter uma solução?

docker – buildContext in yml on Azure

I am trying to build container image in Azure.

here is file structure of my repo:

main.R <- main code
app/Dockerfile <- location of docker file

I read that in order for COPY command in docker to work properly (copy main.R), I need to set buildContext and below I included the following line buildContext: $(Build.Repository.LocalPath) under Inputs

here is my yml file:

# Docker
# Build and push an image to Azure Container Registry
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker

trigger:
- my_branch

resources:
- repo: self

variables:
  # Container registry service connection established during pipeline creation
  dockerRegistryServiceConnection: 'some_long_number'
  imageRepository: 'my_repo_name'
  containerRegistry: 'registry.address.io'
  dockerfilePath: '$(Build.SourcesDirectory)/app/Dockerfile'
  tag: '$(Build.BuildId)'
  
  # Agent VM image name
  vmImageName: 'ubuntu-latest'

stages:
- stage: Build
  displayName: Build and push stage
  jobs:  
  - job: Build
    displayName: Build
    pool:
      vmImage: $(vmImageName)
    steps:
    - task: Docker@2
      displayName: Build and push an image to container registry
      inputs:
        command: buildAndPush
        repository: $(imageRepository)
        dockerfile: $(dockerfilePath)
        containerRegistry: $(dockerRegistryServiceConnection)
        buildContext: $(Build.Repository.LocalPath)
        tags: $(dockerfilePath)
          $(tag)

It generated error:

##(error)invalid argument "***/my_repo_name:/home/vsts/work/1/s/app/Dockerfile 10397" for "-t, --tag" flag: invalid reference format
##(error)See 'docker build --help'.
##(error)The process '/usr/bin/docker' failed with exit code 125

I also tried the following commands buildContext: /app
but got the same error. What is proper way to set buildContext?