
913 So.2d 1203 (2005)
Efrain PEÑA, Appellant,
v.
STATE of Florida, Appellee.
No. 4D04-2991.
District Court of Appeal of Florida, Fourth District.
October 12, 2005.
*1204 V.J. (Jimmy) Benincasa, Vero Beach, for appellant.
Charles J. Crist, Jr., Attorney General, Tallahassee, and Monique E. L'Italien, Assistant Attorney General, West Palm Beach, for appellee.

ON MOTION FOR REHEARING
PER CURIAM.
We deny the motion for rehearing, withdraw our earlier opinion, and substitute the following.
Efrain Peña challenges the trial court's refusal to allow him to enter St. Lucie County's version of the pretrial drug intervention program ("Drug Court"). Peña, a non-resident alien, was arrested for possession of cocaine and eventually filed a motion to participate in Drug Court. The State argued against participation on the ground that participation may not be appropriate based on Peña's status as an illegal alien. The trial court denied the motion, Peña withdrew his not guilty plea, and Peña entered a no contest plea reserving the right to appeal the denial of his motion to participate in Drug Court. The trial court then sentenced Peña to probation.
Peña filed this appeal, believing this court had jurisdiction pursuant to Florida Rule of Appellate Procedure 9.140(b)(2)(A)(i). That rule allows a defendant to appeal, after a no contest plea, "a prior dispositive order of the lower tribunal." Fla. R.App. P. 9.140(b)(2)(A)(i). In this context, an "issue is legally dispositive `only if, regardless of whether the appellate court affirms or reverses the lower court's decision, there will be no trial of the case.'" Levine v. State, 788 So.2d 379, 380 (Fla. 4th DCA 2001) (quoting Zambuto v. State, 731 So.2d 46, 46 (Fla. 4th DCA 1999)). An exception to this rule applies when there is "record evidence of a stipulation between the parties that the issue was dispositive." Weber v. State, 492 So.2d 1166, 1167 (Fla. 4th DCA 1986) (citing Finney v. State, 420 So.2d 639 (Fla. 3d DCA 1982)).
We conclude the denial of the motion to participate in Drug Court is not a legally dispositive order to the extent necessary to confer jurisdiction in this court. Even if this court reversed and remanded for the court to grant Peña's entry into the program, a trial may still yet be necessary if, for some reason, Peña opts out of the program and re-enters the regular criminal justice system. See generally Mullin v. Jenne, 890 So.2d 543 (Fla. 4th DCA 2005). There is no great expectation or guarantee that reversal would absolutely foreclose the possibility of a future trial on this specific charge.
Further, the exception to the rule, based on mutual stipulation, is not appropriate in this situation. It is well-settled that subject-matter jurisdiction cannot be conferred by agreement of the parties. See City of West Palm Beach v. Palm Beach County Police Benev. Ass'n, 387 So.2d 533 (Fla. 4th DCA 1980); Dicaprio v. State, 352 So.2d 78 (Fla. 4th DCA 1977). In this context, stipulating to the dispositive nature of an order is applicable where the trial court and the prosecutor acknowledge *1205 that the pursuit of criminal charges would be abandoned due to the suppression of evidence. See Lamour v. State, 899 So.2d 1256 (Fla. 4th DCA 2005) (noting the motion to suppress cocaine was dispositive where the charge was simple possession of that very same cocaine); Levine, 788 So.2d at 380 (suggesting the denial of a motion to discharge habitual DWLS might have been dispositive if the State had agreed that it had no way of presenting sufficient evidence of predicate offenses without the tainted case).
The courts are not unanimous in dismissing an appeal based upon a plea after the trial court denies admission to a pretrial intervention program. In Gardner v. State, 709 So.2d 612 (Fla. 1st DCA 1998), the court considered the issue after the defendant pled nolo contendere to possession of drugs and was sentenced to county jail. However, the court did not directly consider the jurisdictional issue even though it ruled on the merits of the claim.
There are other methods to raise this issue. We have reviewed orders denying entry to the drug intervention program as appropriately raised by petition for certiorari. See Hewlett v. State, 661 So.2d 112 (Fla. 4th DCA 1995) (review by certiorari appropriate from order of chief judge transferring case out of drug division and into felony division). Defendant did not file such a petition in this case.
Because we have concluded that the order on appeal was not dispositive and the exception to the rule does not apply, we have no jurisdiction to reach the merits of this case.
Dismissed.
GUNTHER, WARNER and HAZOURI, JJ., concur.
