Compare commits
No commits in common. "main" and "feature/oauth" have entirely different histories.
main
...
feature/oa
@ -10,8 +10,6 @@ import 'alert.dart';
|
||||
import '../variable/globals.dart' as globals;
|
||||
|
||||
import '../pages/LoginDemo.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart'; // Import dotenv
|
||||
import 'package:encrypt_shared_preferences/provider.dart';
|
||||
|
||||
class MyDrawer extends StatelessWidget with ShowAlertDialog {
|
||||
Future<void> logout(BuildContext context) async {
|
||||
@ -30,20 +28,7 @@ class MyDrawer extends StatelessWidget with ShowAlertDialog {
|
||||
print("Status code logout ${response.statusCode}");
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
await prefs.remove("access_token");
|
||||
await dotenv.load(fileName: ".env"); // Load .env file
|
||||
|
||||
final keyEncrypt = dotenv.env['KEY_ENCRYPT'] ?? '';
|
||||
if (keyEncrypt.isNotEmpty) {
|
||||
await EncryptedSharedPreferences.initialize(keyEncrypt);
|
||||
var sharedPref = EncryptedSharedPreferences.getInstance();
|
||||
String username = sharedPref.getString("username") ?? "";
|
||||
String password = sharedPref.getString("password") ?? "";
|
||||
if ((username.isEmpty) || (password.isEmpty)) {
|
||||
sharedPref.remove("username");
|
||||
sharedPref.remove("password");
|
||||
}
|
||||
}
|
||||
await prefs.remove("access_token"); // Correctly remove the token
|
||||
Navigator.pushAndRemoveUntil(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) => LoginDemo()),
|
||||
|
@ -3,15 +3,10 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import '../variable/globals.dart' as globals;
|
||||
import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:encrypt_shared_preferences/provider.dart';
|
||||
import '../pages/LoginDemo.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart'; // Import dotenv
|
||||
|
||||
class AuthService {
|
||||
// Login with username and password
|
||||
Future<bool> login(String username, String password,
|
||||
{bool rememberMe = false}) async {
|
||||
Future<bool> login(String username, String password) async {
|
||||
final url = Uri.parse("${globals.api}/token");
|
||||
|
||||
try {
|
||||
@ -21,22 +16,14 @@ class AuthService {
|
||||
'accept': 'application/json',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: {"username": username, "password": password},
|
||||
body: {
|
||||
"username": username,
|
||||
"password": password,
|
||||
},
|
||||
);
|
||||
|
||||
if (response.statusCode == 200 || response.statusCode == 201) {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
if (rememberMe) {
|
||||
await dotenv.load(fileName: ".env"); // Load .env file
|
||||
|
||||
final keyEncrypt = dotenv.env['KEY_ENCRYPT'] ?? '';
|
||||
if (keyEncrypt.isNotEmpty) {
|
||||
await EncryptedSharedPreferences.initialize(keyEncrypt);
|
||||
var sharedPref = EncryptedSharedPreferences.getInstance();
|
||||
sharedPref.setString("username", username);
|
||||
sharedPref.setString("password", password);
|
||||
}
|
||||
}
|
||||
final cookies = response.headers["set-cookie"]?.split(";") ?? [];
|
||||
|
||||
for (final cookie in cookies) {
|
||||
@ -90,25 +77,8 @@ class AuthService {
|
||||
return true;
|
||||
} else {
|
||||
print("Token is invalid. Status code: ${response.statusCode}");
|
||||
await dotenv.load(fileName: ".env"); // Load .env file
|
||||
|
||||
final keyEncrypt = dotenv.env['KEY_ENCRYPT'] ?? '';
|
||||
if (keyEncrypt.isNotEmpty) {
|
||||
await EncryptedSharedPreferences.initialize(keyEncrypt);
|
||||
var sharedPref = EncryptedSharedPreferences.getInstance();
|
||||
String username = sharedPref.getString("username") ?? "";
|
||||
String password = sharedPref.getString("password") ?? "";
|
||||
if ((username.isEmpty) || (password.isEmpty)) {
|
||||
sharedPref.remove("username");
|
||||
sharedPref.remove("password");
|
||||
await prefs.remove("access_token"); // Clear invalid token
|
||||
return false;
|
||||
} else {
|
||||
return login(username, password);
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
await prefs.remove("access_token"); // Clear invalid token
|
||||
return false;
|
||||
}
|
||||
} catch (e) {
|
||||
print("Error while checking token: $e");
|
||||
@ -116,21 +86,6 @@ class AuthService {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> checkTokenStatus(context) async {
|
||||
bool loggedIn = await isLoggedIn();
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
|
||||
if (!loggedIn) {
|
||||
await prefs.remove("access_token"); // Correctly remove the token
|
||||
|
||||
Navigator.pushAndRemoveUntil(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) => LoginDemo()),
|
||||
(route) => false, // Remove all previous routes
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Get stored access token
|
||||
Future<String?> getAccessToken() async {
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
|
@ -140,7 +140,6 @@ class _AddProfileState extends State<AddProfile> with ShowAlertDialog {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
||||
setState(() {
|
||||
_bannerAd = ad;
|
||||
|
@ -1,4 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import '../classes/MyDrawer.dart';
|
||||
@ -6,7 +7,6 @@ import '../classes/MyDrawer.dart';
|
||||
import 'DisplayPictureScreen.dart';
|
||||
import 'package:camera/camera.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
// Ensure that plugin services are initialized so that `availableCameras()`
|
||||
@ -46,14 +46,12 @@ class Camera extends StatefulWidget {
|
||||
class CameraState extends State<Camera> {
|
||||
late CameraController _controller;
|
||||
late Future<void> _initializeControllerFuture;
|
||||
final AuthService _authService = AuthService();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// To display the current output from the Camera,
|
||||
// create a CameraController.
|
||||
_authService.checkTokenStatus(context);
|
||||
|
||||
_controller = CameraController(
|
||||
// Get a specific camera from the list of available cameras.
|
||||
@ -97,6 +95,7 @@ class CameraState extends State<Camera> {
|
||||
// camera preview. Use a FutureBuilder to display a loading spinner until the
|
||||
// controller has finished initializing.
|
||||
drawer: MyDrawer(),
|
||||
|
||||
body: FutureBuilder<void>(
|
||||
future: _initializeControllerFuture,
|
||||
builder: (context, snapshot) {
|
||||
|
@ -7,7 +7,6 @@ import 'package:image_picker/image_picker.dart';
|
||||
import 'EditEvent.dart';
|
||||
import 'package:camera/camera.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
// Ensure that plugin services are initialized so that `availableCameras()`
|
||||
@ -46,13 +45,10 @@ class CameraEdit extends StatefulWidget {
|
||||
class CameraEditState extends State<CameraEdit> {
|
||||
late CameraController _controller;
|
||||
late Future<void> _initializeControllerFuture;
|
||||
final AuthService _authService = AuthService();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_authService.checkTokenStatus(context);
|
||||
|
||||
// To display the current output from the Camera,
|
||||
// create a CameraController.
|
||||
|
||||
@ -99,6 +95,7 @@ class CameraEditState extends State<CameraEdit> {
|
||||
// camera preview. Use a FutureBuilder to display a loading spinner until the
|
||||
// controller has finished initializing.
|
||||
drawer: MyDrawer(),
|
||||
|
||||
body: FutureBuilder<void>(
|
||||
future: _initializeControllerFuture,
|
||||
builder: (context, snapshot) {
|
||||
|
@ -16,7 +16,6 @@ import '../classes/MyDrawer.dart';
|
||||
|
||||
import '../classes/ad_helper.dart';
|
||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@ -63,14 +62,11 @@ class DisplayPictureScreen extends StatefulWidget {
|
||||
class DisplayPictureScreenState extends State<DisplayPictureScreen>
|
||||
with ShowDescImageAdd, ShowAlertDialog, TickerProviderStateMixin {
|
||||
BannerAd? _bannerAd;
|
||||
final AuthService _authService = AuthService();
|
||||
|
||||
late AnimationController controller;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_authService.checkTokenStatus(context);
|
||||
|
||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
||||
setState(() {
|
||||
_bannerAd = ad;
|
||||
|
@ -9,9 +9,12 @@ import 'package:textfield_tags/textfield_tags.dart';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'dart:typed_data';
|
||||
import '../classes/events.dart';
|
||||
import '../classes/MyDrawer.dart';
|
||||
|
||||
import 'ItemMenu.dart';
|
||||
import 'CameraEdit.dart';
|
||||
import 'package:camera/camera.dart';
|
||||
|
||||
import '../classes/alert.dart';
|
||||
@ -21,7 +24,6 @@ import '../variable/globals.dart' as globals;
|
||||
|
||||
import '../classes/ad_helper.dart';
|
||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@ -58,8 +60,6 @@ class EditEvent extends StatefulWidget {
|
||||
class _EditEventState extends State<EditEvent>
|
||||
with ShowAlertDialog, ShowEventDialog {
|
||||
BannerAd? _bannerAd;
|
||||
final AuthService _authService = AuthService();
|
||||
|
||||
TextEditingController inputName = TextEditingController();
|
||||
|
||||
TextEditingController inputDate = TextEditingController();
|
||||
@ -315,8 +315,6 @@ class _EditEventState extends State<EditEvent>
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_authService.checkTokenStatus(context);
|
||||
|
||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
||||
setState(() {
|
||||
_bannerAd = ad;
|
||||
|
@ -17,7 +17,6 @@ import '../variable/globals.dart' as globals;
|
||||
|
||||
import '../classes/ad_helper.dart';
|
||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@ -45,8 +44,6 @@ class EditProfile extends StatefulWidget {
|
||||
class _EditProfileState extends State<EditProfile>
|
||||
with ShowAlertDialog, ShowEventDialog {
|
||||
BannerAd? _bannerAd;
|
||||
final AuthService _authService = AuthService();
|
||||
|
||||
TextEditingController inputUserName = TextEditingController();
|
||||
|
||||
TextEditingController inputName = TextEditingController();
|
||||
@ -201,8 +198,6 @@ class _EditProfileState extends State<EditProfile>
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_authService.checkTokenStatus(context);
|
||||
|
||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
||||
setState(() {
|
||||
_bannerAd = ad;
|
||||
|
@ -12,7 +12,6 @@ import '../classes/eventAdded.dart';
|
||||
|
||||
import '../classes/ad_helper.dart';
|
||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@ -40,8 +39,6 @@ class EditSettings extends StatefulWidget {
|
||||
class _EditProfileState extends State<EditSettings>
|
||||
with ShowAlertDialog, ShowEventDialog {
|
||||
BannerAd? _bannerAd;
|
||||
final AuthService _authService = AuthService();
|
||||
|
||||
TextEditingController inputUserName = TextEditingController();
|
||||
int? kilometer;
|
||||
|
||||
@ -63,8 +60,6 @@ class _EditProfileState extends State<EditSettings>
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_authService.checkTokenStatus(context);
|
||||
|
||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
||||
setState(() {
|
||||
_bannerAd = ad;
|
||||
|
@ -23,7 +23,6 @@ import 'EditEvent.dart';
|
||||
|
||||
import '../classes/ad_helper.dart';
|
||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@ -76,7 +75,6 @@ class ItemMenu extends StatefulWidget {
|
||||
|
||||
class _ItemMenuState extends State<ItemMenu> with ShowAlertDialog {
|
||||
BannerAd? _bannerAd;
|
||||
final AuthService _authService = AuthService();
|
||||
|
||||
String listUser = "";
|
||||
String eventName = "";
|
||||
@ -93,8 +91,6 @@ class _ItemMenuState extends State<ItemMenu> with ShowAlertDialog {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_authService.checkTokenStatus(context);
|
||||
|
||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
||||
setState(() {
|
||||
_bannerAd = ad;
|
||||
|
@ -11,7 +11,6 @@ import 'package:intl/date_symbol_data_local.dart';
|
||||
|
||||
import '../variable/globals.dart' as globals;
|
||||
import '../classes/MyDrawer.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
// app starting point
|
||||
void main() {
|
||||
@ -42,8 +41,6 @@ class ListItemOrganizers extends StatefulWidget {
|
||||
|
||||
// homepage state
|
||||
class _MyHomePageState extends State<ListItemOrganizers> {
|
||||
final AuthService _authService = AuthService();
|
||||
|
||||
// variable to call and store future list of posts
|
||||
|
||||
// function to fetch data from api and return future list of posts
|
||||
@ -63,12 +60,6 @@ class _MyHomePageState extends State<ListItemOrganizers> {
|
||||
return body;
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_authService.checkTokenStatus(context);
|
||||
}
|
||||
|
||||
// build function
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -12,7 +12,6 @@ import 'package:intl/date_symbol_data_local.dart';
|
||||
import '../variable/globals.dart' as globals;
|
||||
|
||||
import '../classes/MyDrawer.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
// app starting point
|
||||
void main() {
|
||||
@ -44,8 +43,6 @@ class ListItemTags extends StatefulWidget {
|
||||
class _MyHomePageState extends State<ListItemTags> {
|
||||
// variable to call and store future list of posts
|
||||
|
||||
final AuthService _authService = AuthService();
|
||||
|
||||
// function to fetch data from api and return future list of posts
|
||||
static Future<List<Events>> getPosts(tags) async {
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
@ -63,12 +60,6 @@ class _MyHomePageState extends State<ListItemTags> {
|
||||
return body;
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_authService.checkTokenStatus(context);
|
||||
}
|
||||
|
||||
// build function
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -18,7 +18,6 @@ import 'package:camera/camera.dart';
|
||||
|
||||
import '../classes/ad_helper.dart';
|
||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@ -47,7 +46,6 @@ class ListItemMenu extends StatefulWidget {
|
||||
|
||||
class _MyHomePageState extends State<ListItemMenu> {
|
||||
BannerAd? _bannerAd;
|
||||
final AuthService _authService = AuthService();
|
||||
|
||||
Future<List<Events>> postsFuture = getPosts();
|
||||
List<Events> filteredPosts = [];
|
||||
@ -147,7 +145,6 @@ class _MyHomePageState extends State<ListItemMenu> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_authService.checkTokenStatus(context);
|
||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
||||
setState(() {
|
||||
_bannerAd = ad;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
||||
import 'package:google_sign_in/google_sign_in.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
import '../pages/ListItemMenu.dart';
|
||||
@ -18,7 +19,6 @@ class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
|
||||
TextEditingController inputPseudo = TextEditingController();
|
||||
TextEditingController inputPassword = TextEditingController();
|
||||
final AuthService _authService = AuthService();
|
||||
bool _rememberMe = false;
|
||||
|
||||
Future<void> _login(BuildContext context) async {
|
||||
final pseudo = inputPseudo.text;
|
||||
@ -29,8 +29,7 @@ class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
|
||||
return;
|
||||
}
|
||||
|
||||
bool success =
|
||||
await _authService.login(pseudo, password, rememberMe: _rememberMe);
|
||||
bool success = await _authService.login(pseudo, password);
|
||||
|
||||
if (success) {
|
||||
Navigator.push(
|
||||
@ -55,6 +54,7 @@ class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
|
||||
|
||||
Future<void> _checkLoginStatus() async {
|
||||
bool loggedIn = await _authService.isLoggedIn();
|
||||
print("logged status : ${loggedIn}");
|
||||
if (loggedIn) {
|
||||
Navigator.push(
|
||||
context, MaterialPageRoute(builder: (_) => ListItemMenu()));
|
||||
@ -110,15 +110,6 @@ class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
|
||||
),
|
||||
),
|
||||
),
|
||||
CheckboxListTile(
|
||||
title: Text("Se souvenir de moi"),
|
||||
value: _rememberMe,
|
||||
onChanged: (newValue) {
|
||||
setState(() {
|
||||
_rememberMe = newValue ?? false;
|
||||
});
|
||||
},
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.push(context,
|
||||
|
@ -11,7 +11,6 @@ import 'package:geolocator/geolocator.dart'; // For getting the user's location
|
||||
import '../classes/alert.dart'; // Assuming this contains your error dialog code.
|
||||
import '../variable/globals.dart' as globals;
|
||||
import '../classes/MyDrawer.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
void main() async {
|
||||
await dotenv.load(fileName: ".env"); // Load .env file
|
||||
@ -45,8 +44,6 @@ class MapboxPages extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _MapboxPagesState extends State<MapboxPages> with ShowAlertDialog {
|
||||
final AuthService _authService = AuthService();
|
||||
|
||||
late MapboxMapController mapController;
|
||||
late String mapboxAccessToken;
|
||||
List<LatLng> routeCoordinates = [];
|
||||
@ -61,8 +58,6 @@ class _MapboxPagesState extends State<MapboxPages> with ShowAlertDialog {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_authService.checkTokenStatus(context);
|
||||
|
||||
_getUserLocation();
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,6 @@ import '../variable/globals.dart' as globals;
|
||||
|
||||
import '../classes/ad_helper.dart';
|
||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
||||
import '../classes/auth_service.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
@ -52,7 +51,6 @@ class UpdateeventImage extends StatefulWidget {
|
||||
class _UpdateeventImageState extends State<UpdateeventImage>
|
||||
with ShowAlertDialog, ShowEventDialog {
|
||||
BannerAd? _bannerAd;
|
||||
final AuthService _authService = AuthService();
|
||||
|
||||
TextEditingController inputName = TextEditingController();
|
||||
|
||||
@ -318,8 +316,6 @@ class _UpdateeventImageState extends State<UpdateeventImage>
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_authService.checkTokenStatus(context);
|
||||
|
||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
||||
setState(() {
|
||||
_bannerAd = ad;
|
||||
|
@ -7,12 +7,16 @@
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <file_selector_linux/file_selector_plugin.h>
|
||||
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||
|
||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
|
||||
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
|
||||
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
|
||||
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
|
||||
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
|
||||
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
file_selector_linux
|
||||
flutter_secure_storage_linux
|
||||
url_launcher_linux
|
||||
)
|
||||
|
||||
|
@ -5,16 +5,22 @@
|
||||
import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import facebook_auth_desktop
|
||||
import file_selector_macos
|
||||
import flutter_secure_storage_macos
|
||||
import geolocator_apple
|
||||
import google_sign_in_ios
|
||||
import path_provider_foundation
|
||||
import shared_preferences_foundation
|
||||
import url_launcher_macos
|
||||
import webview_flutter_wkwebview
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FacebookAuthDesktopPlugin.register(with: registry.registrar(forPlugin: "FacebookAuthDesktopPlugin"))
|
||||
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
|
||||
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
||||
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
|
||||
FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin"))
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||
|
@ -9,22 +9,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.6.1"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.6.0"
|
||||
asn1lib:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: asn1lib
|
||||
sha256: "4bae5ae63e6d6dd17c4aac8086f3dec26c0236f6a0f03416c6c19d830c367cf5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.8"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -105,14 +89,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.18.0"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: convert
|
||||
sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
cross_file:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -161,22 +137,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
encrypt:
|
||||
facebook_auth_desktop:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: encrypt
|
||||
sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2"
|
||||
name: facebook_auth_desktop
|
||||
sha256: "219d559a33891e937c1913430505eae01fb946cb35729167bbdc747e3ebbd9ff"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.3"
|
||||
encrypt_shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: encrypt_shared_preferences
|
||||
sha256: "35cd218e5e9d12fe4a63a545f46f2144d861909e4c4f2c4606fc75ffb53d9a46"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.8.8"
|
||||
version: "2.1.1"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -254,6 +222,30 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.2.1"
|
||||
flutter_facebook_auth:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_facebook_auth
|
||||
sha256: d542743aee9571fad59aa4cfb645640dbb49f23b039d07c34b5e21bc3d5857e9
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.1.1"
|
||||
flutter_facebook_auth_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_facebook_auth_platform_interface
|
||||
sha256: e04b8dbfa77702bea45a79993163ad5d20b2c0084109bec591fdc2b9ee505779
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.2"
|
||||
flutter_facebook_auth_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_facebook_auth_web
|
||||
sha256: f682400d61cf8d52dd8b6458b5ee106ed57e95309a117dc32875d3da129ce47c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.2"
|
||||
flutter_gemini:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -278,6 +270,54 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.23"
|
||||
flutter_secure_storage:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage
|
||||
sha256: "9cad52d75ebc511adfae3d447d5d13da15a55a92c9410e50f67335b6d21d16ea"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "9.2.4"
|
||||
flutter_secure_storage_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_linux
|
||||
sha256: bf7404619d7ab5c0a1151d7c4e802edad8f33535abfbeff2f9e1fe1274e2d705
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
flutter_secure_storage_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_macos
|
||||
sha256: "6c0a2795a2d1de26ae202a0d78527d163f4acbb11cde4c75c670f3a0fc064247"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.3"
|
||||
flutter_secure_storage_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_platform_interface
|
||||
sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
flutter_secure_storage_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_web
|
||||
sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.1"
|
||||
flutter_secure_storage_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_windows
|
||||
sha256: b20b07cb5ed4ed74fc567b78a72936203f587eba460af1df11281c9326cd3709
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@ -344,6 +384,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.2.3"
|
||||
google_identity_services_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_identity_services_web
|
||||
sha256: "55580f436822d64c8ff9a77e37d61f5fb1e6c7ec9d632a43ee324e2a05c3c6c9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.3"
|
||||
google_mobile_ads:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -352,6 +400,46 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.3.1"
|
||||
google_sign_in:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: google_sign_in
|
||||
sha256: fad6ddc80c427b0bba705f2116204ce1173e09cf299f85e053d57a55e5b2dd56
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.2.2"
|
||||
google_sign_in_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_sign_in_android
|
||||
sha256: "7af72e5502c313865c729223b60e8ae7bce0a1011b250c24edcf30d3d7032748"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.35"
|
||||
google_sign_in_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_sign_in_ios
|
||||
sha256: "8468465516a6fdc283ffbbb06ec03a860ee34e9ff84b0454074978705b42379b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.8.0"
|
||||
google_sign_in_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_sign_in_platform_interface
|
||||
sha256: "1f6e5787d7a120cc0359ddf315c92309069171306242e181c09472d1b00a2971"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.5"
|
||||
google_sign_in_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: google_sign_in_web
|
||||
sha256: ada595df6c30cead48e66b1f3a050edf0c5cf2ba60c185d69690e08adcc6281b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.4+3"
|
||||
http:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -688,14 +776,6 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.8"
|
||||
pointycastle:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pointycastle
|
||||
sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.9.1"
|
||||
shared_preferences:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -965,6 +1045,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.18.3"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.10.1"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -51,7 +51,8 @@ dependencies:
|
||||
url_launcher: ^6.3.1
|
||||
mapbox_gl: ^0.16.0
|
||||
google_mobile_ads: ^5.3.1
|
||||
encrypt_shared_preferences: ^0.8.8
|
||||
google_sign_in: ^6.2.2
|
||||
flutter_facebook_auth: ^7.1.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
#include <file_selector_windows/file_selector_windows.h>
|
||||
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
|
||||
#include <geolocator_windows/geolocator_windows.h>
|
||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||
#include <url_launcher_windows/url_launcher_windows.h>
|
||||
@ -14,6 +15,8 @@
|
||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
FileSelectorWindowsRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
||||
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
|
||||
GeolocatorWindowsRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("GeolocatorWindows"));
|
||||
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
file_selector_windows
|
||||
flutter_secure_storage_windows
|
||||
geolocator_windows
|
||||
permission_handler_windows
|
||||
url_launcher_windows
|
||||
|
Loading…
x
Reference in New Issue
Block a user