Compare commits
No commits in common. "3352bab860b7300e2b8ddaac6294e11316d10d20" and "9846c614a101a2e482e03712469de6e3d00090be" have entirely different histories.
3352bab860
...
9846c614a1
@ -6,9 +6,6 @@
|
|||||||
android:label="covas_mobile"
|
android:label="covas_mobile"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher">
|
android:icon="@mipmap/ic_launcher">
|
||||||
<meta-data
|
|
||||||
android:name="com.google.android.gms.ads.APPLICATION_ID"
|
|
||||||
android:value="ca-app-pub-4855855675386260~3438207239"/>
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
@ -47,8 +47,5 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
<key>NSLocationWhenInUseUsageDescription</key>
|
||||||
<string>Your location is needed for showing nearby events</string>
|
<string>Your location is needed for showing nearby events</string>
|
||||||
<key>GADApplicationIdentifier</key>
|
|
||||||
<string>ca-app-pub-4855855675386260~3438207239</string>
|
|
||||||
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
|
||||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
||||||
|
|
||||||
class AdHelper {
|
|
||||||
static Future<BannerAd> createBannerAd(Function setStateCallback) async {
|
|
||||||
await dotenv.load(fileName: ".env");
|
|
||||||
final adUnitId = dotenv.env['AD_UNIT_ID'] ?? '';
|
|
||||||
|
|
||||||
BannerAd bannerAd = BannerAd(
|
|
||||||
adUnitId: adUnitId,
|
|
||||||
size: AdSize.banner,
|
|
||||||
request: AdRequest(),
|
|
||||||
listener: BannerAdListener(
|
|
||||||
onAdLoaded: (ad) {
|
|
||||||
setStateCallback(() {});
|
|
||||||
},
|
|
||||||
onAdFailedToLoad: (ad, error) {
|
|
||||||
print('Banner Ad failed to load: $error');
|
|
||||||
ad.dispose();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
bannerAd.load();
|
|
||||||
return bannerAd;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
|
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'classes/ad_helper.dart';
|
|
||||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
|
||||||
|
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
//import 'MyHomePage.dart';
|
//import 'MyHomePage.dart';
|
||||||
@ -17,9 +14,7 @@ import 'classes/alert.dart';
|
|||||||
import 'variable/globals.dart' as globals;
|
import 'variable/globals.dart' as globals;
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
|
||||||
await MobileAds.instance.initialize();
|
|
||||||
runApp(MyApp());
|
runApp(MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +34,6 @@ class LoginDemo extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
|
class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
|
||||||
BannerAd? _bannerAd;
|
|
||||||
TextEditingController inputPseudo = TextEditingController();
|
TextEditingController inputPseudo = TextEditingController();
|
||||||
TextEditingController inputPassword = TextEditingController();
|
TextEditingController inputPassword = TextEditingController();
|
||||||
Future<void> _login(BuildContext context) async {
|
Future<void> _login(BuildContext context) async {
|
||||||
@ -134,15 +128,9 @@ class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
|
||||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
|
||||||
setState(() {
|
|
||||||
_bannerAd = ad;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
_checkLocationPermission();
|
_checkLocationPermission();
|
||||||
start();
|
start();
|
||||||
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _checkLocationPermission() async {
|
Future<void> _checkLocationPermission() async {
|
||||||
@ -195,13 +183,6 @@ class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
|
|||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_bannerAd == null
|
|
||||||
? SizedBox.shrink()
|
|
||||||
: SizedBox(
|
|
||||||
height: _bannerAd!.size.height.toDouble(),
|
|
||||||
width: _bannerAd!.size.width.toDouble(),
|
|
||||||
child: AdWidget(ad: _bannerAd!),
|
|
||||||
),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 60.0),
|
padding: const EdgeInsets.only(top: 60.0),
|
||||||
child: Center(
|
child: Center(
|
||||||
@ -271,7 +252,7 @@ class _LoginDemoState extends State<LoginDemo> with ShowAlertDialog {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context, MaterialPageRoute(builder: (_) => AddProfile()));
|
context, MaterialPageRoute(builder: (_) => AddProfile()));
|
||||||
}),
|
})
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -11,12 +11,7 @@ import '../classes/alert.dart';
|
|||||||
|
|
||||||
import '../variable/globals.dart' as globals;
|
import '../variable/globals.dart' as globals;
|
||||||
|
|
||||||
import '../classes/ad_helper.dart';
|
void main() {
|
||||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
|
||||||
|
|
||||||
void main() async {
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
|
||||||
await MobileAds.instance.initialize();
|
|
||||||
runApp(MyApp());
|
runApp(MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,8 +33,6 @@ class AddProfile extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _AddProfileState extends State<AddProfile> with ShowAlertDialog {
|
class _AddProfileState extends State<AddProfile> with ShowAlertDialog {
|
||||||
BannerAd? _bannerAd;
|
|
||||||
|
|
||||||
TextEditingController inputUserName = TextEditingController();
|
TextEditingController inputUserName = TextEditingController();
|
||||||
|
|
||||||
TextEditingController inputName = TextEditingController();
|
TextEditingController inputName = TextEditingController();
|
||||||
@ -140,11 +133,6 @@ class _AddProfileState extends State<AddProfile> with ShowAlertDialog {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
|
||||||
setState(() {
|
|
||||||
_bannerAd = ad;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final _formKey = GlobalKey<FormState>();
|
final _formKey = GlobalKey<FormState>();
|
||||||
@ -166,12 +154,6 @@ class _AddProfileState extends State<AddProfile> with ShowAlertDialog {
|
|||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_bannerAd == null
|
|
||||||
? SizedBox.shrink()
|
|
||||||
: SizedBox(
|
|
||||||
height: _bannerAd!.size.height.toDouble(),
|
|
||||||
width: _bannerAd!.size.width.toDouble(),
|
|
||||||
child: AdWidget(ad: _bannerAd!)),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
left: 15.0, right: 15.0, top: 15, bottom: 0),
|
left: 15.0, right: 15.0, top: 15, bottom: 0),
|
||||||
|
@ -14,12 +14,7 @@ import 'dart:convert';
|
|||||||
import '../variable/globals.dart' as globals;
|
import '../variable/globals.dart' as globals;
|
||||||
import '../classes/MyDrawer.dart';
|
import '../classes/MyDrawer.dart';
|
||||||
|
|
||||||
import '../classes/ad_helper.dart';
|
void main() {
|
||||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
|
||||||
|
|
||||||
void main() async {
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
|
||||||
await MobileAds.instance.initialize();
|
|
||||||
runApp(MyApp());
|
runApp(MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,18 +56,9 @@ class DisplayPictureScreen extends StatefulWidget {
|
|||||||
// A widget that displays the picture taken by the user.
|
// A widget that displays the picture taken by the user.
|
||||||
class DisplayPictureScreenState extends State<DisplayPictureScreen>
|
class DisplayPictureScreenState extends State<DisplayPictureScreen>
|
||||||
with ShowDescImageAdd, ShowAlertDialog, TickerProviderStateMixin {
|
with ShowDescImageAdd, ShowAlertDialog, TickerProviderStateMixin {
|
||||||
BannerAd? _bannerAd;
|
|
||||||
|
|
||||||
late AnimationController controller;
|
late AnimationController controller;
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
|
||||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
|
||||||
setState(() {
|
|
||||||
_bannerAd = ad;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
controller = AnimationController(
|
controller = AnimationController(
|
||||||
/// [AnimationController]s can be created with `vsync: this` because of
|
/// [AnimationController]s can be created with `vsync: this` because of
|
||||||
/// [TickerProviderStateMixin].
|
/// [TickerProviderStateMixin].
|
||||||
@ -82,6 +68,7 @@ class DisplayPictureScreenState extends State<DisplayPictureScreen>
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
});
|
});
|
||||||
controller.repeat(reverse: false);
|
controller.repeat(reverse: false);
|
||||||
|
super.initState();
|
||||||
|
|
||||||
_getEventInfosFromImage();
|
_getEventInfosFromImage();
|
||||||
}
|
}
|
||||||
@ -173,17 +160,12 @@ class DisplayPictureScreenState extends State<DisplayPictureScreen>
|
|||||||
// The image is stored as a file on the device. Use the `Image.file`
|
// The image is stored as a file on the device. Use the `Image.file`
|
||||||
// constructor with the given path to display the image.
|
// constructor with the given path to display the image.
|
||||||
drawer: MyDrawer(),
|
drawer: MyDrawer(),
|
||||||
|
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.all(20.0),
|
padding: const EdgeInsets.all(20.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_bannerAd == null
|
|
||||||
? SizedBox.shrink()
|
|
||||||
: SizedBox(
|
|
||||||
height: _bannerAd!.size.height.toDouble(),
|
|
||||||
width: _bannerAd!.size.width.toDouble(),
|
|
||||||
child: AdWidget(ad: _bannerAd!)),
|
|
||||||
Text(
|
Text(
|
||||||
'Analyse de l\'image en cours',
|
'Analyse de l\'image en cours',
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
|
@ -22,12 +22,7 @@ import '../classes/eventAdded.dart';
|
|||||||
|
|
||||||
import '../variable/globals.dart' as globals;
|
import '../variable/globals.dart' as globals;
|
||||||
|
|
||||||
import '../classes/ad_helper.dart';
|
void main() {
|
||||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
|
||||||
|
|
||||||
void main() async {
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
|
||||||
await MobileAds.instance.initialize();
|
|
||||||
runApp(MyApp());
|
runApp(MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +54,6 @@ class EditEvent extends StatefulWidget {
|
|||||||
|
|
||||||
class _EditEventState extends State<EditEvent>
|
class _EditEventState extends State<EditEvent>
|
||||||
with ShowAlertDialog, ShowEventDialog {
|
with ShowAlertDialog, ShowEventDialog {
|
||||||
BannerAd? _bannerAd;
|
|
||||||
TextEditingController inputName = TextEditingController();
|
TextEditingController inputName = TextEditingController();
|
||||||
|
|
||||||
TextEditingController inputDate = TextEditingController();
|
TextEditingController inputDate = TextEditingController();
|
||||||
@ -165,161 +159,177 @@ class _EditEventState extends State<EditEvent>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _updateEvent(BuildContext context) async {
|
Future<void> _updateEvent(BuildContext context) async {
|
||||||
if (!_isEventInFuture()) {
|
var name = inputName.text;
|
||||||
_showErrorDialog(context, "Erreur evenement", "Evenement non futur");
|
var place = inputGeo.text;
|
||||||
return;
|
var description = inputDesc.text;
|
||||||
}
|
List<String> tags = List<String>.from(_stringTagController.getTags as List);
|
||||||
|
List<String> organizers =
|
||||||
|
List<String>.from(_stringOrgaController.getTags as List);
|
||||||
|
|
||||||
final accessToken = await _getAccessToken();
|
var startDateFormat = formatDate(startDatepicker.text);
|
||||||
if (accessToken.isEmpty) {
|
//DateTime startDateCompare = DateTime.parse(startDateFormat);
|
||||||
_showErrorDialog(context, "Erreur utilisateur", "Champ vide");
|
DateTime dateNow = DateTime.now();
|
||||||
return;
|
var endDateFormat = formatDate(endDatepicker.text);
|
||||||
}
|
var startDate =
|
||||||
|
"${startDateFormat}T${startTimepicker.text.replaceAll('-', ':')}";
|
||||||
|
var endDate = "${endDateFormat}T${endTimepicker.text.replaceAll('-', ':')}";
|
||||||
|
DateTime startDateCompare = DateTime.parse(startDate);
|
||||||
|
if (startDateCompare.isAfter(dateNow)) {
|
||||||
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
var accessToken = prefs.getString("access_token") ?? "";
|
||||||
|
|
||||||
try {
|
if (accessToken.isNotEmpty) {
|
||||||
await dotenv.load();
|
try {
|
||||||
final geolocation = await _fetchGeolocation();
|
await dotenv.load();
|
||||||
if (geolocation == null) {
|
final ApiTokenGoogle = dotenv.env['PLACE_API_KEY'] ?? '';
|
||||||
_showErrorDialog(
|
// Searchbox API for geocoding the place (No session token)
|
||||||
context, "Erreur serveur", "Aucune donnée geographique");
|
final searchboxUrl = Uri.parse(
|
||||||
return;
|
'https://maps.googleapis.com/maps/api/place/textsearch/json?query=${place}&key=${ApiTokenGoogle}');
|
||||||
}
|
|
||||||
|
|
||||||
if (await _isDuplicateEvent(accessToken, geolocation)) {
|
// Perform the request
|
||||||
_showErrorDialog(context, "Info evenement", "Evenement deja existant");
|
final searchboxResponse = await http.get(searchboxUrl);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (widget.imgPath.isNotEmpty) {
|
if (searchboxResponse.statusCode == 200) {
|
||||||
imgUrl = await _uploadImage(widget.imgPath);
|
final data = json.decode(searchboxResponse.body);
|
||||||
if (imgUrl.isEmpty) {
|
print("data : ${data}");
|
||||||
_showErrorDialog(context, "Erreur image", "Image non postée");
|
|
||||||
return;
|
if (data['results'].isNotEmpty) {
|
||||||
|
place = data['results'][0]['formatted_address'];
|
||||||
|
final coordinates = data['results'][0]['geometry']['location'];
|
||||||
|
final longitude = coordinates["lng"]; // Longitude
|
||||||
|
final latitude = coordinates["lat"]; // Latitude
|
||||||
|
var urlGet = Uri.parse(
|
||||||
|
"${globals.api}/events/search?item=${name}&date_event=${startDate}&min_lat=$latitude&max_lat=$latitude"
|
||||||
|
"&min_lon=$longitude&max_lon=$longitude");
|
||||||
|
|
||||||
|
var responseGet = await http.get(urlGet, headers: {
|
||||||
|
HttpHeaders.cookieHeader: 'access_token=${accessToken}'
|
||||||
|
});
|
||||||
|
if (responseGet.statusCode == 200) {
|
||||||
|
var events = jsonDecode(utf8.decode(responseGet.bodyBytes));
|
||||||
|
if (events.length > 0) {
|
||||||
|
if (events[0]["id"] != widget.events!.id) {
|
||||||
|
showAlertDialog(
|
||||||
|
context, "Info evenement", "Evenement deja existant");
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (widget.imgPath.isNotEmpty) {
|
||||||
|
final params = {
|
||||||
|
'expiration': '15552000',
|
||||||
|
'key': dotenv.env["IMGBB_API_KEY"],
|
||||||
|
};
|
||||||
|
print("Post Img");
|
||||||
|
final urlPost = Uri.parse('https://api.imgbb.com/1/upload')
|
||||||
|
.replace(queryParameters: params);
|
||||||
|
File image = File(widget.imgPath);
|
||||||
|
Uint8List _bytes = await image.readAsBytes();
|
||||||
|
String _base64String = base64.encode(_bytes);
|
||||||
|
|
||||||
|
final req = http.MultipartRequest('POST', urlPost)
|
||||||
|
..fields['image'] = _base64String;
|
||||||
|
|
||||||
|
final stream = await req.send();
|
||||||
|
final res = await http.Response.fromStream(stream);
|
||||||
|
|
||||||
|
final status = res.statusCode;
|
||||||
|
print("code status imgbb ${status}");
|
||||||
|
if (status != 200) {
|
||||||
|
showAlertDialog(context, "Erreur image", "Image non posté");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var body = json.decode(utf8.decode(res.bodyBytes));
|
||||||
|
imgUrl = body["data"]["url"];
|
||||||
|
}
|
||||||
|
var urlPut =
|
||||||
|
Uri.parse("${globals.api}/events/${widget.events!.id}");
|
||||||
|
var responsePut = await http.put(urlPut,
|
||||||
|
headers: {
|
||||||
|
HttpHeaders.cookieHeader: 'access_token=${accessToken}',
|
||||||
|
HttpHeaders.acceptHeader:
|
||||||
|
'application/json, text/plain, */*',
|
||||||
|
HttpHeaders.contentTypeHeader: 'application/json'
|
||||||
|
},
|
||||||
|
body: jsonEncode({
|
||||||
|
'name': name,
|
||||||
|
'place': place,
|
||||||
|
'start_date': startDate,
|
||||||
|
'end_date': endDate,
|
||||||
|
'organizers': organizers,
|
||||||
|
'latitude': latitude,
|
||||||
|
'longitude': longitude,
|
||||||
|
'description': description,
|
||||||
|
"imgUrl": imgUrl,
|
||||||
|
"tags": tags
|
||||||
|
}));
|
||||||
|
print(responsePut.statusCode);
|
||||||
|
if ((responsePut.statusCode == 200) ||
|
||||||
|
(responsePut.statusCode == 201)) {
|
||||||
|
showEventDialog(context, "Evenement ${name} modifie");
|
||||||
|
} else {
|
||||||
|
var text = "";
|
||||||
|
switch (responsePut.statusCode) {
|
||||||
|
case 400:
|
||||||
|
{
|
||||||
|
text = "Requête mal construite";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 406:
|
||||||
|
{
|
||||||
|
text = "Mot de passe incorrect";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 404:
|
||||||
|
{
|
||||||
|
text = "Utilisateur inconnu";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 403:
|
||||||
|
{
|
||||||
|
text = "Utilisateur desactive";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 410:
|
||||||
|
{
|
||||||
|
text = "Token invalide";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 500:
|
||||||
|
{
|
||||||
|
text = "Probleme interne du serveur";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
text = "Probleme d'authentification inconnu";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
showAlertDialog(context, "Erreur serveur", text);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
showAlertDialog(
|
||||||
|
context, "Erreur serveur", "Aucune donnée geographique");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
showAlertDialog(context, "Erreur serveur", "Mapbox non accessible");
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
showAlertDialog(context, "Erreur serveur", "${e}");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
showAlertDialog(context, "Erreur utilisateur", "Champ vide");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
await _updateEventData(accessToken, geolocation);
|
showAlertDialog(context, "Erreur evenement", "Evenement non futur");
|
||||||
showEventDialog(context, "Evenement ${inputName.text} modifie");
|
|
||||||
} catch (e) {
|
|
||||||
_showErrorDialog(context, "Erreur serveur", "$e");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _isEventInFuture() {
|
|
||||||
DateTime startDateCompare = DateTime.parse(
|
|
||||||
"${formatDate(startDatepicker.text)}T${startTimepicker.text.replaceAll('-', ':')}");
|
|
||||||
return startDateCompare.isAfter(DateTime.now());
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<String> _getAccessToken() async {
|
|
||||||
final prefs = await SharedPreferences.getInstance();
|
|
||||||
return prefs.getString("access_token") ?? "";
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<Map<String, dynamic>?> _fetchGeolocation() async {
|
|
||||||
final apiKey = dotenv.env['PLACE_API_KEY'] ?? '';
|
|
||||||
final response = await http.get(Uri.parse(
|
|
||||||
'https://maps.googleapis.com/maps/api/place/textsearch/json?query=${inputGeo.text}&key=$apiKey'));
|
|
||||||
|
|
||||||
if (response.statusCode == 200) {
|
|
||||||
final data = json.decode(response.body);
|
|
||||||
if (data['results'].isNotEmpty) {
|
|
||||||
return data['results'][0]['geometry']['location'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<bool> _isDuplicateEvent(
|
|
||||||
String accessToken, Map<String, dynamic> location) async {
|
|
||||||
final url = Uri.parse(
|
|
||||||
"${globals.api}/events/search?item=${inputName.text}&date_event=${formatDate(startDatepicker.text)}"
|
|
||||||
"&min_lat=${location['lat']}&max_lat=${location['lat']}"
|
|
||||||
"&min_lon=${location['lng']}&max_lon=${location['lng']}");
|
|
||||||
|
|
||||||
final response = await http.get(url,
|
|
||||||
headers: {HttpHeaders.cookieHeader: 'access_token=$accessToken'});
|
|
||||||
|
|
||||||
if (response.statusCode == 200) {
|
|
||||||
final events = jsonDecode(utf8.decode(response.bodyBytes));
|
|
||||||
return events.isNotEmpty && events[0]["id"] != widget.events!.id;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<String> _uploadImage(String imagePath) async {
|
|
||||||
final params = {
|
|
||||||
'expiration': '15552000',
|
|
||||||
'key': dotenv.env["IMGBB_API_KEY"]
|
|
||||||
};
|
|
||||||
final url = Uri.parse('https://api.imgbb.com/1/upload')
|
|
||||||
.replace(queryParameters: params);
|
|
||||||
|
|
||||||
final image = File(imagePath);
|
|
||||||
final req = http.MultipartRequest('POST', url)
|
|
||||||
..fields['image'] = base64.encode(await image.readAsBytes());
|
|
||||||
|
|
||||||
final response = await http.Response.fromStream(await req.send());
|
|
||||||
return response.statusCode == 200
|
|
||||||
? json.decode(response.body)["data"]["url"]
|
|
||||||
: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _updateEventData(
|
|
||||||
String accessToken, Map<String, dynamic> location) async {
|
|
||||||
final url = Uri.parse("${globals.api}/events/${widget.events!.id}");
|
|
||||||
final response = await http.put(url,
|
|
||||||
headers: {
|
|
||||||
HttpHeaders.cookieHeader: 'access_token=$accessToken',
|
|
||||||
HttpHeaders.acceptHeader: 'application/json, text/plain, */*',
|
|
||||||
HttpHeaders.contentTypeHeader: 'application/json'
|
|
||||||
},
|
|
||||||
body: jsonEncode({
|
|
||||||
'name': inputName.text,
|
|
||||||
'place': inputGeo.text,
|
|
||||||
'start_date':
|
|
||||||
"${formatDate(startDatepicker.text)}T${startTimepicker.text.replaceAll('-', ':')}",
|
|
||||||
'end_date':
|
|
||||||
"${formatDate(endDatepicker.text)}T${endTimepicker.text.replaceAll('-', ':')}",
|
|
||||||
'organizers':
|
|
||||||
List<String>.from(_stringOrgaController.getTags as List),
|
|
||||||
'latitude': location['lat'],
|
|
||||||
'longitude': location['lng'],
|
|
||||||
'description': inputDesc.text,
|
|
||||||
"imgUrl": imgUrl,
|
|
||||||
"tags": List<String>.from(_stringTagController.getTags as List)
|
|
||||||
}));
|
|
||||||
|
|
||||||
if (response.statusCode != 200 && response.statusCode != 201) {
|
|
||||||
_handleErrorResponse(context, response.statusCode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _handleErrorResponse(BuildContext context, int statusCode) {
|
|
||||||
final messages = {
|
|
||||||
400: "Requête mal construite",
|
|
||||||
406: "Mot de passe incorrect",
|
|
||||||
404: "Utilisateur inconnu",
|
|
||||||
403: "Utilisateur désactivé",
|
|
||||||
410: "Token invalide",
|
|
||||||
500: "Problème interne du serveur"
|
|
||||||
};
|
|
||||||
_showErrorDialog(context, "Erreur serveur",
|
|
||||||
messages[statusCode] ?? "Problème d'authentification inconnu");
|
|
||||||
}
|
|
||||||
|
|
||||||
void _showErrorDialog(BuildContext context, String title, String message) {
|
|
||||||
showAlertDialog(context, title, message);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
|
||||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
|
||||||
setState(() {
|
|
||||||
_bannerAd = ad;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
inputName.text = widget.events!.name ?? "";
|
inputName.text = widget.events!.name ?? "";
|
||||||
startDatepicker.text = DateFormat("dd/MM/yyyy")
|
startDatepicker.text = DateFormat("dd/MM/yyyy")
|
||||||
.format(DateTime.parse(
|
.format(DateTime.parse(
|
||||||
@ -343,6 +353,7 @@ class _EditEventState extends State<EditEvent>
|
|||||||
inputDesc.text = widget.events!.description ?? "";
|
inputDesc.text = widget.events!.description ?? "";
|
||||||
initialTags = List<String>.from(widget.events!.tags as List);
|
initialTags = List<String>.from(widget.events!.tags as List);
|
||||||
initialOrga = List<String>.from(widget.events!.organizers as List);
|
initialOrga = List<String>.from(widget.events!.organizers as List);
|
||||||
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
final _formKey = GlobalKey<FormState>();
|
final _formKey = GlobalKey<FormState>();
|
||||||
@ -456,6 +467,7 @@ class _EditEventState extends State<EditEvent>
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
drawer: MyDrawer(),
|
drawer: MyDrawer(),
|
||||||
|
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: Text("Add or Update a event"),
|
title: Text("Add or Update a event"),
|
||||||
backgroundColor: Colors.blue,
|
backgroundColor: Colors.blue,
|
||||||
@ -466,12 +478,6 @@ class _EditEventState extends State<EditEvent>
|
|||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_bannerAd == null
|
|
||||||
? SizedBox.shrink()
|
|
||||||
: SizedBox(
|
|
||||||
height: _bannerAd!.size.height.toDouble(),
|
|
||||||
width: _bannerAd!.size.width.toDouble(),
|
|
||||||
child: AdWidget(ad: _bannerAd!)),
|
|
||||||
if (widget.imgPath.isNotEmpty)
|
if (widget.imgPath.isNotEmpty)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 60.0),
|
padding: const EdgeInsets.only(top: 60.0),
|
||||||
|
@ -15,12 +15,7 @@ import '../classes/eventAdded.dart';
|
|||||||
|
|
||||||
import '../variable/globals.dart' as globals;
|
import '../variable/globals.dart' as globals;
|
||||||
|
|
||||||
import '../classes/ad_helper.dart';
|
void main() {
|
||||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
|
||||||
|
|
||||||
void main() async {
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
|
||||||
await MobileAds.instance.initialize();
|
|
||||||
runApp(MyApp());
|
runApp(MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +38,6 @@ class EditProfile extends StatefulWidget {
|
|||||||
|
|
||||||
class _EditProfileState extends State<EditProfile>
|
class _EditProfileState extends State<EditProfile>
|
||||||
with ShowAlertDialog, ShowEventDialog {
|
with ShowAlertDialog, ShowEventDialog {
|
||||||
BannerAd? _bannerAd;
|
|
||||||
TextEditingController inputUserName = TextEditingController();
|
TextEditingController inputUserName = TextEditingController();
|
||||||
|
|
||||||
TextEditingController inputName = TextEditingController();
|
TextEditingController inputName = TextEditingController();
|
||||||
@ -198,11 +192,6 @@ class _EditProfileState extends State<EditProfile>
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
|
||||||
setState(() {
|
|
||||||
_bannerAd = ad;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
_getInfoProfile();
|
_getInfoProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,12 +215,6 @@ class _EditProfileState extends State<EditProfile>
|
|||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_bannerAd == null
|
|
||||||
? SizedBox.shrink()
|
|
||||||
: SizedBox(
|
|
||||||
height: _bannerAd!.size.height.toDouble(),
|
|
||||||
width: _bannerAd!.size.width.toDouble(),
|
|
||||||
child: AdWidget(ad: _bannerAd!)),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
left: 15.0, right: 15.0, top: 15, bottom: 0),
|
left: 15.0, right: 15.0, top: 15, bottom: 0),
|
||||||
|
@ -10,12 +10,7 @@ import '../classes/MyDrawer.dart';
|
|||||||
import '../classes/alert.dart';
|
import '../classes/alert.dart';
|
||||||
import '../classes/eventAdded.dart';
|
import '../classes/eventAdded.dart';
|
||||||
|
|
||||||
import '../classes/ad_helper.dart';
|
void main() {
|
||||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
|
||||||
|
|
||||||
void main() async {
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
|
||||||
await MobileAds.instance.initialize();
|
|
||||||
runApp(MyApp());
|
runApp(MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +33,6 @@ class EditSettings extends StatefulWidget {
|
|||||||
|
|
||||||
class _EditProfileState extends State<EditSettings>
|
class _EditProfileState extends State<EditSettings>
|
||||||
with ShowAlertDialog, ShowEventDialog {
|
with ShowAlertDialog, ShowEventDialog {
|
||||||
BannerAd? _bannerAd;
|
|
||||||
TextEditingController inputUserName = TextEditingController();
|
TextEditingController inputUserName = TextEditingController();
|
||||||
int? kilometer;
|
int? kilometer;
|
||||||
|
|
||||||
@ -60,11 +54,6 @@ class _EditProfileState extends State<EditSettings>
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
|
||||||
setState(() {
|
|
||||||
_bannerAd = ad;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
getParameter();
|
getParameter();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,12 +71,6 @@ class _EditProfileState extends State<EditSettings>
|
|||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_bannerAd == null
|
|
||||||
? SizedBox.shrink()
|
|
||||||
: SizedBox(
|
|
||||||
height: _bannerAd!.size.height.toDouble(),
|
|
||||||
width: _bannerAd!.size.width.toDouble(),
|
|
||||||
child: AdWidget(ad: _bannerAd!)),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
left: 15.0,
|
left: 15.0,
|
||||||
@ -142,7 +125,7 @@ class _EditProfileState extends State<EditSettings>
|
|||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
child: Text(
|
child: Text(
|
||||||
'Mettre à jour',
|
'Mettre à jour les paramètres',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 25),
|
style: TextStyle(color: Colors.white, fontSize: 25),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -21,12 +21,7 @@ import 'MapboxPages.dart';
|
|||||||
import 'ListItemByOrganizers.dart';
|
import 'ListItemByOrganizers.dart';
|
||||||
import 'EditEvent.dart';
|
import 'EditEvent.dart';
|
||||||
|
|
||||||
import '../classes/ad_helper.dart';
|
void main() {
|
||||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
|
||||||
|
|
||||||
void main() async {
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
|
||||||
await MobileAds.instance.initialize();
|
|
||||||
initializeDateFormatting("fr_FR", null).then((_) => (const MyApp()));
|
initializeDateFormatting("fr_FR", null).then((_) => (const MyApp()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,8 +69,6 @@ class ItemMenu extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _ItemMenuState extends State<ItemMenu> with ShowAlertDialog {
|
class _ItemMenuState extends State<ItemMenu> with ShowAlertDialog {
|
||||||
BannerAd? _bannerAd;
|
|
||||||
|
|
||||||
String listUser = "";
|
String listUser = "";
|
||||||
String eventName = "";
|
String eventName = "";
|
||||||
String eventStartDate = "";
|
String eventStartDate = "";
|
||||||
@ -91,11 +84,6 @@ class _ItemMenuState extends State<ItemMenu> with ShowAlertDialog {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
|
||||||
setState(() {
|
|
||||||
_bannerAd = ad;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
_getEventInfos();
|
_getEventInfos();
|
||||||
}
|
}
|
||||||
@ -186,12 +174,6 @@ class _ItemMenuState extends State<ItemMenu> with ShowAlertDialog {
|
|||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_bannerAd == null
|
|
||||||
? SizedBox.shrink()
|
|
||||||
: SizedBox(
|
|
||||||
height: _bannerAd!.size.height.toDouble(),
|
|
||||||
width: _bannerAd!.size.width.toDouble(),
|
|
||||||
child: AdWidget(ad: _bannerAd!)),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 60.0),
|
padding: const EdgeInsets.only(top: 60.0),
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
|
@ -16,12 +16,7 @@ import 'package:permission_handler/permission_handler.dart';
|
|||||||
import "Camera.dart";
|
import "Camera.dart";
|
||||||
import 'package:camera/camera.dart';
|
import 'package:camera/camera.dart';
|
||||||
|
|
||||||
import '../classes/ad_helper.dart';
|
void main() {
|
||||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
|
||||||
|
|
||||||
void main() async {
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
|
||||||
await MobileAds.instance.initialize();
|
|
||||||
initializeDateFormatting("fr_FR", null).then((_) => runApp(const MyApp()));
|
initializeDateFormatting("fr_FR", null).then((_) => runApp(const MyApp()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,8 +40,6 @@ class ListItemMenu extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _MyHomePageState extends State<ListItemMenu> {
|
class _MyHomePageState extends State<ListItemMenu> {
|
||||||
BannerAd? _bannerAd;
|
|
||||||
|
|
||||||
Future<List<Events>> postsFuture = getPosts();
|
Future<List<Events>> postsFuture = getPosts();
|
||||||
List<Events> filteredPosts = [];
|
List<Events> filteredPosts = [];
|
||||||
String geographicalZone = '';
|
String geographicalZone = '';
|
||||||
@ -145,11 +138,6 @@ class _MyHomePageState extends State<ListItemMenu> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
|
||||||
setState(() {
|
|
||||||
_bannerAd = ad;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
// Initialize data fetch when the page loads
|
// Initialize data fetch when the page loads
|
||||||
_getCurrentLocation();
|
_getCurrentLocation();
|
||||||
}
|
}
|
||||||
@ -555,13 +543,6 @@ class _MyHomePageState extends State<ListItemMenu> {
|
|||||||
drawer: MyDrawer(),
|
drawer: MyDrawer(),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
_bannerAd == null
|
|
||||||
? SizedBox.shrink()
|
|
||||||
: SizedBox(
|
|
||||||
height: _bannerAd!.size.height.toDouble(),
|
|
||||||
width: _bannerAd!.size.width.toDouble(),
|
|
||||||
child: AdWidget(ad: _bannerAd!),
|
|
||||||
),
|
|
||||||
if (showInputSearch)
|
if (showInputSearch)
|
||||||
_buildSearchField(
|
_buildSearchField(
|
||||||
controller: inputItem,
|
controller: inputItem,
|
||||||
|
@ -16,12 +16,7 @@ import '../classes/eventAdded.dart';
|
|||||||
|
|
||||||
import '../variable/globals.dart' as globals;
|
import '../variable/globals.dart' as globals;
|
||||||
|
|
||||||
import '../classes/ad_helper.dart';
|
void main() {
|
||||||
import 'package:google_mobile_ads/google_mobile_ads.dart';
|
|
||||||
|
|
||||||
void main() async {
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
|
||||||
await MobileAds.instance.initialize();
|
|
||||||
runApp(MyApp());
|
runApp(MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,8 +45,6 @@ class UpdateeventImage extends StatefulWidget {
|
|||||||
|
|
||||||
class _UpdateeventImageState extends State<UpdateeventImage>
|
class _UpdateeventImageState extends State<UpdateeventImage>
|
||||||
with ShowAlertDialog, ShowEventDialog {
|
with ShowAlertDialog, ShowEventDialog {
|
||||||
BannerAd? _bannerAd;
|
|
||||||
|
|
||||||
TextEditingController inputName = TextEditingController();
|
TextEditingController inputName = TextEditingController();
|
||||||
|
|
||||||
TextEditingController inputDate = TextEditingController();
|
TextEditingController inputDate = TextEditingController();
|
||||||
@ -315,13 +308,8 @@ class _UpdateeventImageState extends State<UpdateeventImage>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
|
||||||
AdHelper.createBannerAd(() => setState(() {})).then((ad) {
|
|
||||||
setState(() {
|
|
||||||
_bannerAd = ad;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
start();
|
start();
|
||||||
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
final _formKey = GlobalKey<FormState>();
|
final _formKey = GlobalKey<FormState>();
|
||||||
@ -438,12 +426,6 @@ class _UpdateeventImageState extends State<UpdateeventImage>
|
|||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
_bannerAd == null
|
|
||||||
? SizedBox.shrink()
|
|
||||||
: SizedBox(
|
|
||||||
height: _bannerAd!.size.height.toDouble(),
|
|
||||||
width: _bannerAd!.size.width.toDouble(),
|
|
||||||
child: AdWidget(ad: _bannerAd!)),
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 60.0),
|
padding: const EdgeInsets.only(top: 60.0),
|
||||||
child: Center(
|
child: Center(
|
||||||
|
@ -10,7 +10,6 @@ import geolocator_apple
|
|||||||
import path_provider_foundation
|
import path_provider_foundation
|
||||||
import shared_preferences_foundation
|
import shared_preferences_foundation
|
||||||
import url_launcher_macos
|
import url_launcher_macos
|
||||||
import webview_flutter_wkwebview
|
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
|
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
|
||||||
@ -18,5 +17,4 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||||
WebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "WebViewFlutterPlugin"))
|
|
||||||
}
|
}
|
||||||
|
@ -304,14 +304,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.3"
|
version: "0.2.3"
|
||||||
google_mobile_ads:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: google_mobile_ads
|
|
||||||
sha256: "0d4a3744b5e8ed1b8be6a1b452d309f811688855a497c6113fc4400f922db603"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "5.3.1"
|
|
||||||
http:
|
http:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -885,38 +877,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
webview_flutter:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: webview_flutter
|
|
||||||
sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "4.10.0"
|
|
||||||
webview_flutter_android:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: webview_flutter_android
|
|
||||||
sha256: "512c26ccc5b8a571fd5d13ec994b7509f142ff6faf85835e243dde3538fdc713"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "4.3.2"
|
|
||||||
webview_flutter_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: webview_flutter_platform_interface
|
|
||||||
sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.10.0"
|
|
||||||
webview_flutter_wkwebview:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: webview_flutter_wkwebview
|
|
||||||
sha256: "7310de7efa4e6df8b3d2ff14aef3f290bc00b43363f2d0028845e6de46507fc9"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.18.1"
|
|
||||||
xdg_directories:
|
xdg_directories:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -50,7 +50,6 @@ dependencies:
|
|||||||
permission_handler: ^11.3.1
|
permission_handler: ^11.3.1
|
||||||
url_launcher: ^6.3.1
|
url_launcher: ^6.3.1
|
||||||
mapbox_gl: ^0.16.0
|
mapbox_gl: ^0.16.0
|
||||||
google_mobile_ads: ^5.3.1
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user