my_first_plugin 0.0.8 copy "my_first_plugin: ^0.0.8" to clipboard
my_first_plugin: ^0.0.8 copied to clipboard

A new Flutter plugin.

example/lib/main.dart

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();

    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", 5);
            },
            child: const Text("Button 1",
                style: TextStyle(color: Colors.white, fontSize: 25)),
          ),
        ),
      ),
    );
  }
}