plugin_package_test 1.0.2
plugin_package_test: ^1.0.2 copied to clipboard
Mon premier plugin de test
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:plugin_package_test/presentation/views/login/login_page.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Builder(
builder: (BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Column(
children: [
TextButton(
onPressed: () {
signInWithGoogle().then((value) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(value),
duration: const Duration(milliseconds: 500),
),
);
});
},
child: const Text("Connexion custom avec Google"),
),
SizedBox(
child: loginSocialNetwork(),
)
],
),
);
},
),
);
}
}