my_first_plugin 0.0.9 my_first_plugin: ^0.0.9 copied to clipboard
A new Flutter plugin.
import 'package:flutter/material.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{
Connecto.dbInit(5);
setState(() {
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: TextButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color>(Colors.black),
),
onPressed: () {
Connecto.saveData("Ravi");
},
child: const Text("Button 1",
style: TextStyle(color: Colors.white, fontSize: 25)),
),
),
),
);
}
}