diff --git a/lib/widgets/loading_widget.dart b/lib/widgets/loading_widget.dart new file mode 100644 index 0000000..7c4d136 --- /dev/null +++ b/lib/widgets/loading_widget.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; +import 'package:gap/gap.dart'; +import 'package:loading_animation_widget/loading_animation_widget.dart'; +import 'package:ocbo_esign_mobile/widgets/text_widget.dart'; + +class LoadingWidget extends StatelessWidget { + final String? text; + + const LoadingWidget({super.key, this.text}); + + @override + Widget build(BuildContext context) { + return Center( + child: Column( + children: [ + LoadingAnimationWidget.discreteCircle( + color: const Color.fromRGBO(164, 168, 229, 0.8), + secondRingColor: const Color.fromRGBO(141, 145, 210, 0.8), + thirdRingColor: const Color.fromRGBO(117, 123, 204, 0.8), + size: 60, + ), + const Gap(16), + TextWidget(text: text ?? '', size: 16, bold: true), + ], + ), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index 778182e..9a9df44 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -376,6 +376,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.1.0" + loading_animation_widget: + dependency: "direct main" + description: + name: loading_animation_widget + sha256: "9fe23381f3096e902f39e87e487648ff7f74925e86234353fa885bb9f6c98004" + url: "https://pub.dev" + source: hosted + version: "1.3.0" logging: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 2a732ce..3b6d03a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,6 +23,7 @@ dependencies: flutter_bloc: ^9.1.1 vibration: ^3.1.4 intl: ^0.20.2 + loading_animation_widget: ^1.3.0 dev_dependencies: flutter_test: @@ -48,3 +49,4 @@ flutter: - assets/esign.webp - assets/esign-mobile.webp - assets/esign-check.webp + - assets/ocbologo.webp