12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import 'package:ConversionFlutterDemo/states/convert_options_provider.dart';
- import 'package:ConversionFlutterDemo/states/convert_provider.dart';
- import 'package:ConversionFlutterDemo/widgets/conversion_sdk_info_widget.dart';
- import 'package:ConversionFlutterDemo/widgets/convert_config.dart';
- import 'package:ConversionFlutterDemo/widgets/convert_list_widget.dart';
- import 'package:flutter/material.dart';
- import 'package:provider/provider.dart';
- void main() {
- runApp(MultiProvider(
- providers: [
- ChangeNotifierProvider(create: (_) => ConvertProvider()),
- 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
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- title: Text(widget.title),
- ),
- body: Padding(
- padding: EdgeInsets.all(8),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: const <Widget>[
- ConversionSdkInfoWidget(),//conversion sdk info widget
- ConvertConfigWidget(), //convert options widget,
- Expanded(child: ConvertListWidget())
- ],
- ),
- ));
- }
- }
|