flutter_privacy_policy 0.0.6 copy "flutter_privacy_policy: ^0.0.6" to clipboard
flutter_privacy_policy: ^0.0.6 copied to clipboard

A better UX to present your privacy policy

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_privacy_policy/flutter_privacy_policy.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  var allow = false;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Example conversational',
      home: Scaffold(
        appBar: AppBar(
          title: Text("Conversatinal Privacy Policy"),
        ),
        body: Center(
            child: allow
                ? Text("Start your app :D !")
                : PrivacyPolicyWidget(() {
                    setState(() {
                      allow = true;
                    });
                  })),
      ),
    );
  }
}