33 lines
961 B
Dart
33 lines
961 B
Dart
import 'package:didvan/config/design_config.dart';
|
|
import 'package:didvan/constants/assets.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:rive/rive.dart';
|
|
|
|
class ActionSheetUtils {
|
|
static late final BuildContext context;
|
|
|
|
static Future<void> showLogoLoadingIndicator() async {
|
|
await showDialog(
|
|
context: context,
|
|
builder: (context) => _customSystemOverlayStyle(
|
|
child: Padding(
|
|
padding: EdgeInsets.symmetric(
|
|
horizontal: MediaQuery.of(context).size.width / 3,
|
|
),
|
|
child: const RiveAnimation.asset(Assets.logoLoadingAnimation),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
static AnnotatedRegion _customSystemOverlayStyle({required Widget child}) {
|
|
return AnnotatedRegion<SystemUiOverlayStyle>(
|
|
value: DesignConfig.systemUiOverlayStyle.copyWith(
|
|
systemNavigationBarColor: Colors.black45,
|
|
),
|
|
child: child,
|
|
);
|
|
}
|
|
}
|