Flutter: Create an Agreement View

Copy, Paste & Move On

Jody McAlister
Flutter Town

--

This example is for those that need to have the user accept an agreement or terms of use statement before proceeding. The user has the ability to click on an X to cancel the agreement or to click AGREE and continue forward with the app.

I’ve included the generic main.dart file as I hate incomplete examples. This app is comprised of 3 files: main.dart, myApp.dart and agreementDialog.dart.

Hopefully I can save you time trying to work this aspect of your app and move on to more difficult tasks. Copy, Paste and Move On!

I do recommend you spend some time at one point examining the code and know what is happening.

This code is from an app I published in both App stores. It works equally well in both platforms. I leave it to you to pretty it up!

I’m going to save a step and import “agreementDialog.dart” as fullDialog (line 2 in myApp.dart) to simplify my call later in the code to the class createAgreement in agreementDialog.dart.

--

--