conversion_sdk_info_widget.dart 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import 'package:ConversionFlutterDemo/convert_sdk_info_flutter.dart';
  2. import 'package:flutter/material.dart';
  3. /// conversion_sdk_info_widget.dart
  4. ///
  5. /// Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
  6. ///
  7. /// THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  8. /// AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  9. /// UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  10. /// This notice may not be removed from this file.
  11. class ConversionSdkInfoWidget extends StatefulWidget {
  12. const ConversionSdkInfoWidget({Key? key}) : super(key: key);
  13. @override
  14. State<ConversionSdkInfoWidget> createState() =>
  15. _ConversionSdkInfoWidgetState();
  16. }
  17. class _ConversionSdkInfoWidgetState extends State<ConversionSdkInfoWidget> {
  18. String conversionSDKVersion = "Version:";
  19. String convertFileOutputPath = "";
  20. @override
  21. void initState() {
  22. super.initState();
  23. ConvertSDKInfoFlutter.getConversionSDKVersion().then((value) {
  24. setState(() {
  25. conversionSDKVersion = "Version:$value";
  26. });
  27. });
  28. ConvertSDKInfoFlutter.getOutputPath().then((value) => {
  29. setState(() {
  30. convertFileOutputPath = value;
  31. })
  32. });
  33. }
  34. @override
  35. Widget build(BuildContext context) {
  36. return Column(
  37. crossAxisAlignment: CrossAxisAlignment.start,
  38. children: [Text(conversionSDKVersion,style: TextStyle(fontSize: 13),), Text('OutputPath:$convertFileOutputPath',style: const TextStyle(fontSize: 13),)],
  39. );
  40. }
  41. }