flutter_sample_package 1.0.1
flutter_sample_package: ^1.0.1 copied to clipboard
Sample Flutter plugin with iOS integration
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:flutter_sample_package/flutter_sample_package.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
final _flutterSamplePackagePlugin = FlutterSamplePackage();
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Integration of Flutter Sample Package'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ElevatedButton(
child: const Text("Hello World Flutter"),
onPressed: () {
_flutterSamplePackagePlugin.printHelloFutter();
},
),
ElevatedButton(
child: const Text("Hello World iOS"),
onPressed: () {
_flutterSamplePackagePlugin.printHelloiOS();
},
),
],
),
),
),
);
}
}