aargul_licence

Creator: coderz1093

Last updated:

0 purchases

aargul_licence Image
aargul_licence Images
Add to Cart

Description:

aargul licence

aargul_licence #
Aargul Licence plugin
Installation #
First depend on the library by adding this to your packages pubspec.yaml:
dependencies:
aargul_licence: ^0.0.2
copied to clipboard
or Run
flutter pub add aargul_licence
copied to clipboard
Now inside your Dart code you can import it.
import 'package:aargul_core/aargul_core.dart';
import 'package:aargul_licence/aargul_licence.dart';
copied to clipboard
Example #

import 'package:aargul_core/aargul_core.dart';
import 'package:aargul_licence/aargul_licence.dart';

void main() {
runApp(AargulApp(
home: const MyApp(),
dependencies: () {
AargulLicence(
// mandatory
validate:(licenceCode) async {
return Future.delayed( const Duration(seconds: 3), ()=> true);
},
// optional
successMessage : "Your licence code is valid",
failsMessage: "Invalid licence code",
loadingMessage : "Checking...",
builder: (complete) {
var textarea = TextEditingController();
return Container(
alignment: Alignment.center,
padding: const EdgeInsets.all(20),
child: Column(
children: [
TextBox(
controller: textarea,
keyboardType: TextInputType.multiline,
maxLines: 4,
),
Button(
onPressed: () {
complete(textarea.text);
},
child: const Text("SUBMIT"))
],
),
);
},
);
},
));
}

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
return const Placeholder();
}
}

copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.