than_pkg 5.1.0
than_pkg: ^5.1.0 copied to clipboard
My personal Flutter plugin with support for both Android and Linux platforms.
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()) {}
debugPrint('done');
} catch (e) {
debugPrint('[MyApp]: ${e.toString()}');
}
},
),
);
}
}