MADISON, Minn. - Angela Brown of Madison has signed off on an agreement that will lead to the dismissal of a child endangerment charge against her for giving her 15-year-old son cannabis oil to treat his seizures and pain from a traumatic brain injury.

Brown said her attorney Michael Hughes of Bend, Oregon, informed her a week ago that he and Lac qui Parle County Attorney Rick Stulz worked out an agreement that will allow for a “continuance for dismissal’’ of the child endangerment charge. If she pays a $100 court fee and has no violations for 90 days, the gross misdemeanor charge will be dropped.

Brown said she signed the agreement Thursday and was expecting it be entered in court by the Lac qui Parle County Attorney.

Brown had been set to stand trial on the charge Wednesday.

“I was shell-shocked and actually upset, he’s getting exactly what he wants,’’ said Brown of her initial reaction when asked by her attorney if she would approve the agreement.

Brown learned of the agreement while in the Twin Cities on April 10 for the Minneapolis-St. Paul International Film Festival and the debut showing of “Pot (The Movie)’’ which documents the fight for medical marijuana, and in which she appears.

By approving the agreement, Brown said she spares her son Trey the trauma of having to testify in the trial. The prosecution intended to subpoena Trey, according to Brown. She said it would have been traumatic for her son to have to testify. She said her attorney filed statements from her son’s medical provider warning of the harm it could cause him.

Brown was charged last June with child endangerment after surrendering a small amount of cannabis oil to law enforcement. The family had traveled to Colorado to obtain the oil to treat Trey. He had suffered the traumatic brain injury when struck by a baseball when 11 years old.

Brown and her husband, David, believe their son would be eligible to receive the cannabis oil when use of medical cannabis for some medical conditions becomes legal in Minnesota on July 1.

The legal fight has been a financial blow to the family, and the ordeal very stressful for the parents and their three children, Brown said. They have been fearful that she would be taken away and put in prison. She and her husband have a gofundme.com fundraising site to accept funds for their medical and other costs, and now the costs to move to a new home.

Brown said they have decided to move to Colorado where David has accepted a position with his former employer, the Corrections Corporation of America.

The ordeal has put Angela Brown into the limelight as a spokeswoman for those calling for laws to allow for the use of medical cannabis. Her family’s story is part of the newly released documentary film, and Brown has appeared on national television programs to tell it.

While it has been difficult for her family, she believes the ordeal has served some good in that she has been able to call attention to the issue. She remains committed to it.

“I’m going to continue to fight. It’s not done,’’ she said.