diff --git a/assets/animations/MDLF_animation.flr b/assets/animations/MDLF_animation.flr new file mode 100644 index 0000000..4009ffb Binary files /dev/null and b/assets/animations/MDLF_animation.flr differ diff --git a/lib/Components/image_input_container.dart b/lib/Components/image_input_container.dart index d6f3a21..fbfd5a2 100644 --- a/lib/Components/image_input_container.dart +++ b/lib/Components/image_input_container.dart @@ -1,5 +1,6 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/material.dart'; +import 'package:manager_app/Components/loading.dart'; import 'package:manager_app/Screens/Resources/fetch_image_for_resource.dart'; import 'package:manager_app/app_context.dart'; import 'package:manager_app/constants.dart'; @@ -93,7 +94,12 @@ class _ImageInputContainerState extends State { } else if (snapshot.connectionState == ConnectionState.none) { return Text("No data"); } else { - return Center(child: Container(height: size.height * 0.2, child: Text('LOADING TODO FRAISE'))); + return Center( + child: Container( + height: size.height * 0.1, + child: Loading() + ) + ); } } ); diff --git a/lib/Components/loading.dart b/lib/Components/loading.dart new file mode 100644 index 0000000..8853516 --- /dev/null +++ b/lib/Components/loading.dart @@ -0,0 +1,22 @@ +import 'package:flare_flutter/flare_actor.dart'; +import 'package:flutter/material.dart'; + +class Loading extends StatelessWidget { + Loading({Key key}) : super(key: key); + + @override + Widget build(BuildContext context) { + Size size = MediaQuery.of(context).size; + return Container( + width: size.width, + height: size.height, + color: Colors.transparent, + child: FlareActor( + 'assets/animations/MDLF_animation.flr', + alignment: Alignment.center, + fit: BoxFit.scaleDown, + animation: 'Rotate', + ), + ); + } +} \ No newline at end of file diff --git a/lib/Components/rounded_input_field.dart b/lib/Components/rounded_input_field.dart index 80a64fb..af153c0 100644 --- a/lib/Components/rounded_input_field.dart +++ b/lib/Components/rounded_input_field.dart @@ -18,7 +18,7 @@ class RoundedInputField extends StatelessWidget { this.textColor = kBlack, this.iconColor = kPrimaryColor, this.onChanged, - this.maxLength = 50, + this.maxLength, // 50 }) : super(key: key); @override diff --git a/lib/Components/upload_image_container.dart b/lib/Components/upload_image_container.dart index 07a26da..f82cc1f 100644 --- a/lib/Components/upload_image_container.dart +++ b/lib/Components/upload_image_container.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'dart:convert'; import 'package:dart_vlc/dart_vlc.dart'; +import 'package:manager_app/Components/loading.dart'; import 'package:manager_app/Components/vlc_viewer.dart'; import 'package:manager_app/constants.dart'; import 'package:path/path.dart'; @@ -92,7 +93,12 @@ class _UploadImageContainerState extends State with Single } else if (snapshot.connectionState == ConnectionState.none) { return Text("No data"); } else { - return Center(child: Container(height: 200, child: Text('LOADING TODO FRAISE'))); + return Center( + child: Container( + height: 200, + child: Loading() + ) + ); } } ); diff --git a/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart b/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart index 41f98a7..a9535e5 100644 --- a/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart +++ b/lib/Screens/Configurations/Section/SubSection/Slider/listView_card_image.dart @@ -44,20 +44,20 @@ class _ListViewCard extends State { children: [ AutoSizeText( widget.listItems[widget.index].title == null ? "" : widget.listItems[widget.index].title[0].value, - style: new TextStyle(fontSize: 20), + style: new TextStyle(fontSize: 15), maxLines: 1, ), Container( height: MediaQuery.of(context).size.height * 0.1, decoration: boxDecoration(widget.listItems[widget.index], widget.appContext), - padding: const EdgeInsets.all(15), - margin: EdgeInsets.symmetric(vertical: 15, horizontal: 15), + padding: const EdgeInsets.all(10), + margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10), ), Padding( - padding: const EdgeInsets.all(8.0), + padding: const EdgeInsets.all(5.0), child: AutoSizeText( widget.listItems[widget.index].description == null ? "" : widget.listItems[widget.index].description[0].value, - style: new TextStyle(fontSize: 20), + style: new TextStyle(fontSize: 15), maxLines: 3, ), ), diff --git a/lib/Screens/Configurations/Section/section_detail_screen.dart b/lib/Screens/Configurations/Section/section_detail_screen.dart index b1c9807..fa1d8c7 100644 --- a/lib/Screens/Configurations/Section/section_detail_screen.dart +++ b/lib/Screens/Configurations/Section/section_detail_screen.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:manager_app/Components/confirmation_dialog.dart'; import 'package:manager_app/Components/fetch_section_icon.dart'; import 'package:manager_app/Components/image_input_container.dart'; +import 'package:manager_app/Components/loading.dart'; import 'package:manager_app/Components/message_notification.dart'; import 'package:manager_app/Components/multi_select_container.dart'; import 'package:manager_app/Components/multi_string_input_container.dart'; @@ -44,7 +45,12 @@ class _SectionDetailScreenState extends State { } else if (snapshot.connectionState == ConnectionState.none) { return Text("No data"); } else { - return Center(child: Container(height: size.height * 0.2, child: Text('LOADING TODO FRAISE'))); + return Center( + child: Container( + height: size.height * 0.2, + child: Loading() + ) + ); } } ); @@ -55,6 +61,7 @@ class _SectionDetailScreenState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( + height: size.height *0.13, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -113,6 +120,7 @@ class _SectionDetailScreenState extends State { Container( /*height: size.height*0.4, color: Colors.lightBlue,*/ + //height: size.height *0.1, child: Padding( padding: const EdgeInsets.all(10.0), child: Container( @@ -188,7 +196,7 @@ class _SectionDetailScreenState extends State { ), ),// FIELDS SECTION Container( - height: size.height * 0.39, + height: size.height * 0.305, width: size.width * 0.8, child: Padding( padding: const EdgeInsets.all(10.0), diff --git a/lib/Screens/Configurations/configuration_detail_screen.dart b/lib/Screens/Configurations/configuration_detail_screen.dart index 08a3ece..a0d31b5 100644 --- a/lib/Screens/Configurations/configuration_detail_screen.dart +++ b/lib/Screens/Configurations/configuration_detail_screen.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/painting.dart'; import 'package:manager_app/Components/color_picker_input_container.dart'; import 'package:manager_app/Components/confirmation_dialog.dart'; +import 'package:manager_app/Components/loading.dart'; import 'package:manager_app/Components/message_notification.dart'; import 'package:manager_app/Components/multi_select_container.dart'; import 'package:manager_app/Components/rounded_button.dart'; @@ -41,7 +42,12 @@ class _ConfigurationDetailScreenState extends State { } else if (snapshot.connectionState == ConnectionState.none) { return Text("No data"); } else { - return Center(child: Container(height: size.height * 0.2, child: Text('LOADING TODO FRAISE'))); + return Center( + child: Container( + height: size.height * 0.2, + child: Loading() + ) + ); } } ); @@ -52,7 +58,7 @@ class _ConfigurationDetailScreenState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( - //height: size.height *0.12, + height: size.height *0.11, child: SingleChildScrollView( child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -175,7 +181,12 @@ class _ConfigurationDetailScreenState extends State { } else if (snapshot.connectionState == ConnectionState.none) { return Text("No data"); } else { - return Center(child: Container(height: size.height * 0.2, child: Text('LOADING TODO FRAISE'))); + return Center( + child: Container( + height: size.height * 0.2, + child: Loading() + ) + ); } } ), diff --git a/lib/Screens/Configurations/configurations_screen.dart b/lib/Screens/Configurations/configurations_screen.dart index 401f773..c4daefa 100644 --- a/lib/Screens/Configurations/configurations_screen.dart +++ b/lib/Screens/Configurations/configurations_screen.dart @@ -1,5 +1,7 @@ import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flare_flutter/flare_actor.dart'; import 'package:flutter/material.dart'; +import 'package:manager_app/Components/loading.dart'; import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/Screens/Configurations/configuration_detail_screen.dart'; import 'package:manager_app/Screens/Configurations/new_configuration_popup.dart'; @@ -46,7 +48,12 @@ class _ConfigurationsScreenState extends State { } else if (snapshot.connectionState == ConnectionState.none) { return Text("No data"); } else { - return Center(child: Container(height: size.height * 0.2, child: Text('LOADING TODO FRAISE'))); + return Center( + child: Container( + height: size.height * 0.2, + child: Loading() + ) + ); } } ), diff --git a/lib/Screens/Devices/change_device_info_modal.dart b/lib/Screens/Devices/change_device_info_modal.dart index 56292bc..770c25e 100644 --- a/lib/Screens/Devices/change_device_info_modal.dart +++ b/lib/Screens/Devices/change_device_info_modal.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:manager_app/Components/loading.dart'; import 'package:manager_app/Components/rounded_button.dart'; import 'package:manager_app/Components/string_input_container.dart'; import 'package:manager_app/constants.dart'; @@ -64,7 +65,12 @@ showChangeInfo (String text, DeviceDTO inputDevice, Function onGetResult, int ma } else if (snapshot.connectionState == ConnectionState.none) { return Text("No data"); } else { - return Center(child: Container(height: size.height * 0.2, child: Text('LOADING TODO FRAISE'))); + return Center( + child: Container( + height: size.height * 0.2, + child: Loading() + ) + ); } } ), diff --git a/lib/Screens/Devices/devices_screen.dart b/lib/Screens/Devices/devices_screen.dart index b7ab1cd..5e907e4 100644 --- a/lib/Screens/Devices/devices_screen.dart +++ b/lib/Screens/Devices/devices_screen.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:manager_app/Components/loading.dart'; import 'package:manager_app/Models/managerContext.dart'; import 'package:manager_app/Screens/Devices/device_element.dart'; import 'package:manager_app/app_context.dart'; @@ -45,7 +46,12 @@ class _DevicesScreenState extends State { } else if (snapshot.connectionState == ConnectionState.none) { return Text("No data"); } else { - return Center(child: Container(height: size.height * 0.2, child: Text('LOADING TODO FRAISE'))); + return Center( + child: Container( + height: size.height * 0.2, + child: Loading() + ) + ); } } ), diff --git a/lib/Screens/Resources/resources_screen.dart b/lib/Screens/Resources/resources_screen.dart index 8e3763f..416c81e 100644 --- a/lib/Screens/Resources/resources_screen.dart +++ b/lib/Screens/Resources/resources_screen.dart @@ -1,6 +1,7 @@ import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter/material.dart'; import 'package:manager_app/Components/fetch_resource_icon.dart'; +import 'package:manager_app/Components/loading.dart'; import 'package:manager_app/Components/string_input_container.dart'; import 'package:manager_app/Screens/Resources/new_resource_popup.dart'; import 'package:manager_app/Screens/Resources/resource_body_grid.dart'; @@ -57,7 +58,12 @@ class _ResourcesScreenState extends State { } else if (snapshot.connectionState == ConnectionState.none) { return Text("No data"); } else { - return Center(child: Container(height: size.height * 0.2, child: Text('LOADING TODO FRAISE'))); + return Center( + child: Container( + height: size.height * 0.2, + child: Loading() + ) + ); } } ); diff --git a/pubspec.lock b/pubspec.lock index 2bbd576..379700f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -14,7 +14,7 @@ packages: name: audio_video_progress_bar url: "https://pub.dartlang.org" source: hosted - version: "0.3.2" + version: "0.4.0" auto_size_text: dependency: "direct main" description: @@ -63,7 +63,7 @@ packages: name: convert url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.1" cupertino_icons: dependency: "direct main" description: @@ -77,7 +77,7 @@ packages: name: dart_vlc url: "https://pub.dartlang.org" source: hosted - version: "0.0.6" + version: "0.0.7" drag_and_drop_lists: dependency: "direct main" description: @@ -98,14 +98,14 @@ packages: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.2" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "6.1.0" + version: "6.1.2" filepicker_windows: dependency: "direct main" description: @@ -113,6 +113,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.0" + flare_flutter: + dependency: "direct main" + description: + name: flare_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" flutter: dependency: "direct main" description: flutter @@ -218,7 +225,7 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" path_provider_linux: dependency: transitive description: @@ -253,7 +260,7 @@ packages: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.11.0" + version: "1.11.1" platform: dependency: transitive description: @@ -356,7 +363,7 @@ packages: name: video_player url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.6" video_player_platform_interface: dependency: transitive description: @@ -370,7 +377,7 @@ packages: name: video_player_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" win32: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 41c0da2..bc534fa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -33,6 +33,7 @@ dependencies: convert: ^3.0.0 collection: any filepicker_windows: ^2.0.0 + flare_flutter: ^3.0.1 dart_vlc: ^0.0.6 video_player: ^2.1.1 drag_and_drop_lists: ^0.3.2 @@ -59,9 +60,9 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + assets: + - assets/images/ + - assets/animations/ # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware.