legalsoft_package 0.0.1 legalsoft_package: ^0.0.1 copied to clipboard
A flutter package for legalsoft clients.
import 'package:dart_package/dart_package.dart'; import 'package:flutter/material.dart';
void main() { runApp(MyApp()); }
class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(title: 'PermissionPolicyDialog Demo'), ); } }
class MyHomePage extends StatefulWidget { MyHomePage({Key? key, required this.title}) : super(key: key); final String title;
@override _MyHomePageState createState() => _MyHomePageState(); }
class _MyHomePageState extends State
void _showDialog() { // Replace the array below with array provided to you on the legalsoft site List
// Following line shows the required dialog
PermissionPolicyDialog('appId', perms).show(context);
}
@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Text( 'Push the + button to see', ), Text( 'the permissionPolicy dialog', ), ], ), ), floatingActionButton: FloatingActionButton( onPressed: _showDialog, tooltip: 'Increment', child: Icon(Icons.add), ), ); } }