than_pkg 6.0.0
than_pkg: ^6.0.0 copied to clipboard
My personal Flutter plugin with support for both Android and Linux platforms.
// ignore_for_file: avoid_print, unused_local_variable
import 'package:flutter/material.dart';
import 'package:than_pkg/than_pkg.dart';
void main() {
runApp(MaterialApp(home: const MyApp()));
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Than Pkg ')),
body: Placeholder(),
floatingActionButton: FloatingActionButton(
onPressed: () async {
try {
if (await ThanPkg.platform.isStoragePermissionGranted()) {}
final path = '/home/thancoder/Downloads/The Room 2019.mp4';
final outpath =
'/home/thancoder/projects/dart_plugins/than_pkg/thumb.jpg';
// final pkg = ThanPkg.newpkg.video;
// print(await pkg.getVideoDuration(path));
} catch (e) {
debugPrint('[MyApp]: ${e.toString()}');
}
},
),
);
}
}