1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- /// main.dart
- ///
- /// Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
- ///
- /// THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
- /// AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
- /// UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
- /// This notice may not be removed from this file.
- import 'package:flutter/material.dart';
- import 'package:kmpdfkit_conversion_flutter/cpdf_converter.dart';
- import 'package:kmpdfkit_conversion_flutter_example/states/convert_options_provider.dart';
- import 'package:kmpdfkit_conversion_flutter_example/states/convert_task_queue_provider.dart';
- import 'package:kmpdfkit_conversion_flutter_example/widgets/conversion_sdk_info_widget.dart';
- import 'package:kmpdfkit_conversion_flutter_example/widgets/convert_options_widget.dart';
- import 'package:kmpdfkit_conversion_flutter_example/widgets/convert_list_widget.dart';
- import 'package:provider/provider.dart';
- void main() {
- runApp(MultiProvider(
- providers: [
- ChangeNotifierProvider(create: (_) => ConvertTaskQueueProvider()),
- ChangeNotifierProvider(create: (_) => ConvertOptionsProvider())
- ],
- child: const MyApp(),
- ));
- }
- class MyApp extends StatelessWidget {
- const MyApp({super.key});
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- title: 'ComPDFKitConversionDemo',
- theme: ThemeData(
- primarySwatch: Colors.blue,
- ),
- home: const MyHomePage(title: 'ComPDFKitConversionDemo'));
- }
- }
- class MyHomePage extends StatefulWidget {
- const MyHomePage({super.key, required this.title});
- final String title;
- @override
- State<MyHomePage> createState() => _MyHomePageState();
- }
- class _MyHomePageState extends State<MyHomePage> {
- @override
- void initState() {
- super.initState();
- CPDFConverter.init("HcEZS8HQrBctbJli1xlWOJZq3SAVyEJGiOLDVgu7TaSCTutQTwE7Ob0BHdoyyqeauYV5qpfpv+0sqREPobyjxMYPXPWgfR9tu1l8cBzY1aagCXmEmH52tqT11le1QLdQpIHuMEjl0kNKrrnXoZg5IXM+yK+zGPFZur+Sg36vEak=",
- "mG0c3O3Mzeu5dkZJW3gpqotjgd+APU/4fMqIHQR4gdwo2nT+JSjvjfOo8NxHMSkD++hxhwHCwPoJfrSZGObicXKC+c93UnqcfqUbcdY/oQKcM/fgvvcctF5rcqYAH1dpMv7C2jvq4o0q6sQtN3jR43QdIezW2vV5wIeyNjPTddUNBwTRKvRkQ75Y56jVVUcsWiExjnRPpqLnyppZAnYJ1tnsa41fJuMqWbPW2c3qJUemdtKP7E4eFYSl6tjgcetK");
- }
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- title: Text(widget.title),
- ),
- body: const Padding(
- padding: EdgeInsets.all(8),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- ConversionSdkInfoWidget(),//conversion sdk info widget
- ConvertConfigWidget(), //convert options widget,
- Expanded(child: ConvertListWidget())
- ],
- ),
- ));
- }
- }
|