/// conversion_sdk_info_widget.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:provider/provider.dart'; import '../states/convert_task_queue_provider.dart'; class ConversionSdkInfoWidget extends StatefulWidget { const ConversionSdkInfoWidget({Key? key}) : super(key: key); @override State createState() => _ConversionSdkInfoWidgetState(); } class _ConversionSdkInfoWidgetState extends State { String conversionSDKVersion = "Version:"; String convertFileOutputPath = ""; @override void initState() { super.initState(); CPDFConverter.getSDKBuildTag().then((value) { setState(() { conversionSDKVersion = "Version:$value"; }); }); context.read().getOutputDir().then((value) { setState(() { convertFileOutputPath = value ?? ""; }); }); } @override Widget build(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( conversionSDKVersion, style: const TextStyle(fontSize: 13), ), Text( 'OutputPath:$convertFileOutputPath', style: const TextStyle(fontSize: 13), ) ], ); } }