diff --git a/lib/assets/animations/indicator.riv b/lib/assets/animations/indicator.riv new file mode 100644 index 0000000..6bc6ab8 Binary files /dev/null and b/lib/assets/animations/indicator.riv differ diff --git a/lib/constants/assets.dart b/lib/constants/assets.dart index f4f2a00..029a236 100644 --- a/lib/constants/assets.dart +++ b/lib/constants/assets.dart @@ -1,9 +1,13 @@ class Assets { static const String _basePath = 'lib/assets'; static const String _baseImagesPath = _basePath + '/images'; + static const String _baseAnimationsPath = _basePath + '/animations'; static const String verticalLogoWithText = _baseImagesPath + '/logo/logo-v-t.png'; static const String horizontalLogoWithText = _baseImagesPath + '/logo/logo-h-t.png'; + + static const String logoLoadingAnimation = + _baseAnimationsPath + '/indicator.riv'; } diff --git a/lib/utils/actions_sheet.dart b/lib/utils/actions_sheet.dart new file mode 100644 index 0000000..29a2299 --- /dev/null +++ b/lib/utils/actions_sheet.dart @@ -0,0 +1,18 @@ +import 'package:didvan/constants/assets.dart'; +import 'package:flutter/material.dart'; +import 'package:rive/rive.dart'; + +class ActionSheetUtils { + static late final BuildContext context; + + static Future showLogoLoadingIndicator() async { + await showDialog( + context: context, + builder: (context) => Padding( + padding: EdgeInsets.symmetric( + horizontal: MediaQuery.of(context).size.width / 3), + child: const RiveAnimation.asset(Assets.logoLoadingAnimation), + ), + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index b3e8f86..1cace8f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.1" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -21,7 +21,7 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: @@ -79,6 +79,27 @@ packages: description: flutter source: sdk version: "0.0.0" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.4" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" intl: dependency: transitive description: @@ -99,7 +120,7 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" meta: dependency: transitive description: @@ -135,6 +156,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "6.0.1" + rive: + dependency: "direct main" + description: + name: rive + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.33" sky_engine: dependency: transitive description: flutter @@ -181,7 +209,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.2" + version: "0.4.3" typed_data: dependency: transitive description: @@ -195,7 +223,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" sdks: - dart: ">=2.12.0 <3.0.0" + dart: ">=2.14.0 <3.0.0" flutter: ">=1.16.0" diff --git a/pubspec.yaml b/pubspec.yaml index ecd8d13..fd16ec0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -38,6 +38,7 @@ dependencies: cupertino_icons: ^1.0.2 provider: ^6.0.1 pin_code_fields: ^7.3.0 + rive: ^0.7.33 dev_dependencies: flutter_test: @@ -65,6 +66,8 @@ flutter: assets: - lib/assets/images/logo/logo-v-t.png - lib/assets/images/logo/logo-h-t.png + - lib/assets/animations/indicator.riv + - lib/assets/animations/full.riv