Merge branch 'Test-web'
# Conflicts: # lib/main.dart
This commit is contained in:
commit
0598e8bf46
@ -48,7 +48,7 @@ class _ImageInputContainerState extends State<ImageInputContainer> {
|
|||||||
child: Text(widget.label, style: TextStyle(fontSize: 25, fontWeight: FontWeight.w300))
|
child: Text(widget.label, style: TextStyle(fontSize: 25, fontWeight: FontWeight.w300))
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: widget.isSmall ? 15 : 50, top: 10, bottom: 10),
|
padding: EdgeInsets.only(left: widget.isSmall ? 15 : 70, top: 10, bottom: 10),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: size.width *0.08,
|
width: size.width *0.08,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
@ -85,7 +85,7 @@ class _ImageInputContainerState extends State<ImageInputContainer> {
|
|||||||
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
return Transform.scale(
|
return Transform.scale(
|
||||||
scale: isSmall ? size.aspectRatio * 0.5: size.aspectRatio,
|
scale: isSmall ? size.aspectRatio * 0.5: size.aspectRatio * 0.9,
|
||||||
child: AspectRatio(
|
child: AspectRatio(
|
||||||
aspectRatio: 4/4,
|
aspectRatio: 4/4,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|||||||
@ -1,17 +1,20 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:manager_app/Components/upload_image_container.dart';
|
||||||
import 'package:manager_app/Components/upload_online_resources_container.dart';
|
import 'package:manager_app/Components/upload_online_resources_container.dart';
|
||||||
import 'file:///C:/Users/Thomas%20Fransolet/Documents/Documents/Perso/MuseeDeLaFraise/manager-app/lib/Components/upload_image_container.dart';
|
|
||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
import 'package:managerapi/api.dart';
|
import 'package:managerapi/api.dart';
|
||||||
class ResourceTab extends StatefulWidget {
|
class ResourceTab extends StatefulWidget {
|
||||||
final ResourceDTO resourceDTO;
|
final ResourceDTO resourceDTO;
|
||||||
final Function onFileUpload;
|
final Function onFileUpload;
|
||||||
|
final Function onFileUploadWeb;
|
||||||
const ResourceTab({
|
const ResourceTab({
|
||||||
Key key,
|
Key key,
|
||||||
this.resourceDTO,
|
this.resourceDTO,
|
||||||
this.onFileUpload,
|
this.onFileUpload,
|
||||||
|
this.onFileUploadWeb,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -51,7 +54,7 @@ class _ResourceTabState extends State<ResourceTab> with SingleTickerProviderStat
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TabBarView(
|
child: TabBarView(
|
||||||
children: getContent(widget.resourceDTO, widget.onFileUpload),
|
children: getContent(widget.resourceDTO, widget.onFileUpload, widget.onFileUploadWeb),
|
||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -85,7 +88,7 @@ class _ResourceTabState extends State<ResourceTab> with SingleTickerProviderStat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getContent(ResourceDTO resourceDTO, Function onFileUpload) {
|
getContent(ResourceDTO resourceDTO, Function onFileUpload, Function onFileUploadWeb) {
|
||||||
List<Widget> tabsToShow = new List<Widget>();
|
List<Widget> tabsToShow = new List<Widget>();
|
||||||
|
|
||||||
// Local Image
|
// Local Image
|
||||||
@ -93,10 +96,14 @@ getContent(ResourceDTO resourceDTO, Function onFileUpload) {
|
|||||||
new Padding(
|
new Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
|
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 16),
|
||||||
child: UploadImageContainer(
|
child: UploadImageContainer(
|
||||||
onChanged: (File file) {
|
onChanged: (List<File> files) {
|
||||||
onFileUpload(file);
|
onFileUpload(files);
|
||||||
resourceDTO.type = ResourceType.image;
|
resourceDTO.type = ResourceType.image;
|
||||||
}
|
},
|
||||||
|
onChangedWeb: (List<PlatformFile> files) {
|
||||||
|
onFileUploadWeb(files);
|
||||||
|
resourceDTO.type = ResourceType.image;
|
||||||
|
},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,15 +1,18 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:dart_vlc/dart_vlc.dart';
|
import 'dart:typed_data';
|
||||||
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:manager_app/Components/loading.dart';
|
import 'package:manager_app/Components/loading.dart';
|
||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
import 'package:filepicker_windows/filepicker_windows.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
class UploadImageContainer extends StatefulWidget {
|
class UploadImageContainer extends StatefulWidget {
|
||||||
final ValueChanged<File> onChanged;
|
final ValueChanged<List<File>> onChanged;
|
||||||
|
final ValueChanged<List<PlatformFile>> onChangedWeb;
|
||||||
const UploadImageContainer({
|
const UploadImageContainer({
|
||||||
Key key,
|
Key key,
|
||||||
this.onChanged,
|
this.onChanged,
|
||||||
|
this.onChangedWeb,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -19,6 +22,7 @@ class UploadImageContainer extends StatefulWidget {
|
|||||||
class _UploadImageContainerState extends State<UploadImageContainer> with SingleTickerProviderStateMixin {
|
class _UploadImageContainerState extends State<UploadImageContainer> with SingleTickerProviderStateMixin {
|
||||||
var filePath;
|
var filePath;
|
||||||
File fileToShow;
|
File fileToShow;
|
||||||
|
String fileToShowWeb;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -39,8 +43,42 @@ class _UploadImageContainerState extends State<UploadImageContainer> with Single
|
|||||||
return (filePath.toString().split('\\').last);
|
return (filePath.toString().split('\\').last);
|
||||||
}
|
}
|
||||||
|
|
||||||
void filePicker() {
|
Future<void> filePicker() async {
|
||||||
final file = OpenFilePicker()
|
FilePickerResult result;
|
||||||
|
if (kIsWeb) {
|
||||||
|
result = await FilePicker.platform.pickFiles(
|
||||||
|
type: FileType.custom,
|
||||||
|
dialogTitle: 'Sélectionner un fichier',
|
||||||
|
allowMultiple: true,
|
||||||
|
allowedExtensions: ['jpg', 'jpeg', 'png'],
|
||||||
|
);
|
||||||
|
|
||||||
|
if (result != null) {
|
||||||
|
List<PlatformFile> files = result.files;
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
filePath = "Fichiers"; // Only show one picture
|
||||||
|
fileToShowWeb = "Aucun aperçu possible"; // Only show one picture
|
||||||
|
widget.onChangedWeb(files);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
result = await FilePicker.platform.pickFiles(
|
||||||
|
type: FileType.custom,
|
||||||
|
dialogTitle: 'Sélectionner un fichier',
|
||||||
|
allowMultiple: true,
|
||||||
|
allowedExtensions: ['jpg', 'jpeg', 'png'],
|
||||||
|
);
|
||||||
|
|
||||||
|
List<File> files = result.paths.map((path) => File(path)).toList();
|
||||||
|
var file = files[0];
|
||||||
|
setState(() {
|
||||||
|
filePath = file.path; // Only show one picture
|
||||||
|
fileToShow = file; // Only show one picture
|
||||||
|
widget.onChanged(files);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/*final file = OpenFilePicker()
|
||||||
..filterSpecification = {
|
..filterSpecification = {
|
||||||
'Images (*.jpg; *.jpeg;*.png)': '*.jpg;*.jpeg;*.png',
|
'Images (*.jpg; *.jpeg;*.png)': '*.jpg;*.jpeg;*.png',
|
||||||
//'Video (*.mp4)': '*.mp4',
|
//'Video (*.mp4)': '*.mp4',
|
||||||
@ -58,13 +96,12 @@ class _UploadImageContainerState extends State<UploadImageContainer> with Single
|
|||||||
fileToShow = result;
|
fileToShow = result;
|
||||||
widget.onChanged(result);
|
widget.onChanged(result);
|
||||||
});
|
});
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
showFile() {
|
showFile() {
|
||||||
if (getFileName(filePath).contains(".mp4")) {
|
if (getFileName(filePath).contains(".mp4")) {
|
||||||
|
/*return FutureBuilder(
|
||||||
return FutureBuilder(
|
|
||||||
future: loadFile(fileToShow),
|
future: loadFile(fileToShow),
|
||||||
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
builder: (context, AsyncSnapshot<dynamic> snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
@ -96,11 +133,10 @@ class _UploadImageContainerState extends State<UploadImageContainer> with Single
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);*/
|
||||||
|
} else {
|
||||||
|
if (kIsWeb) {
|
||||||
|
return null;
|
||||||
/*await Media.file(widget.file)*/
|
|
||||||
} else {
|
} else {
|
||||||
return Image.file(
|
return Image.file(
|
||||||
fileToShow,
|
fileToShow,
|
||||||
@ -109,13 +145,15 @@ class _UploadImageContainerState extends State<UploadImageContainer> with Single
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
loadFile(File fileToShow) async {
|
loadFile(File fileToShow) async {
|
||||||
return await Media.file(fileToShow);
|
//return await Media.file(fileToShow);
|
||||||
|
return null; // Useless no mp4 for now
|
||||||
}
|
}
|
||||||
|
|
||||||
displayElement() {
|
displayElement() {
|
||||||
if (fileToShow == null) return Center(
|
if (fileToShow == null && fileToShowWeb == null) return Center(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
filePicker();
|
filePicker();
|
||||||
@ -128,14 +166,14 @@ class _UploadImageContainerState extends State<UploadImageContainer> with Single
|
|||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(left: 25.0, right: 25.0, top: 15.0, bottom: 15.0),
|
padding: const EdgeInsets.only(left: 25.0, right: 25.0, top: 15.0, bottom: 15.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
"Ajouter un fichier",
|
"Ajouter un ou plusieurs fichiers",
|
||||||
style: new TextStyle(color: kWhite),
|
style: new TextStyle(color: kWhite),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (fileToShow != null)
|
if (fileToShow != null || fileToShowWeb != null)
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.all(8.0),
|
margin: EdgeInsets.all(8.0),
|
||||||
child: Card(
|
child: Card(
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:dart_vlc/dart_vlc.dart';
|
//import 'package:dart_vlc/dart_vlc.dart';
|
||||||
|
/*
|
||||||
class DartVLC extends StatefulWidget {
|
class DartVLC extends StatefulWidget {
|
||||||
final Media file;
|
final Media file;
|
||||||
const DartVLC({
|
const DartVLC({
|
||||||
@ -735,3 +735,4 @@ class _DartVLCState extends State<DartVLC> {
|
|||||||
);*/
|
);*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import 'package:manager_app/Models/session.dart';
|
|||||||
import 'package:manager_app/client.dart';
|
import 'package:manager_app/client.dart';
|
||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
import 'package:managerapi/api.dart';
|
import 'package:managerapi/api.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
//import 'package:path_provider/path_provider.dart';
|
||||||
|
|
||||||
class FileHelper {
|
class FileHelper {
|
||||||
final key = Key.fromUtf8('aVs:ZMe3EK-yS<y:;k>vCGrj3T8]yG6E');
|
final key = Key.fromUtf8('aVs:ZMe3EK-yS<y:;k>vCGrj3T8]yG6E');
|
||||||
@ -15,8 +15,8 @@ class FileHelper {
|
|||||||
|
|
||||||
|
|
||||||
Future<String> get _localPath async {
|
Future<String> get _localPath async {
|
||||||
final directory = await getApplicationDocumentsDirectory();
|
//final directory = await getApplicationDocumentsDirectory();
|
||||||
|
var directory;
|
||||||
return directory.path;
|
return directory.path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import 'package:auto_size_text/auto_size_text.dart';
|
import 'package:auto_size_text/auto_size_text.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'file:///C:/Users/Thomas%20Fransolet/Documents/Documents/Perso/MuseeDeLaFraise/manager-app/lib/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart';
|
import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart';
|
||||||
import 'package:manager_app/app_context.dart';
|
import 'package:manager_app/app_context.dart';
|
||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
import 'package:managerapi/api.dart';
|
import 'package:managerapi/api.dart';
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'file:///C:/Users/Thomas%20Fransolet/Documents/Documents/Perso/MuseeDeLaFraise/manager-app/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart';
|
import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart';
|
||||||
import 'file:///C:/Users/Thomas%20Fransolet/Documents/Documents/Perso/MuseeDeLaFraise/manager-app/lib/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart';
|
import 'package:manager_app/Screens/Configurations/Section/SubSection/Slider/new_update_image_slider.dart';
|
||||||
import 'package:manager_app/app_context.dart';
|
import 'package:manager_app/app_context.dart';
|
||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
import 'package:managerapi/api.dart';
|
import 'package:managerapi/api.dart';
|
||||||
|
|||||||
@ -8,8 +8,7 @@ import 'package:manager_app/Components/multi_string_input_container.dart';
|
|||||||
import 'package:manager_app/Components/rounded_button.dart';
|
import 'package:manager_app/Components/rounded_button.dart';
|
||||||
import 'package:manager_app/Components/string_input_container.dart';
|
import 'package:manager_app/Components/string_input_container.dart';
|
||||||
import 'package:manager_app/Models/managerContext.dart';
|
import 'package:manager_app/Models/managerContext.dart';
|
||||||
import 'file:///C:/Users/Thomas%20Fransolet/Documents/Documents/Perso/MuseeDeLaFraise/manager-app/lib/Screens/Configurations/Section/SubSection/Slider/slider_config.dart';
|
import 'package:manager_app/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart';
|
||||||
import 'file:///C:/Users/Thomas%20Fransolet/Documents/Documents/Perso/MuseeDeLaFraise/manager-app/lib/Screens/Configurations/Section/SubSection/WebOrVideo/web_video_config.dart';
|
|
||||||
import 'package:manager_app/app_context.dart';
|
import 'package:manager_app/app_context.dart';
|
||||||
import 'package:manager_app/client.dart';
|
import 'package:manager_app/client.dart';
|
||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
@ -19,6 +18,7 @@ import 'package:intl/intl.dart';
|
|||||||
|
|
||||||
import 'SubSection/Map/map_config.dart';
|
import 'SubSection/Map/map_config.dart';
|
||||||
import 'SubSection/Menu/menu_config.dart';
|
import 'SubSection/Menu/menu_config.dart';
|
||||||
|
import 'SubSection/Slider/slider_config.dart';
|
||||||
|
|
||||||
class SectionDetailScreen extends StatefulWidget {
|
class SectionDetailScreen extends StatefulWidget {
|
||||||
final String id;
|
final String id;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import 'package:filepicker_windows/filepicker_windows.dart';
|
//import 'package:filepicker_windows/filepicker_windows.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:manager_app/Components/message_notification.dart';
|
import 'package:manager_app/Components/message_notification.dart';
|
||||||
import 'package:manager_app/Components/rounded_button.dart';
|
import 'package:manager_app/Components/rounded_button.dart';
|
||||||
@ -106,7 +106,7 @@ void showNewConfiguration(AppContext appContext, ValueChanged<bool> isImport, Bu
|
|||||||
}
|
}
|
||||||
|
|
||||||
String filePicker() {
|
String filePicker() {
|
||||||
final file = OpenFilePicker()
|
/*final file = OpenFilePicker()
|
||||||
..filterSpecification = {
|
..filterSpecification = {
|
||||||
'Fichier (*.json)': '*.json',
|
'Fichier (*.json)': '*.json',
|
||||||
//'Video (*.mp4)': '*.mp4',
|
//'Video (*.mp4)': '*.mp4',
|
||||||
@ -115,7 +115,8 @@ String filePicker() {
|
|||||||
..defaultFilterIndex = 0
|
..defaultFilterIndex = 0
|
||||||
..title = 'Sélectionner un fichier';
|
..title = 'Sélectionner un fichier';
|
||||||
|
|
||||||
final result = file.getFile();
|
final result = file.getFile();*/
|
||||||
|
var result;
|
||||||
|
|
||||||
return result != null ? result.path : null;
|
return result != null ? result.path : null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:manager_app/Components/message_notification.dart';
|
import 'package:manager_app/Components/message_notification.dart';
|
||||||
import 'package:manager_app/Components/resource_tab.dart';
|
import 'package:manager_app/Components/resource_tab.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -13,7 +14,8 @@ dynamic showNewResource(AppContext appContext, BuildContext context) async {
|
|||||||
ResourceDTO resourceDetailDTO = new ResourceDTO();
|
ResourceDTO resourceDetailDTO = new ResourceDTO();
|
||||||
Size size = MediaQuery.of(context).size;
|
Size size = MediaQuery.of(context).size;
|
||||||
var fileName;
|
var fileName;
|
||||||
File fileToSend;
|
List<File> filesToSend;
|
||||||
|
List<PlatformFile> filesToSendWeb;
|
||||||
|
|
||||||
var result = await showDialog(
|
var result = await showDialog(
|
||||||
builder: (BuildContext context) => AlertDialog(
|
builder: (BuildContext context) => AlertDialog(
|
||||||
@ -43,8 +45,11 @@ dynamic showNewResource(AppContext appContext, BuildContext context) async {
|
|||||||
height: size.height *0.5,
|
height: size.height *0.5,
|
||||||
child: ResourceTab(
|
child: ResourceTab(
|
||||||
resourceDTO: resourceDetailDTO,
|
resourceDTO: resourceDetailDTO,
|
||||||
onFileUpload: (File file) {
|
onFileUpload: (List<File> files) {
|
||||||
fileToSend = file;
|
filesToSend = files;
|
||||||
|
},
|
||||||
|
onFileUploadWeb: (List<PlatformFile> files) {
|
||||||
|
filesToSendWeb = files;
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -83,9 +88,9 @@ dynamic showNewResource(AppContext appContext, BuildContext context) async {
|
|||||||
color: kPrimaryColor,
|
color: kPrimaryColor,
|
||||||
textColor: kWhite,
|
textColor: kWhite,
|
||||||
press: () {
|
press: () {
|
||||||
if (resourceDetailDTO.label != null) {
|
if (resourceDetailDTO.label != null && resourceDetailDTO.label.trim() != '') {
|
||||||
if (resourceDetailDTO.data != null || fileToSend != null) {
|
if (resourceDetailDTO.data != null || filesToSendWeb.length > 0 || filesToSend.length > 0) {
|
||||||
Navigator.pop(context, [resourceDetailDTO, fileToSend]);
|
Navigator.pop(context, [resourceDetailDTO, filesToSend, filesToSendWeb]);
|
||||||
} else {
|
} else {
|
||||||
showNotification(Colors.orange, kWhite, 'Aucun fichier n\'a été chargé', context, null);
|
showNotification(Colors.orange, kWhite, 'Aucun fichier n\'a été chargé', context, null);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'dart:developer';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:manager_app/Components/loading.dart';
|
import 'package:manager_app/Components/loading.dart';
|
||||||
import 'package:manager_app/Components/message_notification.dart';
|
import 'package:manager_app/Components/message_notification.dart';
|
||||||
@ -13,6 +14,7 @@ import 'package:manager_app/constants.dart';
|
|||||||
import 'package:managerapi/api.dart';
|
import 'package:managerapi/api.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
class ResourcesScreen extends StatefulWidget {
|
class ResourcesScreen extends StatefulWidget {
|
||||||
final Function onGetResult; //return ResourceDTO
|
final Function onGetResult; //return ResourceDTO
|
||||||
@ -51,7 +53,7 @@ class _ResourcesScreenState extends State<ResourcesScreen> {
|
|||||||
var result = await showNewResource(appContext, context);
|
var result = await showNewResource(appContext, context);
|
||||||
if (result != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
await create(result[0], result[1], appContext, context);
|
await create(result[0], result[1], result[2], appContext, context);
|
||||||
setState(() {}); // For refresh
|
setState(() {}); // For refresh
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -85,11 +87,25 @@ Future<void> getResources(Function onGetResult, bool isImage, dynamic appContext
|
|||||||
return resources;
|
return resources;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<ResourceDTO> create(ResourceDTO resourceDTO, File file, AppContext appContext, context) async {
|
Future<ResourceDTO> create(ResourceDTO resourceDTO, List<File> files, List<PlatformFile> filesWeb, AppContext appContext, context) async {
|
||||||
switch(resourceDTO.type) {
|
switch(resourceDTO.type) {
|
||||||
case ResourceType.image:
|
case ResourceType.image:
|
||||||
case ResourceType.video:
|
case ResourceType.video:
|
||||||
|
|
||||||
var request = http.MultipartRequest('POST', Uri.parse(appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/upload"));
|
var request = http.MultipartRequest('POST', Uri.parse(appContext.getContext().clientAPI.resourceApi.apiClient.basePath+"/api/Resource/upload"));
|
||||||
|
|
||||||
|
if (kIsWeb) {
|
||||||
|
for (PlatformFile file in filesWeb) {
|
||||||
|
request.files.add(
|
||||||
|
await http.MultipartFile.fromBytes(
|
||||||
|
'picture',
|
||||||
|
file.bytes,
|
||||||
|
filename: file.name
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (File file in files) {
|
||||||
request.files.add(
|
request.files.add(
|
||||||
await http.MultipartFile(
|
await http.MultipartFile(
|
||||||
'picture',
|
'picture',
|
||||||
@ -98,6 +114,8 @@ Future<ResourceDTO> create(ResourceDTO resourceDTO, File file, AppContext appCon
|
|||||||
filename: file.path.toString().split("/").last
|
filename: file.path.toString().split("/").last
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ManagerAppContext managerAppContext = appContext.getContext();
|
ManagerAppContext managerAppContext = appContext.getContext();
|
||||||
request.headers["authorization"]="Bearer ${managerAppContext.token.accessToken}";
|
request.headers["authorization"]="Bearer ${managerAppContext.token.accessToken}";
|
||||||
@ -108,10 +126,8 @@ Future<ResourceDTO> create(ResourceDTO resourceDTO, File file, AppContext appCon
|
|||||||
final respStr = await res.stream.bytesToString();
|
final respStr = await res.stream.bytesToString();
|
||||||
|
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
var result = ResourceDTO.fromJson(jsonDecode(respStr));
|
|
||||||
showNotification(Colors.green, kWhite, 'La ressource a été créée avec succès', context, null);
|
showNotification(Colors.green, kWhite, 'La ressource a été créée avec succès', context, null);
|
||||||
|
return null;
|
||||||
return result;
|
|
||||||
} else {
|
} else {
|
||||||
showNotification(kPrimaryColor, kWhite, 'Une erreur est survenue lors de la création de la ressource', context, null);
|
showNotification(kPrimaryColor, kWhite, 'Une erreur est survenue lors de la création de la ressource', context, null);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import 'package:manager_app/client.dart';
|
|||||||
import 'package:manager_app/constants.dart';
|
import 'package:manager_app/constants.dart';
|
||||||
import 'package:managerapi/api.dart';
|
import 'package:managerapi/api.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
class LoginScreen extends StatefulWidget {
|
class LoginScreen extends StatefulWidget {
|
||||||
final Session session;
|
final Session session;
|
||||||
@ -32,8 +33,10 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
|
|
||||||
void authenticateTRY(dynamic appContext) async {
|
void authenticateTRY(dynamic appContext) async {
|
||||||
print("try auth.. ");
|
print("try auth.. ");
|
||||||
print(this.email);
|
|
||||||
print(this.password);
|
this.host = "http://localhost:5000";
|
||||||
|
this.email = "fs";
|
||||||
|
this.password = "fs";
|
||||||
|
|
||||||
clientAPI = Client(this.host);
|
clientAPI = Client(this.host);
|
||||||
|
|
||||||
@ -44,11 +47,11 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
});
|
});
|
||||||
|
print(email);
|
||||||
|
print(password);
|
||||||
|
|
||||||
LoginDTO loginDTO = new LoginDTO(email: email, password: password);
|
LoginDTO loginDTO = new LoginDTO(email: email, password: password);
|
||||||
TokenDTO token = await clientAPI.authenticationApi.authenticationAuthenticateWithJson(loginDTO);
|
TokenDTO token = await clientAPI.authenticationApi.authenticationAuthenticateWithJson(loginDTO);
|
||||||
print("Token ??");
|
|
||||||
print(token);
|
|
||||||
print(token.accessToken);
|
|
||||||
setAccessToken(token.accessToken);
|
setAccessToken(token.accessToken);
|
||||||
|
|
||||||
if (isRememberMe) {
|
if (isRememberMe) {
|
||||||
@ -167,7 +170,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
password = value;
|
password = value;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Padding(
|
if(!kIsWeb) Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
|||||||
@ -26,7 +26,9 @@ class Client {
|
|||||||
Client(String path) {
|
Client(String path) {
|
||||||
_apiClient = ApiClient(
|
_apiClient = ApiClient(
|
||||||
basePath: path);
|
basePath: path);
|
||||||
|
//basePath: "https://192.168.31.140");
|
||||||
//basePath: "https://localhost:44339");
|
//basePath: "https://localhost:44339");
|
||||||
|
_apiClient.addDefaultHeader("Access-Control_Allow_Origin", "*");
|
||||||
_authenticationApi = AuthenticationApi(_apiClient);
|
_authenticationApi = AuthenticationApi(_apiClient);
|
||||||
_userApi = UserApi(_apiClient);
|
_userApi = UserApi(_apiClient);
|
||||||
_configurationApi = ConfigurationApi(_apiClient);
|
_configurationApi = ConfigurationApi(_apiClient);
|
||||||
|
|||||||
@ -10,17 +10,12 @@ import 'Models/session.dart';
|
|||||||
import 'Screens/login_screen.dart';
|
import 'Screens/login_screen.dart';
|
||||||
import 'app_context.dart';
|
import 'app_context.dart';
|
||||||
import 'constants.dart';
|
import 'constants.dart';
|
||||||
import 'package:window_size/window_size.dart';
|
//import 'package:window_size/window_size.dart';
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
String initialRoute;
|
String initialRoute;
|
||||||
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
if (Platform.isWindows) {
|
|
||||||
setWindowTitle("Manager");
|
|
||||||
setWindowMinSize(Size(1250, 850));
|
|
||||||
setWindowMaxSize(Size(3840, 2160));
|
|
||||||
}
|
|
||||||
|
|
||||||
initialRoute = '/welcome';
|
initialRoute = '/welcome';
|
||||||
|
|
||||||
|
|||||||
@ -6,14 +6,6 @@
|
|||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <dart_vlc/dart_vlc_plugin.h>
|
|
||||||
#include <window_size/window_size_plugin.h>
|
|
||||||
|
|
||||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||||
g_autoptr(FlPluginRegistrar) dart_vlc_registrar =
|
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "DartVlcPlugin");
|
|
||||||
dart_vlc_plugin_register_with_registrar(dart_vlc_registrar);
|
|
||||||
g_autoptr(FlPluginRegistrar) window_size_registrar =
|
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "WindowSizePlugin");
|
|
||||||
window_size_plugin_register_with_registrar(window_size_registrar);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,8 +3,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
dart_vlc
|
|
||||||
window_size
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PLUGIN_BUNDLED_LIBRARIES)
|
set(PLUGIN_BUNDLED_LIBRARIES)
|
||||||
|
|||||||
@ -5,10 +5,6 @@
|
|||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
import path_provider_macos
|
|
||||||
import window_size
|
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
|
||||||
WindowSizePlugin.register(with: registry.registrar(forPlugin: "WindowSizePlugin"))
|
|
||||||
}
|
}
|
||||||
|
|||||||
150
pubspec.lock
150
pubspec.lock
@ -1,13 +1,6 @@
|
|||||||
# Generated by pub
|
# Generated by pub
|
||||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||||
packages:
|
packages:
|
||||||
ansicolor:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: ansicolor
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.1"
|
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -29,13 +22,6 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.8.2"
|
version: "2.8.2"
|
||||||
audio_video_progress_bar:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: audio_video_progress_bar
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.4.0"
|
|
||||||
auto_size_text:
|
auto_size_text:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -99,20 +85,6 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.3"
|
version: "1.0.3"
|
||||||
dart_vlc:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: dart_vlc
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.0.9"
|
|
||||||
dart_vlc_ffi:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: dart_vlc_ffi
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.0.9"
|
|
||||||
drag_and_drop_lists:
|
drag_and_drop_lists:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -141,20 +113,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.2"
|
version: "1.1.2"
|
||||||
file:
|
file_picker:
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: file
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "6.1.2"
|
|
||||||
filepicker_windows:
|
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: filepicker_windows
|
name: file_picker
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "4.3.0"
|
||||||
flare_flutter:
|
flare_flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -174,6 +139,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.0"
|
version: "0.6.0"
|
||||||
|
flutter_plugin_android_lifecycle:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: flutter_plugin_android_lifecycle
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.5"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
@ -198,13 +170,6 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.4"
|
version: "3.1.4"
|
||||||
injector:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: injector
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.0"
|
|
||||||
intl:
|
intl:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -247,13 +212,6 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.7.0"
|
version: "1.7.0"
|
||||||
msix:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: msix
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.1.3"
|
|
||||||
multiselect_formfield:
|
multiselect_formfield:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -268,13 +226,6 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.0"
|
version: "1.0.0"
|
||||||
package_config:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: package_config
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.0"
|
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -282,41 +233,6 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.0"
|
||||||
path_provider:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: path_provider
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.2"
|
|
||||||
path_provider_linux:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: path_provider_linux
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.2"
|
|
||||||
path_provider_macos:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: path_provider_macos
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.2"
|
|
||||||
path_provider_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: path_provider_platform_interface
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.1"
|
|
||||||
path_provider_windows:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: path_provider_windows
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.3"
|
|
||||||
pedantic:
|
pedantic:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -324,20 +240,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.1"
|
version: "1.11.1"
|
||||||
platform:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: platform
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.2"
|
|
||||||
plugin_platform_interface:
|
plugin_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: plugin_platform_interface
|
name: plugin_platform_interface
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.2"
|
||||||
pointycastle:
|
pointycastle:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -345,13 +254,6 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.3.1"
|
version: "3.3.1"
|
||||||
process:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: process
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "4.2.3"
|
|
||||||
provider:
|
provider:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -448,36 +350,6 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.3"
|
version: "2.0.3"
|
||||||
win32:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: win32
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.5"
|
|
||||||
window_size:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
path: "plugins/window_size"
|
|
||||||
ref: "927f8cbc09b35d85245c095f2db8df9b186f6618"
|
|
||||||
resolved-ref: "927f8cbc09b35d85245c095f2db8df9b186f6618"
|
|
||||||
url: "git://github.com/google/flutter-desktop-embedding.git"
|
|
||||||
source: git
|
|
||||||
version: "0.1.0"
|
|
||||||
xdg_directories:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: xdg_directories
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.2.0"
|
|
||||||
yaml:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: yaml
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "3.1.0"
|
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.12.0 <3.0.0"
|
dart: ">=2.12.0 <3.0.0"
|
||||||
flutter: ">=2.0.0"
|
flutter: ">=2.0.0"
|
||||||
|
|||||||
19
pubspec.yaml
19
pubspec.yaml
@ -32,19 +32,20 @@ dependencies:
|
|||||||
material_segmented_control: ^3.1.2
|
material_segmented_control: ^3.1.2
|
||||||
convert: ^3.0.0
|
convert: ^3.0.0
|
||||||
collection: any
|
collection: any
|
||||||
filepicker_windows: ^2.0.0
|
#filepicker_windows: ^2.0.0
|
||||||
|
file_picker: ^4.3.0
|
||||||
flare_flutter: ^3.0.1
|
flare_flutter: ^3.0.1
|
||||||
dart_vlc: ^0.0.6
|
#dart_vlc: ^0.0.6
|
||||||
video_player: ^2.1.1
|
video_player: ^2.1.1
|
||||||
drag_and_drop_lists: ^0.3.2
|
drag_and_drop_lists: ^0.3.2
|
||||||
path_provider: ^2.0.2
|
#path_provider: ^2.0.2
|
||||||
encrypt: ^5.0.0
|
encrypt: ^5.0.0
|
||||||
msix: ^2.1.3
|
#msix: ^2.1.3
|
||||||
window_size:
|
#window_size:
|
||||||
git:
|
# git:
|
||||||
url: git://github.com/google/flutter-desktop-embedding.git
|
# url: git://github.com/google/flutter-desktop-embedding.git
|
||||||
path: plugins/window_size
|
# path: plugins/window_size
|
||||||
ref: 927f8cbc09b35d85245c095f2db8df9b186f6618
|
# ref: 927f8cbc09b35d85245c095f2db8df9b186f6618
|
||||||
managerapi:
|
managerapi:
|
||||||
path: manager_api
|
path: manager_api
|
||||||
|
|
||||||
|
|||||||
@ -6,12 +6,6 @@
|
|||||||
|
|
||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <dart_vlc/dart_vlc_plugin.h>
|
|
||||||
#include <window_size/window_size_plugin.h>
|
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
DartVlcPluginRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("DartVlcPlugin"));
|
|
||||||
WindowSizePluginRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("WindowSizePlugin"));
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,8 +3,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
dart_vlc
|
|
||||||
window_size
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(PLUGIN_BUNDLED_LIBRARIES)
|
set(PLUGIN_BUNDLED_LIBRARIES)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user