import 'dart:io'; import 'package:compdfkit_flutter/compdfkit.dart'; import 'package:compdfkit_flutter/widgets/cpdf_readerview_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; void main() { runApp(const MyApp()); if (Platform.isAndroid) { SystemUiOverlayStyle systemUiOverlayStyle = const SystemUiOverlayStyle( statusBarColor: Colors.transparent ); SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle); } } class MyApp extends StatefulWidget { const MyApp({super.key}); @override State createState() => _MyAppState(); } class _MyAppState extends State { String _version = ''; String _buildTag = ''; @override void initState() { super.initState(); _init(); } void _init() async { ComPDFKit.init( 'rgFNqsZykKZ9g+uUEl59uYolfyQQha7hfKF3ojzs41pP3PBGfzPS/9CMwsBkJsqNBfULy7kBiUGXelugMdloJ+DWqE5Zjt4+xP6t2paXuFOPX/uXy6G/9vZkuEGSIFfBpUzrCgcXs4xxh8k5+sAfW+EA7DvUgt7u0CcPRyqr1Jg=', 'mG0c3O3Mzeu5dkZJW3gpqiAYrD3HuVAh2a+2rjOsIRhyTBaXPgPRGke3LtDII3XZqZRGhToxzSR51pXlzib4f0WpLOaOv47bs7x+UqfQzn9hrp9sGpqfp0B228KI+IMTu4aGVjtYuk+Uxs/kosIBwyVLBY93oKLBB8UJg4t07605BGbaBKUlDopA0iGq1HSncUNNe38VRnoTm6ibgXyIGz5dhD0tvZsf2Vt2my9XP/2scnSpUeS12jwHQXiCsaaK/oKTJGcYKLPGdXenrzHolQ=='); String ver = await ComPDFKit.getVersionCode(); setState(() { _version = ver; }); ComPDFKit.getSDKBuildTag().then((value) { setState(() { _buildTag = value; }); }); ComPDFKit.getTemporaryDirectory().then((value) { }); } @override Widget build(BuildContext context) { return const CPDFReaderViewPage(isDark: false); } }