my_first_plugin 0.0.7 my_first_plugin: ^0.0.7 copied to clipboard
A new Flutter plugin.
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:my_first_plugin/my_first_plugin.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
bool response = false;
@override
void initState() {
super.initState();
init();
// initPlatformState();
}
void init() async{
response = await MyFirstPlugin().postPushEvents("Ravi", "Rajput");
setState(() {
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: Text('Running on: $response\n'),
),
),
);
}
}