Add loading animation
This commit is contained in:
parent
0b05d1bd3d
commit
6fa8145f53
BIN
assets/animations/MDLF_animation.flr
Normal file
BIN
assets/animations/MDLF_animation.flr
Normal file
Binary file not shown.
@ -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<ImageInputContainer> {
|
||||
} 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()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
22
lib/Components/loading.dart
Normal file
22
lib/Components/loading.dart
Normal file
@ -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',
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
|
||||
@ -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<UploadImageContainer> 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()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@ -44,20 +44,20 @@ class _ListViewCard extends State<ListViewCardImage> {
|
||||
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,
|
||||
),
|
||||
),
|
||||
|
||||
@ -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<SectionDetailScreen> {
|
||||
} 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<SectionDetailScreen> {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
height: size.height *0.13,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
@ -113,6 +120,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
|
||||
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<SectionDetailScreen> {
|
||||
),
|
||||
),// 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),
|
||||
|
||||
@ -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<ConfigurationDetailScreen> {
|
||||
} 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<ConfigurationDetailScreen> {
|
||||
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<ConfigurationDetailScreen> {
|
||||
} 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()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
),
|
||||
|
||||
@ -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<ConfigurationsScreen> {
|
||||
} 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()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
),
|
||||
|
||||
@ -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()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
),
|
||||
|
||||
@ -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<DevicesScreen> {
|
||||
} 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()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
),
|
||||
|
||||
@ -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<ResourcesScreen> {
|
||||
} 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()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
25
pubspec.lock
25
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:
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user