D1APP-21 Logo loading iindicator (basic)

This commit is contained in:
MohammadTaha Basiri 2021-12-10 16:58:17 +03:30
parent 6299949461
commit 2de5fd3069
5 changed files with 59 additions and 6 deletions

Binary file not shown.

View File

@ -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';
}

View File

@ -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<void> 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),
),
);
}
}

View File

@ -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"

View File

@ -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