mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-06-12 08:32:56 -04:00
contact invitation algorithm
This commit is contained in:
parent
c35056f687
commit
f52094c105
43 changed files with 1319 additions and 451 deletions
|
@ -1,8 +1,11 @@
|
|||
import 'package:blurry_modal_progress_hud/blurry_modal_progress_hud.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||
import 'package:motion_toast/motion_toast.dart';
|
||||
import 'package:quickalert/quickalert.dart';
|
||||
|
||||
import 'theme_service.dart';
|
||||
|
||||
extension BorderExt on Widget {
|
||||
DecoratedBox debugBorder() => DecoratedBox(
|
||||
decoration: BoxDecoration(border: Border.all(color: Colors.redAccent)),
|
||||
|
@ -10,19 +13,27 @@ extension BorderExt on Widget {
|
|||
}
|
||||
|
||||
extension ModalProgressExt on Widget {
|
||||
BlurryModalProgressHUD withModalHUD(BuildContext context, bool isLoading) =>
|
||||
BlurryModalProgressHUD(
|
||||
inAsyncCall: isLoading,
|
||||
blurEffectIntensity: 4,
|
||||
progressIndicator: buildProgressIndicator(context),
|
||||
color: Theme.of(context).shadowColor,
|
||||
child: this);
|
||||
BlurryModalProgressHUD withModalHUD(BuildContext context, bool isLoading) {
|
||||
final theme = Theme.of(context);
|
||||
final scale = theme.extension<ScaleScheme>()!;
|
||||
|
||||
return BlurryModalProgressHUD(
|
||||
inAsyncCall: isLoading,
|
||||
blurEffectIntensity: 4,
|
||||
progressIndicator: buildProgressIndicator(context),
|
||||
color: scale.tertiaryScale.appBackground.withAlpha(64),
|
||||
child: this);
|
||||
}
|
||||
}
|
||||
|
||||
Widget buildProgressIndicator(BuildContext context) => SpinKitFoldingCube(
|
||||
color: Theme.of(context).highlightColor,
|
||||
size: 90,
|
||||
);
|
||||
Widget buildProgressIndicator(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final scale = theme.extension<ScaleScheme>()!;
|
||||
return SpinKitFoldingCube(
|
||||
color: scale.tertiaryScale.background,
|
||||
size: 80,
|
||||
);
|
||||
}
|
||||
|
||||
Widget waitingPage(BuildContext context) => ColoredBox(
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
|
@ -40,3 +51,10 @@ Future<void> showErrorModal(
|
|||
//textColor: Colors.white,
|
||||
);
|
||||
}
|
||||
|
||||
void showErrorToast(BuildContext context, String message) {
|
||||
MotionToast.error(
|
||||
title: Text("Error"),
|
||||
description: Text(message),
|
||||
).show(context);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue